elixir.json 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. {
  2. "lexemes": "[a-zA-Z_][a-zA-Z0-9_.]*(\\!|\\?)?",
  3. "keywords": "and false then defined module in return redo retry end for true self when next until do begin unless nil break not case cond alias while ensure or include use alias fn quote require import with|0",
  4. "contains": [
  5. {
  6. "className": "string",
  7. "contains": [
  8. {
  9. "begin": "\\\\[\\s\\S]",
  10. "relevance": 0
  11. },
  12. {
  13. "className": "subst",
  14. "begin": "#\\{",
  15. "end": "}",
  16. "lexemes": "[a-zA-Z_][a-zA-Z0-9_.]*(\\!|\\?)?",
  17. "keywords": "and false then defined module in return redo retry end for true self when next until do begin unless nil break not case cond alias while ensure or include use alias fn quote require import with|0",
  18. "contains": {
  19. "$ref": "#contains"
  20. }
  21. }
  22. ],
  23. "variants": [
  24. {
  25. "begin": "\"\"\"",
  26. "end": "\"\"\""
  27. },
  28. {
  29. "begin": "'''",
  30. "end": "'''"
  31. },
  32. {
  33. "begin": "~S\"\"\"",
  34. "end": "\"\"\"",
  35. "contains": []
  36. },
  37. {
  38. "begin": "~S\"",
  39. "end": "\"",
  40. "contains": []
  41. },
  42. {
  43. "begin": "~S'''",
  44. "end": "'''",
  45. "contains": []
  46. },
  47. {
  48. "begin": "~S'",
  49. "end": "'",
  50. "contains": []
  51. },
  52. {
  53. "begin": "'",
  54. "end": "'"
  55. },
  56. {
  57. "begin": "\"",
  58. "end": "\""
  59. }
  60. ]
  61. },
  62. {
  63. "className": "string",
  64. "begin": "~[A-Z](?=[\/|([{<\"'])",
  65. "contains": [
  66. {
  67. "begin": "\"",
  68. "end": "\""
  69. },
  70. {
  71. "begin": "'",
  72. "end": "'"
  73. },
  74. {
  75. "begin": "\\\/",
  76. "end": "\\\/"
  77. },
  78. {
  79. "begin": "\\|",
  80. "end": "\\|"
  81. },
  82. {
  83. "begin": "\\(",
  84. "end": "\\)"
  85. },
  86. {
  87. "begin": "\\[",
  88. "end": "\\]"
  89. },
  90. {
  91. "begin": "\\{",
  92. "end": "\\}"
  93. },
  94. {
  95. "begin": "\\<",
  96. "end": "\\>"
  97. }
  98. ]
  99. },
  100. {
  101. "className": "string",
  102. "begin": "~[a-z](?=[\/|([{<\"'])",
  103. "contains": [
  104. {
  105. "endsParent": true,
  106. "contains": [
  107. {
  108. "contains": [
  109. {
  110. "$ref": "#contains.0.contains.0"
  111. },
  112. {
  113. "$ref": "#contains.0.contains.1"
  114. }
  115. ],
  116. "variants": [
  117. {
  118. "begin": "\"",
  119. "end": "\""
  120. },
  121. {
  122. "begin": "'",
  123. "end": "'"
  124. },
  125. {
  126. "begin": "\\\/",
  127. "end": "\\\/"
  128. },
  129. {
  130. "begin": "\\|",
  131. "end": "\\|"
  132. },
  133. {
  134. "begin": "\\(",
  135. "end": "\\)"
  136. },
  137. {
  138. "begin": "\\[",
  139. "end": "\\]"
  140. },
  141. {
  142. "begin": "\\{",
  143. "end": "\\}"
  144. },
  145. {
  146. "begin": "<",
  147. "end": ">"
  148. }
  149. ]
  150. }
  151. ]
  152. }
  153. ]
  154. },
  155. {
  156. "className": "comment",
  157. "begin": "#",
  158. "end": "$",
  159. "contains": [
  160. {
  161. "begin": "\\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\\b"
  162. },
  163. {
  164. "className": "doctag",
  165. "begin": "(?:TODO|FIXME|NOTE|BUG|XXX):",
  166. "relevance": 0
  167. }
  168. ]
  169. },
  170. {
  171. "className": "class",
  172. "beginKeywords": "defimpl defmodule defprotocol defrecord",
  173. "end": "\\bdo\\b|$|;",
  174. "contains": [
  175. {
  176. "className": "title",
  177. "begin": "[a-zA-Z_][a-zA-Z0-9_.]*(\\!|\\?)?",
  178. "relevance": 0,
  179. "endsParent": true
  180. }
  181. ]
  182. },
  183. {
  184. "className": "function",
  185. "beginKeywords": "def defp defmacro",
  186. "end": "\\B\\b",
  187. "contains": {
  188. "$ref": "#contains.4.contains"
  189. }
  190. },
  191. {
  192. "begin": "::"
  193. },
  194. {
  195. "className": "symbol",
  196. "begin": ":(?![\\s:])",
  197. "contains": [
  198. {
  199. "$ref": "#contains.0"
  200. },
  201. {
  202. "begin": "[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-\/+%^&*~`|]|\\[\\]=?"
  203. }
  204. ],
  205. "relevance": 0
  206. },
  207. {
  208. "className": "symbol",
  209. "begin": "[a-zA-Z_][a-zA-Z0-9_.]*(\\!|\\?)?:(?!:)",
  210. "relevance": 0
  211. },
  212. {
  213. "className": "number",
  214. "begin": "(\\b0o[0-7_]+)|(\\b0b[01_]+)|(\\b0x[0-9a-fA-F_]+)|(-?\\b[1-9][0-9_]*(.[0-9_]+([eE][-+]?[0-9]+)?)?)",
  215. "relevance": 0
  216. },
  217. {
  218. "className": "variable",
  219. "begin": "(\\$\\W)|((\\$|\\@\\@?)(\\w+))"
  220. },
  221. {
  222. "begin": "->"
  223. },
  224. {
  225. "begin": "(!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|\/=|\/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~)\\s*",
  226. "contains": [
  227. {
  228. "$ref": "#contains.3"
  229. },
  230. {
  231. "className": "regexp",
  232. "illegal": "\\n",
  233. "contains": [
  234. {
  235. "$ref": "#contains.0.contains.0"
  236. },
  237. {
  238. "$ref": "#contains.0.contains.1"
  239. }
  240. ],
  241. "variants": [
  242. {
  243. "begin": "\/",
  244. "end": "\/[a-z]*"
  245. },
  246. {
  247. "begin": "%r\\[",
  248. "end": "\\][a-z]*"
  249. }
  250. ]
  251. }
  252. ],
  253. "relevance": 0
  254. }
  255. ]
  256. }