tm-grammars 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/LICENSE +22 -0
  2. package/NOTICE +6565 -0
  3. package/README.md +211 -0
  4. package/grammars/abap.json +380 -0
  5. package/grammars/actionscript-3.json +951 -0
  6. package/grammars/ada.json +3874 -0
  7. package/grammars/apache.json +562 -0
  8. package/grammars/apex.json +3203 -0
  9. package/grammars/apl.json +1479 -0
  10. package/grammars/applescript.json +1406 -0
  11. package/grammars/ara.json +428 -0
  12. package/grammars/asm.json +1741 -0
  13. package/grammars/astro.json +776 -0
  14. package/grammars/awk.json +388 -0
  15. package/grammars/ballerina.json +3768 -0
  16. package/grammars/bat.json +783 -0
  17. package/grammars/beancount.json +831 -0
  18. package/grammars/berry.json +172 -0
  19. package/grammars/bibtex.json +315 -0
  20. package/grammars/bicep.json +239 -0
  21. package/grammars/blade.json +3870 -0
  22. package/grammars/c.json +3552 -0
  23. package/grammars/cadence.json +738 -0
  24. package/grammars/clarity.json +877 -0
  25. package/grammars/clojure.json +426 -0
  26. package/grammars/cmake.json +143 -0
  27. package/grammars/cobol.json +1124 -0
  28. package/grammars/codeql.json +1540 -0
  29. package/grammars/coffee.json +1311 -0
  30. package/grammars/cpp-macro.json +9498 -0
  31. package/grammars/cpp.json +16635 -0
  32. package/grammars/crystal.json +1866 -0
  33. package/grammars/csharp.json +5722 -0
  34. package/grammars/css.json +1860 -0
  35. package/grammars/csv.json +46 -0
  36. package/grammars/cue.json +1128 -0
  37. package/grammars/cypher.json +353 -0
  38. package/grammars/d.json +3185 -0
  39. package/grammars/dart.json +522 -0
  40. package/grammars/dax.json +185 -0
  41. package/grammars/diff.json +155 -0
  42. package/grammars/docker.json +97 -0
  43. package/grammars/dream-maker.json +640 -0
  44. package/grammars/elixir.json +1014 -0
  45. package/grammars/elm.json +751 -0
  46. package/grammars/erb.json +156 -0
  47. package/grammars/erlang.json +1757 -0
  48. package/grammars/fish.json +189 -0
  49. package/grammars/fsharp.json +1831 -0
  50. package/grammars/gdresource.json +290 -0
  51. package/grammars/gdscript.json +969 -0
  52. package/grammars/gdshader.json +405 -0
  53. package/grammars/gherkin.json +133 -0
  54. package/grammars/git-commit.json +85 -0
  55. package/grammars/git-rebase.json +56 -0
  56. package/grammars/glimmer-js.json +98 -0
  57. package/grammars/glimmer-ts.json +98 -0
  58. package/grammars/glsl.json +57 -0
  59. package/grammars/gnuplot.json +892 -0
  60. package/grammars/go.json +1012 -0
  61. package/grammars/graphql.json +1295 -0
  62. package/grammars/groovy.json +1378 -0
  63. package/grammars/hack.json +2650 -0
  64. package/grammars/haml.json +598 -0
  65. package/grammars/handlebars.json +848 -0
  66. package/grammars/haskell.json +2431 -0
  67. package/grammars/hcl.json +787 -0
  68. package/grammars/hjson.json +821 -0
  69. package/grammars/hlsl.json +212 -0
  70. package/grammars/html.json +93 -0
  71. package/grammars/imba.json +2696 -0
  72. package/grammars/ini.json +108 -0
  73. package/grammars/java.json +1885 -0
  74. package/grammars/javascript.json +5984 -0
  75. package/grammars/jinja-html.json +16 -0
  76. package/grammars/jinja.json +345 -0
  77. package/grammars/jison.json +715 -0
  78. package/grammars/jsdoc.json +21 -0
  79. package/grammars/json.json +208 -0
  80. package/grammars/json5.json +244 -0
  81. package/grammars/jsonc.json +208 -0
  82. package/grammars/jsonl.json +208 -0
  83. package/grammars/jsonnet.json +211 -0
  84. package/grammars/jssm.json +159 -0
  85. package/grammars/jsx.json +5984 -0
  86. package/grammars/julia.json +1061 -0
  87. package/grammars/kotlin.json +580 -0
  88. package/grammars/kusto.json +687 -0
  89. package/grammars/latex.json +2395 -0
  90. package/grammars/less.json +5012 -0
  91. package/grammars/liquid.json +990 -0
  92. package/grammars/lisp.json +121 -0
  93. package/grammars/logo.json +55 -0
  94. package/grammars/lua.json +956 -0
  95. package/grammars/make.json +629 -0
  96. package/grammars/markdown.json +3066 -0
  97. package/grammars/marko.json +1344 -0
  98. package/grammars/matlab.json +1131 -0
  99. package/grammars/mdc.json +571 -0
  100. package/grammars/mdx.json +5629 -0
  101. package/grammars/mermaid.json +1382 -0
  102. package/grammars/mojo.json +4153 -0
  103. package/grammars/narrat.json +227 -0
  104. package/grammars/nextflow.json +298 -0
  105. package/grammars/nginx.json +2121 -0
  106. package/grammars/nim.json +1522 -0
  107. package/grammars/nix.json +1200 -0
  108. package/grammars/nushell.json +1047 -0
  109. package/grammars/objective-c.json +3750 -0
  110. package/grammars/objective-cpp.json +7242 -0
  111. package/grammars/ocaml.json +2967 -0
  112. package/grammars/pascal.json +154 -0
  113. package/grammars/perl.json +2971 -0
  114. package/grammars/php.json +4024 -0
  115. package/grammars/plsql.json +241 -0
  116. package/grammars/postcss.json +377 -0
  117. package/grammars/powerquery.json +349 -0
  118. package/grammars/powershell.json +1024 -0
  119. package/grammars/prisma.json +443 -0
  120. package/grammars/prolog.json +298 -0
  121. package/grammars/proto.json +507 -0
  122. package/grammars/pug.json +1033 -0
  123. package/grammars/puppet.json +777 -0
  124. package/grammars/purescript.json +871 -0
  125. package/grammars/python.json +4208 -0
  126. package/grammars/r.json +637 -0
  127. package/grammars/raku.json +310 -0
  128. package/grammars/razor.json +1813 -0
  129. package/grammars/reg.json +136 -0
  130. package/grammars/rel.json +200 -0
  131. package/grammars/riscv.json +298 -0
  132. package/grammars/rst.json +734 -0
  133. package/grammars/ruby.json +2769 -0
  134. package/grammars/rust.json +1171 -0
  135. package/grammars/sas.json +302 -0
  136. package/grammars/sass.json +618 -0
  137. package/grammars/scala.json +1313 -0
  138. package/grammars/scheme.json +384 -0
  139. package/grammars/scss.json +1874 -0
  140. package/grammars/shaderlab.json +199 -0
  141. package/grammars/shellscript.json +2025 -0
  142. package/grammars/shellsession.json +33 -0
  143. package/grammars/smalltalk.json +235 -0
  144. package/grammars/solidity.json +1210 -0
  145. package/grammars/sparql.json +45 -0
  146. package/grammars/splunk.json +91 -0
  147. package/grammars/sql.json +631 -0
  148. package/grammars/ssh-config.json +88 -0
  149. package/grammars/stata.json +3050 -0
  150. package/grammars/stylus.json +1208 -0
  151. package/grammars/svelte.json +1171 -0
  152. package/grammars/swift.json +4203 -0
  153. package/grammars/system-verilog.json +1063 -0
  154. package/grammars/tasl.json +292 -0
  155. package/grammars/tcl.json +291 -0
  156. package/grammars/tex.json +281 -0
  157. package/grammars/toml.json +431 -0
  158. package/grammars/tsx.json +5984 -0
  159. package/grammars/turtle.json +261 -0
  160. package/grammars/twig.json +1394 -0
  161. package/grammars/typescript.json +5735 -0
  162. package/grammars/v.json +1001 -0
  163. package/grammars/vb.json +232 -0
  164. package/grammars/verilog.json +305 -0
  165. package/grammars/vhdl.json +1484 -0
  166. package/grammars/viml.json +445 -0
  167. package/grammars/vue-html.json +559 -0
  168. package/grammars/vue.json +1237 -0
  169. package/grammars/vyper.json +5415 -0
  170. package/grammars/wasm.json +831 -0
  171. package/grammars/wenyan.json +129 -0
  172. package/grammars/wgsl.json +391 -0
  173. package/grammars/wolfram.json +2370 -0
  174. package/grammars/xml.json +382 -0
  175. package/grammars/xsl.json +89 -0
  176. package/grammars/yaml.json +616 -0
  177. package/grammars/zenscript.json +257 -0
  178. package/grammars/zig.json +312 -0
  179. package/index.d.ts +18 -0
  180. package/index.js +2165 -0
  181. package/package.json +46 -0
@@ -0,0 +1,428 @@
1
+ {
2
+ "displayName": "Ara",
3
+ "fileTypes": [
4
+ "ara"
5
+ ],
6
+ "name": "ara",
7
+ "patterns": [
8
+ {
9
+ "include": "#namespace"
10
+ },
11
+ {
12
+ "include": "#named-arguments"
13
+ },
14
+ {
15
+ "include": "#comments"
16
+ },
17
+ {
18
+ "include": "#keywords"
19
+ },
20
+ {
21
+ "include": "#strings"
22
+ },
23
+ {
24
+ "include": "#numbers"
25
+ },
26
+ {
27
+ "include": "#operators"
28
+ },
29
+ {
30
+ "include": "#type"
31
+ },
32
+ {
33
+ "include": "#function-call"
34
+ }
35
+ ],
36
+ "repository": {
37
+ "class-name": {
38
+ "patterns": [
39
+ {
40
+ "begin": "\\b(?i)(?<!\\$)(?=[\\\\a-zA-Z_])",
41
+ "end": "(?i)([a-z_][a-z_0-9]*)?(?=[^a-z0-9_\\\\])\\b",
42
+ "endCaptures": {
43
+ "1": {
44
+ "name": "support.class.ara"
45
+ }
46
+ },
47
+ "patterns": [
48
+ {
49
+ "include": "#namespace"
50
+ }
51
+ ]
52
+ }
53
+ ]
54
+ },
55
+ "comments": {
56
+ "patterns": [
57
+ {
58
+ "begin": "/\\*",
59
+ "captures": {
60
+ "0": {
61
+ "name": "punctuation.definition.comment.ara"
62
+ }
63
+ },
64
+ "end": "\\*/",
65
+ "name": "comment.block.ara"
66
+ },
67
+ {
68
+ "begin": "(^[ \\t]+)?(?=//)",
69
+ "beginCaptures": {
70
+ "1": {
71
+ "name": "punctuation.whitespace.comment.leading.ara"
72
+ }
73
+ },
74
+ "end": "(?!\\G)",
75
+ "patterns": [
76
+ {
77
+ "begin": "//",
78
+ "beginCaptures": {
79
+ "0": {
80
+ "name": "punctuation.definition.comment.ara"
81
+ }
82
+ },
83
+ "end": "\\n",
84
+ "name": "comment.line.double-slash.ara"
85
+ }
86
+ ]
87
+ }
88
+ ]
89
+ },
90
+ "function-call": {
91
+ "patterns": [
92
+ {
93
+ "begin": "(?i)(?=\\\\?[a-z_0-9\\\\]+\\\\[a-z_][a-z0-9_]*\\s*(\\(|(::<)))",
94
+ "comment": "Functions in a user-defined namespace (overrides any built-ins)",
95
+ "end": "(?=\\s*(\\(|(::<)))",
96
+ "patterns": [
97
+ {
98
+ "include": "#user-function-call"
99
+ }
100
+ ]
101
+ },
102
+ {
103
+ "begin": "(?i)(\\\\)?(?=\\b[a-z_][a-z_0-9]*\\s*(\\(|(::<)))",
104
+ "beginCaptures": {
105
+ "1": {
106
+ "name": "punctuation.separator.inheritance.php"
107
+ }
108
+ },
109
+ "comment": "Root namespace function calls (built-in or user)",
110
+ "end": "(?=\\s*(\\(|(::<)))",
111
+ "patterns": [
112
+ {
113
+ "include": "#user-function-call"
114
+ }
115
+ ]
116
+ }
117
+ ]
118
+ },
119
+ "interpolation": {
120
+ "patterns": [
121
+ {
122
+ "comment": "Interpolating octal values e.g. \\01 or \\07.",
123
+ "match": "\\\\[0-7]{1,3}",
124
+ "name": "constant.numeric.octal.ara"
125
+ },
126
+ {
127
+ "comment": "Interpolating hex values e.g. \\x1 or \\xFF.",
128
+ "match": "\\\\x[0-9A-Fa-f]{1,2}",
129
+ "name": "constant.numeric.hex.ara"
130
+ },
131
+ {
132
+ "comment": "Escaped characters in double-quoted strings e.g. \\n or \\t.",
133
+ "match": "\\\\[nrt\\\\\\$\\\"]",
134
+ "name": "constant.character.escape.ara"
135
+ }
136
+ ]
137
+ },
138
+ "keywords": {
139
+ "patterns": [
140
+ {
141
+ "match": "\\b(await|async|concurrently|break|continue|do|else|elseif|for|if|loop|while|foreach|match|return|try|yield|from|catch|finally|default|exit)\\b",
142
+ "name": "keyword.control.ara"
143
+ },
144
+ {
145
+ "match": "\\b(const|enum|class|interface|trait|namespace|type|case|function|fn)\\b",
146
+ "name": "storage.decl.ara"
147
+ },
148
+ {
149
+ "match": "\\b(final|abstract|static|readonly|public|private|protected)\\b",
150
+ "name": "storage.modifier.ara"
151
+ },
152
+ {
153
+ "match": "\\b(as|is|extends|implements|use|where|clone|new)\\b",
154
+ "name": "keyword.other.ara"
155
+ }
156
+ ]
157
+ },
158
+ "named-arguments": {
159
+ "captures": {
160
+ "1": {
161
+ "name": "entity.name.variable.parameter.ara"
162
+ },
163
+ "2": {
164
+ "name": "punctuation.separator.colon.ara"
165
+ }
166
+ },
167
+ "match": "(?i)(?<=^|\\(|,)\\s*([a-z_\\x{7f}-\\x{10ffff}][a-z0-9_\\x{7f}-\\x{10ffff}]*)\\s*(:)(?!:)"
168
+ },
169
+ "namespace": {
170
+ "begin": "(?i)((namespace)|[a-z0-9_]+)?(\\\\)(?=.*?[^a-z_0-9\\\\])",
171
+ "beginCaptures": {
172
+ "1": {
173
+ "name": "entity.name.type.namespace.php"
174
+ },
175
+ "3": {
176
+ "name": "punctuation.separator.inheritance.php"
177
+ }
178
+ },
179
+ "end": "(?i)(?=[a-z0-9_]*[^a-z0-9_\\\\])",
180
+ "name": "support.other.namespace.php",
181
+ "patterns": [
182
+ {
183
+ "match": "(?i)[a-z0-9_]+(?=\\\\)",
184
+ "name": "entity.name.type.namespace.php"
185
+ },
186
+ {
187
+ "captures": {
188
+ "1": {
189
+ "name": "punctuation.separator.inheritance.php"
190
+ }
191
+ },
192
+ "match": "(?i)(\\\\)"
193
+ }
194
+ ]
195
+ },
196
+ "numbers": {
197
+ "patterns": [
198
+ {
199
+ "match": "0[xX][0-9a-fA-F]+(?:_[0-9a-fA-F]+)*",
200
+ "name": "constant.numeric.hex.ara"
201
+ },
202
+ {
203
+ "match": "0[bB][01]+(?:_[01]+)*",
204
+ "name": "constant.numeric.binary.ara"
205
+ },
206
+ {
207
+ "match": "0[oO][0-7]+(?:_[0-7]+)*",
208
+ "name": "constant.numeric.octal.ara"
209
+ },
210
+ {
211
+ "match": "0(?:_?[0-7]+)+",
212
+ "name": "constant.numeric.octal.ara"
213
+ },
214
+ {
215
+ "captures": {
216
+ "1": {
217
+ "name": "punctuation.separator.decimal.period.ara"
218
+ },
219
+ "2": {
220
+ "name": "punctuation.separator.decimal.period.ara"
221
+ }
222
+ },
223
+ "match": "(?x)\n(?:\n (?:[0-9]+(?:_[0-9]+)*)?(\\.)[0-9]+(?:_[0-9]+)*(?:[eE][+-]?[0-9]+(?:_[0-9]+)*)?| # .3\n [0-9]+(?:_[0-9]+)*(\\.)(?:[0-9]+(?:_[0-9]+)*)?(?:[eE][+-]?[0-9]+(?:_[0-9]+)*)?| # 3.\n [0-9]+(?:_[0-9]+)*[eE][+-]?[0-9]+(?:_[0-9]+)* # 2e-3\n)",
224
+ "name": "constant.numeric.decimal.ara"
225
+ },
226
+ {
227
+ "match": "0|[1-9](?:_?[0-9]+)*",
228
+ "name": "constant.numeric.decimal.ara"
229
+ }
230
+ ]
231
+ },
232
+ "operators": {
233
+ "patterns": [
234
+ {
235
+ "comment": "assignment operators",
236
+ "match": "(\\+=|-=|\\*=|/=|%=|\\^=|&&=|<=|>=|&=|\\|=|<<=|>>=|\\?\\?=)",
237
+ "name": "keyword.assignments.ara"
238
+ },
239
+ {
240
+ "comment": "logical operators",
241
+ "match": "(\\^|\\||\\|\\||&&|>>|<<|&|~|<<|>>|>|<|<=>|\\?\\?|\\?|:|\\?:)(?!=)",
242
+ "name": "keyword.operators.ara"
243
+ },
244
+ {
245
+ "comment": "comparison operators",
246
+ "match": "(==|===|!==|!=|<=|>=|<|>)(?!=)",
247
+ "name": "keyword.operator.comparison.ara"
248
+ },
249
+ {
250
+ "comment": "math operators",
251
+ "match": "(([+%]|(\\*(?!\\w)))(?!=))|(-(?!>))|(/(?!/))",
252
+ "name": "keyword.operator.math.ara"
253
+ },
254
+ {
255
+ "comment": "single equal assignment operator",
256
+ "match": "(?<![<>])=(?!=|>)",
257
+ "name": "keyword.operator.assignment.ara"
258
+ },
259
+ {
260
+ "captures": {
261
+ "1": {
262
+ "name": "punctuation.brackets.round.ara"
263
+ },
264
+ "2": {
265
+ "name": "punctuation.brackets.square.ara"
266
+ },
267
+ "3": {
268
+ "name": "punctuation.brackets.curly.ara"
269
+ },
270
+ "4": {
271
+ "name": "keyword.operator.comparison.ara"
272
+ },
273
+ "5": {
274
+ "name": "punctuation.brackets.round.ara"
275
+ },
276
+ "6": {
277
+ "name": "punctuation.brackets.square.ara"
278
+ },
279
+ "7": {
280
+ "name": "punctuation.brackets.curly.ara"
281
+ }
282
+ },
283
+ "comment": "less than, greater than (special case)",
284
+ "match": "(?:\\b|(?:(\\))|(\\])|(\\})))[ \\t]+([<>])[ \\t]+(?:\\b|(?:(\\()|(\\[)|(\\{)))"
285
+ },
286
+ {
287
+ "comment": "arrow method call, arrow property access",
288
+ "match": "(?x)\n(?:\n -> | \\?-> \n)",
289
+ "name": "keyword.operator.arrow.ara"
290
+ },
291
+ {
292
+ "comment": "double arrow key-value pair",
293
+ "match": "(?x)\n(?:\n =>\n)",
294
+ "name": "keyword.operator.double-arrow.ara"
295
+ },
296
+ {
297
+ "comment": "static method call, static property access",
298
+ "match": "(?x)\n(?:\n ::\n)",
299
+ "name": "keyword.operator.static.ara"
300
+ },
301
+ {
302
+ "comment": "closure creation",
303
+ "match": "(?x)\n(?:\n \\(\\.\\.\\.\\)\n)",
304
+ "name": "keyword.operator.closure.ara"
305
+ },
306
+ {
307
+ "comment": "spread operator",
308
+ "match": "(?x)\n(?:\n \\.\\.\\.\n)",
309
+ "name": "keyword.operator.spread.ara"
310
+ },
311
+ {
312
+ "comment": "namespace operator",
313
+ "match": "\\\\",
314
+ "name": "keyword.operator.namespace.ara"
315
+ }
316
+ ]
317
+ },
318
+ "strings": {
319
+ "patterns": [
320
+ {
321
+ "begin": "'",
322
+ "end": "'",
323
+ "name": "string.quoted.single.ara",
324
+ "patterns": [
325
+ {
326
+ "match": "\\\\[\\\\']",
327
+ "name": "constant.character.escape.ara"
328
+ }
329
+ ]
330
+ },
331
+ {
332
+ "begin": "\"",
333
+ "end": "\"",
334
+ "name": "string.quoted.double.ara",
335
+ "patterns": [
336
+ {
337
+ "include": "#interpolation"
338
+ }
339
+ ]
340
+ }
341
+ ]
342
+ },
343
+ "type": {
344
+ "name": "support.type.php",
345
+ "patterns": [
346
+ {
347
+ "match": "\\b(?:void|true|false|null|never|float|bool|int|string|dict|vec|object|mixed|nonnull|resource|self|static|parent|iterable)\\b",
348
+ "name": "support.type.php"
349
+ },
350
+ {
351
+ "begin": "([A-Za-z_][A-Za-z0-9_]*)<",
352
+ "beginCaptures": {
353
+ "1": {
354
+ "name": "support.class.php"
355
+ }
356
+ },
357
+ "end": ">",
358
+ "patterns": [
359
+ {
360
+ "include": "#type-annotation"
361
+ }
362
+ ]
363
+ },
364
+ {
365
+ "begin": "(shape\\()",
366
+ "end": "((,|\\.\\.\\.)?\\s*\\))",
367
+ "endCaptures": {
368
+ "1": {
369
+ "name": "keyword.operator.key.php"
370
+ }
371
+ },
372
+ "name": "storage.type.shape.php",
373
+ "patterns": [
374
+ {
375
+ "include": "#type-annotation"
376
+ },
377
+ {
378
+ "include": "#strings"
379
+ },
380
+ {
381
+ "include": "#constants"
382
+ }
383
+ ]
384
+ },
385
+ {
386
+ "begin": "\\(",
387
+ "end": "\\)",
388
+ "patterns": [
389
+ {
390
+ "include": "#type-annotation"
391
+ }
392
+ ]
393
+ },
394
+ {
395
+ "begin": "\\(fn\\(",
396
+ "end": "\\)",
397
+ "patterns": [
398
+ {
399
+ "include": "#type-annotation"
400
+ }
401
+ ]
402
+ },
403
+ {
404
+ "include": "#class-name"
405
+ },
406
+ {
407
+ "include": "#comments"
408
+ }
409
+ ]
410
+ },
411
+ "user-function-call": {
412
+ "begin": "(?i)(?=[a-z_0-9\\\\]*[a-z_][a-z0-9_]*\\s*\\()",
413
+ "end": "(?i)[a-z_][a-z_0-9]*(?=\\s*\\()",
414
+ "endCaptures": {
415
+ "0": {
416
+ "name": "entity.name.function.php"
417
+ }
418
+ },
419
+ "name": "meta.function-call.php",
420
+ "patterns": [
421
+ {
422
+ "include": "#namespace"
423
+ }
424
+ ]
425
+ }
426
+ },
427
+ "scopeName": "source.ara"
428
+ }