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,951 @@
1
+ {
2
+ "displayName": "ActionScript",
3
+ "fileTypes": [
4
+ "as"
5
+ ],
6
+ "name": "actionscript-3",
7
+ "patterns": [
8
+ {
9
+ "include": "#comments"
10
+ },
11
+ {
12
+ "include": "#package"
13
+ },
14
+ {
15
+ "include": "#class"
16
+ },
17
+ {
18
+ "include": "#interface"
19
+ },
20
+ {
21
+ "include": "#namespace_declaration"
22
+ },
23
+ {
24
+ "include": "#import"
25
+ },
26
+ {
27
+ "include": "#mxml"
28
+ },
29
+ {
30
+ "include": "#strings"
31
+ },
32
+ {
33
+ "include": "#regexp"
34
+ },
35
+ {
36
+ "include": "#variable_declaration"
37
+ },
38
+ {
39
+ "include": "#numbers"
40
+ },
41
+ {
42
+ "include": "#primitive_types"
43
+ },
44
+ {
45
+ "include": "#primitive_error_types"
46
+ },
47
+ {
48
+ "include": "#dynamic_type"
49
+ },
50
+ {
51
+ "include": "#primitive_functions"
52
+ },
53
+ {
54
+ "include": "#language_constants"
55
+ },
56
+ {
57
+ "include": "#language_variables"
58
+ },
59
+ {
60
+ "include": "#guess_type"
61
+ },
62
+ {
63
+ "include": "#guess_constant"
64
+ },
65
+ {
66
+ "include": "#other_operators"
67
+ },
68
+ {
69
+ "include": "#arithmetic_operators"
70
+ },
71
+ {
72
+ "include": "#logical_operators"
73
+ },
74
+ {
75
+ "include": "#array_access_operators"
76
+ },
77
+ {
78
+ "include": "#vector_creation_operators"
79
+ },
80
+ {
81
+ "include": "#control_keywords"
82
+ },
83
+ {
84
+ "include": "#other_keywords"
85
+ },
86
+ {
87
+ "include": "#use_namespace"
88
+ },
89
+ {
90
+ "include": "#functions"
91
+ }
92
+ ],
93
+ "repository": {
94
+ "arithmetic_operators": {
95
+ "match": "(\\+|\\-|/|%|(?<!:)\\*)",
96
+ "name": "keyword.operator.actionscript.3"
97
+ },
98
+ "array_access_operators": {
99
+ "match": "(\\[|\\])",
100
+ "name": "keyword.operator.actionscript.3"
101
+ },
102
+ "class": {
103
+ "begin": "(?x) (^|\\s+|;) (\\b(dynamic|final|abstract)\\b\\s+)? (\\b(internal|public)\\b\\s+)? (\\b(dynamic|final|abstract)\\b\\s+)? (?=\\bclass\\b)",
104
+ "beginCaptures": {
105
+ "3": {
106
+ "name": "storage.modifier.actionscript.3"
107
+ },
108
+ "5": {
109
+ "name": "storage.modifier.actionscript.3"
110
+ },
111
+ "7": {
112
+ "name": "storage.modifier.actionscript.3"
113
+ }
114
+ },
115
+ "end": "\\}",
116
+ "name": "meta.class.actionscript.3",
117
+ "patterns": [
118
+ {
119
+ "include": "#class_declaration"
120
+ },
121
+ {
122
+ "include": "#metadata"
123
+ },
124
+ {
125
+ "include": "#method"
126
+ },
127
+ {
128
+ "include": "#comments"
129
+ },
130
+ {
131
+ "include": "#strings"
132
+ },
133
+ {
134
+ "include": "#regexp"
135
+ },
136
+ {
137
+ "include": "#numbers"
138
+ },
139
+ {
140
+ "include": "#primitive_types"
141
+ },
142
+ {
143
+ "include": "#primitive_error_types"
144
+ },
145
+ {
146
+ "include": "#dynamic_type"
147
+ },
148
+ {
149
+ "include": "#primitive_functions"
150
+ },
151
+ {
152
+ "include": "#language_constants"
153
+ },
154
+ {
155
+ "include": "#language_variables"
156
+ },
157
+ {
158
+ "include": "#other_operators"
159
+ },
160
+ {
161
+ "include": "#other_keywords"
162
+ },
163
+ {
164
+ "include": "#use_namespace"
165
+ },
166
+ {
167
+ "include": "#guess_type"
168
+ },
169
+ {
170
+ "include": "#guess_constant"
171
+ },
172
+ {
173
+ "include": "#arithmetic_operators"
174
+ },
175
+ {
176
+ "include": "#array_access_operators"
177
+ },
178
+ {
179
+ "include": "#vector_creation_operators"
180
+ },
181
+ {
182
+ "include": "#variable_declaration"
183
+ },
184
+ {
185
+ "include": "#object_literal"
186
+ }
187
+ ]
188
+ },
189
+ "class_declaration": {
190
+ "begin": "(?x) \\b(class)\\b \\s+ ([\\.\\w]+|\\*)",
191
+ "beginCaptures": {
192
+ "1": {
193
+ "name": "storage.type.class.actionscript.3"
194
+ },
195
+ "2": {
196
+ "name": "entity.name.class.actionscript.3"
197
+ }
198
+ },
199
+ "end": "\\{",
200
+ "name": "meta.class_declaration.actionscript.3",
201
+ "patterns": [
202
+ {
203
+ "include": "#extends"
204
+ },
205
+ {
206
+ "include": "#implements"
207
+ },
208
+ {
209
+ "include": "#comments"
210
+ }
211
+ ]
212
+ },
213
+ "code_block": {
214
+ "begin": "\\{",
215
+ "end": "\\}",
216
+ "name": "meta.code_block.actionscript.3",
217
+ "patterns": [
218
+ {
219
+ "include": "#code_block"
220
+ },
221
+ {
222
+ "include": "#comments"
223
+ },
224
+ {
225
+ "include": "#strings"
226
+ },
227
+ {
228
+ "include": "#regexp"
229
+ },
230
+ {
231
+ "include": "#variable_declaration"
232
+ },
233
+ {
234
+ "include": "#numbers"
235
+ },
236
+ {
237
+ "include": "#primitive_types"
238
+ },
239
+ {
240
+ "include": "#primitive_error_types"
241
+ },
242
+ {
243
+ "include": "#dynamic_type"
244
+ },
245
+ {
246
+ "include": "#primitive_functions"
247
+ },
248
+ {
249
+ "include": "#language_constants"
250
+ },
251
+ {
252
+ "include": "#language_variables"
253
+ },
254
+ {
255
+ "include": "#guess_type"
256
+ },
257
+ {
258
+ "include": "#guess_constant"
259
+ },
260
+ {
261
+ "include": "#other_operators"
262
+ },
263
+ {
264
+ "include": "#arithmetic_operators"
265
+ },
266
+ {
267
+ "include": "#logical_operators"
268
+ },
269
+ {
270
+ "include": "#array_access_operators"
271
+ },
272
+ {
273
+ "include": "#vector_creation_operators"
274
+ },
275
+ {
276
+ "include": "#control_keywords"
277
+ },
278
+ {
279
+ "include": "#other_keywords"
280
+ },
281
+ {
282
+ "include": "#use_namespace"
283
+ },
284
+ {
285
+ "include": "#functions"
286
+ },
287
+ {
288
+ "include": "#import"
289
+ }
290
+ ]
291
+ },
292
+ "comments": {
293
+ "patterns": [
294
+ {
295
+ "begin": "/\\*\\*(?!/)",
296
+ "end": "\\*/",
297
+ "name": "comment.block.documentation.actionscript.3",
298
+ "patterns": [
299
+ {
300
+ "match": "@(copy|default|eventType|example|exampleText|includeExample|inheritDoc|internal|param|private|return|see|since|throws)\\b",
301
+ "name": "keyword.other.documentation.actionscript.3.asdoc"
302
+ }
303
+ ]
304
+ },
305
+ {
306
+ "begin": "/\\*",
307
+ "end": "\\*/",
308
+ "name": "comment.block.actionscript.3"
309
+ },
310
+ {
311
+ "match": "//.*",
312
+ "name": "comment.line.actionscript.3"
313
+ }
314
+ ]
315
+ },
316
+ "control_keywords": {
317
+ "match": "\\b(if|else|do|while|for|each|continue|return|switch|case|default|break|try|catch|finally|throw|with)\\b",
318
+ "name": "keyword.control.actionscript.3"
319
+ },
320
+ "dynamic_type": {
321
+ "captures": {
322
+ "1": {
323
+ "name": "support.type.actionscript.3"
324
+ }
325
+ },
326
+ "match": "(?<=:)\\s*(\\*)"
327
+ },
328
+ "escapes": {
329
+ "match": "\\\\(x\\h{2}|[0-2][0-7]{,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)",
330
+ "name": "constant.character.escape.actionscript.3"
331
+ },
332
+ "extends": {
333
+ "captures": {
334
+ "1": {
335
+ "name": "keyword.other.actionscript.3"
336
+ },
337
+ "2": {
338
+ "name": "entity.other.inherited-class.actionscript.3"
339
+ },
340
+ "3": {
341
+ "name": "entity.other.inherited-class.actionscript.3"
342
+ }
343
+ },
344
+ "match": "(?x) \\b(extends)\\b \\s+ ([\\.\\w]+) \\s* (?:, \\s* ([\\.\\w]+))* \\s*",
345
+ "name": "meta.extends.actionscript.3"
346
+ },
347
+ "function_arguments": {
348
+ "begin": "\\(",
349
+ "end": "\\)",
350
+ "name": "meta.function_arguments.actionscript.3",
351
+ "patterns": [
352
+ {
353
+ "include": "#parameters"
354
+ },
355
+ {
356
+ "include": "#comments"
357
+ }
358
+ ]
359
+ },
360
+ "functions": {
361
+ "begin": "(?x) \\b(function)\\b (?:\\s+\\b(get|set)\\b\\s+)? \\s* ([a-zA-Z0-9_\\$]+\\b)?",
362
+ "beginCaptures": {
363
+ "1": {
364
+ "name": "storage.type.function.actionscript.3"
365
+ },
366
+ "2": {
367
+ "name": "storage.modifier.actionscript.3"
368
+ },
369
+ "3": {
370
+ "name": "entity.name.function.actionscript.3"
371
+ }
372
+ },
373
+ "end": "($|;|(?=\\{))",
374
+ "name": "meta.function.actionscript.3",
375
+ "patterns": [
376
+ {
377
+ "include": "#function_arguments"
378
+ },
379
+ {
380
+ "include": "#return_type"
381
+ },
382
+ {
383
+ "include": "#comments"
384
+ }
385
+ ]
386
+ },
387
+ "guess_constant": {
388
+ "captures": {
389
+ "1": {
390
+ "name": "constant.other.actionscript.3"
391
+ }
392
+ },
393
+ "comment": "Following convention, let's guess that anything in all caps/digits (possible underscores) is a constant.",
394
+ "match": "\\b([A-Z\\$][A-Z0-9_]+)\\b"
395
+ },
396
+ "guess_type": {
397
+ "captures": {
398
+ "1": {
399
+ "name": "support.type.actionscript.3"
400
+ }
401
+ },
402
+ "comment": "Following convention, let's guess that any word starting with one or more capital letters (that contains at least some lower-case letters so that constants aren't detected) refers to a class/type. May be fully-qualified.",
403
+ "match": "\\b((?:[A-Za-z0-9_\\$]+\\.)*[A-Z][A-Z0-9]*[a-z]+[A-Za-z0-9_\\$]*)\\b"
404
+ },
405
+ "implements": {
406
+ "captures": {
407
+ "1": {
408
+ "name": "keyword.other.actionscript.3"
409
+ },
410
+ "2": {
411
+ "name": "entity.other.inherited-class.actionscript.3"
412
+ },
413
+ "3": {
414
+ "name": "entity.other.inherited-class.actionscript.3"
415
+ }
416
+ },
417
+ "match": "(?x) \\b(implements)\\b \\s+ ([\\.\\w]+) \\s* (?:, \\s* ([\\.\\w]+))* \\s*",
418
+ "name": "meta.implements.actionscript.3"
419
+ },
420
+ "import": {
421
+ "captures": {
422
+ "2": {
423
+ "name": "keyword.control.import.actionscript.3"
424
+ },
425
+ "3": {
426
+ "name": "support.type.actionscript.3"
427
+ }
428
+ },
429
+ "match": "(?x) (^|\\s+|;) \\b(import)\\b \\s+ ([A-Za-z0-9\\$_\\.]+(?:\\.\\*)?) \\s* (?=;|$)",
430
+ "name": "meta.import.actionscript.3"
431
+ },
432
+ "interface": {
433
+ "begin": "(?x) (^|\\s+|;) (\\b(internal|public)\\b\\s+)? (?=\\binterface\\b)",
434
+ "beginCaptures": {
435
+ "3": {
436
+ "name": "storage.modifier.actionscript.3"
437
+ }
438
+ },
439
+ "end": "\\}",
440
+ "name": "meta.interface.actionscript.3",
441
+ "patterns": [
442
+ {
443
+ "include": "#interface_declaration"
444
+ },
445
+ {
446
+ "include": "#metadata"
447
+ },
448
+ {
449
+ "include": "#functions"
450
+ },
451
+ {
452
+ "include": "#comments"
453
+ }
454
+ ]
455
+ },
456
+ "interface_declaration": {
457
+ "begin": "(?x) \\b(interface)\\b \\s+ ([\\.\\w]+)",
458
+ "beginCaptures": {
459
+ "1": {
460
+ "name": "storage.type.interface.actionscript.3"
461
+ },
462
+ "2": {
463
+ "name": "entity.name.class.actionscript.3"
464
+ }
465
+ },
466
+ "end": "\\{",
467
+ "name": "meta.class_declaration.actionscript.3",
468
+ "patterns": [
469
+ {
470
+ "include": "#extends"
471
+ },
472
+ {
473
+ "include": "#comments"
474
+ }
475
+ ]
476
+ },
477
+ "language_constants": {
478
+ "match": "\\b(true|false|null|Infinity|-Infinity|NaN|undefined)\\b",
479
+ "name": "constant.language.actionscript.3"
480
+ },
481
+ "language_variables": {
482
+ "match": "\\b(super|this|arguments)\\b",
483
+ "name": "variable.language.actionscript.3"
484
+ },
485
+ "logical_operators": {
486
+ "match": "(&|<|~|\\||>|\\^|!|\\?)",
487
+ "name": "keyword.operator.actionscript.3"
488
+ },
489
+ "metadata": {
490
+ "begin": "\\[\\s*\\b(\\w+)\\b",
491
+ "beginCaptures": {
492
+ "1": {
493
+ "name": "keyword.other.actionscript.3"
494
+ }
495
+ },
496
+ "end": "\\]",
497
+ "name": "meta.metadata_info.actionscript.3",
498
+ "patterns": [
499
+ {
500
+ "include": "#metadata_info"
501
+ }
502
+ ]
503
+ },
504
+ "metadata_info": {
505
+ "begin": "\\(",
506
+ "end": "\\)",
507
+ "patterns": [
508
+ {
509
+ "include": "#strings"
510
+ },
511
+ {
512
+ "captures": {
513
+ "1": {
514
+ "name": "variable.parameter.actionscript.3"
515
+ },
516
+ "2": {
517
+ "name": "keyword.operator.actionscript.3"
518
+ }
519
+ },
520
+ "match": "(\\w+)\\s*(=)"
521
+ }
522
+ ]
523
+ },
524
+ "method": {
525
+ "begin": "(?x) (^|\\s+) ((\\w+)\\s+)? ((\\w+)\\s+)? ((\\w+)\\s+)? ((\\w+)\\s+)? (?=\\bfunction\\b)",
526
+ "beginCaptures": {
527
+ "3": {
528
+ "name": "storage.modifier.actionscript.3"
529
+ },
530
+ "5": {
531
+ "name": "storage.modifier.actionscript.3"
532
+ },
533
+ "7": {
534
+ "name": "storage.modifier.actionscript.3"
535
+ },
536
+ "8": {
537
+ "name": "storage.modifier.actionscript.3"
538
+ }
539
+ },
540
+ "end": "(?<=(;|\\}))",
541
+ "name": "meta.method.actionscript.3",
542
+ "patterns": [
543
+ {
544
+ "include": "#functions"
545
+ },
546
+ {
547
+ "include": "#code_block"
548
+ }
549
+ ]
550
+ },
551
+ "mxml": {
552
+ "begin": "<!\\[CDATA\\[",
553
+ "end": "\\]\\]>",
554
+ "name": "meta.cdata.actionscript.3",
555
+ "patterns": [
556
+ {
557
+ "include": "#comments"
558
+ },
559
+ {
560
+ "include": "#import"
561
+ },
562
+ {
563
+ "include": "#metadata"
564
+ },
565
+ {
566
+ "include": "#class"
567
+ },
568
+ {
569
+ "include": "#namespace_declaration"
570
+ },
571
+ {
572
+ "include": "#use_namespace"
573
+ },
574
+ {
575
+ "include": "#class_declaration"
576
+ },
577
+ {
578
+ "include": "#method"
579
+ },
580
+ {
581
+ "include": "#comments"
582
+ },
583
+ {
584
+ "include": "#strings"
585
+ },
586
+ {
587
+ "include": "#regexp"
588
+ },
589
+ {
590
+ "include": "#numbers"
591
+ },
592
+ {
593
+ "include": "#primitive_types"
594
+ },
595
+ {
596
+ "include": "#primitive_error_types"
597
+ },
598
+ {
599
+ "include": "#dynamic_type"
600
+ },
601
+ {
602
+ "include": "#primitive_functions"
603
+ },
604
+ {
605
+ "include": "#language_constants"
606
+ },
607
+ {
608
+ "include": "#language_variables"
609
+ },
610
+ {
611
+ "include": "#other_keywords"
612
+ },
613
+ {
614
+ "include": "#guess_type"
615
+ },
616
+ {
617
+ "include": "#guess_constant"
618
+ },
619
+ {
620
+ "include": "#other_operators"
621
+ },
622
+ {
623
+ "include": "#arithmetic_operators"
624
+ },
625
+ {
626
+ "include": "#array_access_operators"
627
+ },
628
+ {
629
+ "include": "#vector_creation_operators"
630
+ },
631
+ {
632
+ "include": "#variable_declaration"
633
+ }
634
+ ]
635
+ },
636
+ "namespace_declaration": {
637
+ "captures": {
638
+ "2": {
639
+ "name": "storage.modifier.actionscript.3"
640
+ },
641
+ "3": {
642
+ "name": "storage.modifier.actionscript.3"
643
+ }
644
+ },
645
+ "match": "(?x) ((\\w+)\\s+)? (namespace) \\s+ (?:[A-Za-z0-9_\\$]+)",
646
+ "name": "meta.namespace_declaration.actionscript.3"
647
+ },
648
+ "numbers": {
649
+ "match": "\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f)?\\b",
650
+ "name": "constant.numeric.actionscript.3"
651
+ },
652
+ "object_literal": {
653
+ "begin": "\\{",
654
+ "end": "\\}",
655
+ "name": "meta.object_literal.actionscript.3",
656
+ "patterns": [
657
+ {
658
+ "include": "#object_literal"
659
+ },
660
+ {
661
+ "include": "#comments"
662
+ },
663
+ {
664
+ "include": "#strings"
665
+ },
666
+ {
667
+ "include": "#regexp"
668
+ },
669
+ {
670
+ "include": "#numbers"
671
+ },
672
+ {
673
+ "include": "#primitive_types"
674
+ },
675
+ {
676
+ "include": "#primitive_error_types"
677
+ },
678
+ {
679
+ "include": "#dynamic_type"
680
+ },
681
+ {
682
+ "include": "#primitive_functions"
683
+ },
684
+ {
685
+ "include": "#language_constants"
686
+ },
687
+ {
688
+ "include": "#language_variables"
689
+ },
690
+ {
691
+ "include": "#guess_type"
692
+ },
693
+ {
694
+ "include": "#guess_constant"
695
+ },
696
+ {
697
+ "include": "#array_access_operators"
698
+ },
699
+ {
700
+ "include": "#vector_creation_operators"
701
+ },
702
+ {
703
+ "include": "#functions"
704
+ }
705
+ ]
706
+ },
707
+ "other_keywords": {
708
+ "match": "\\b(as|delete|in|instanceof|is|native|new|to|typeof)\\b",
709
+ "name": "keyword.other.actionscript.3"
710
+ },
711
+ "other_operators": {
712
+ "match": "(\\.|=)",
713
+ "name": "keyword.operator.actionscript.3"
714
+ },
715
+ "package": {
716
+ "begin": "(^|\\s+)(package)\\b",
717
+ "beginCaptures": {
718
+ "2": {
719
+ "name": "keyword.other.actionscript.3"
720
+ }
721
+ },
722
+ "end": "\\}",
723
+ "name": "meta.package.actionscript.3",
724
+ "patterns": [
725
+ {
726
+ "include": "#package_name"
727
+ },
728
+ {
729
+ "include": "#variable_declaration"
730
+ },
731
+ {
732
+ "include": "#method"
733
+ },
734
+ {
735
+ "include": "#comments"
736
+ },
737
+ {
738
+ "include": "#return_type"
739
+ },
740
+ {
741
+ "include": "#import"
742
+ },
743
+ {
744
+ "include": "#use_namespace"
745
+ },
746
+ {
747
+ "include": "#strings"
748
+ },
749
+ {
750
+ "include": "#numbers"
751
+ },
752
+ {
753
+ "include": "#language_constants"
754
+ },
755
+ {
756
+ "include": "#metadata"
757
+ },
758
+ {
759
+ "include": "#class"
760
+ },
761
+ {
762
+ "include": "#interface"
763
+ },
764
+ {
765
+ "include": "#namespace_declaration"
766
+ }
767
+ ]
768
+ },
769
+ "package_name": {
770
+ "begin": "(?<=package)\\s+([\\w\\._]*)\\b",
771
+ "end": "\\{",
772
+ "name": "meta.package_name.actionscript.3"
773
+ },
774
+ "parameters": {
775
+ "begin": "(\\.\\.\\.)?\\s*([A-Za-z\\_\\$][A-Za-z0-9_\\$]*)(?:\\s*(\\:)\\s*(?:(?:([A-Za-z\\$][A-Za-z0-9_\\$]+(?:\\.[A-Za-z\\$][A-Za-z0-9_\\$]+)*)(?:\\.<([A-Za-z\\$][A-Za-z0-9_\\$]+(?:\\.[A-Za-z\\$][A-Za-z0-9_\\$]+)*)>)?)|(\\*)))?(?:\\s*(=))?",
776
+ "beginCaptures": {
777
+ "1": {
778
+ "name": "keyword.operator.actionscript.3"
779
+ },
780
+ "2": {
781
+ "name": "variable.parameter.actionscript.3"
782
+ },
783
+ "3": {
784
+ "name": "keyword.operator.actionscript.3"
785
+ },
786
+ "4": {
787
+ "name": "support.type.actionscript.3"
788
+ },
789
+ "5": {
790
+ "name": "support.type.actionscript.3"
791
+ },
792
+ "6": {
793
+ "name": "support.type.actionscript.3"
794
+ },
795
+ "7": {
796
+ "name": "keyword.operator.actionscript.3"
797
+ }
798
+ },
799
+ "end": ",|(?=\\))",
800
+ "patterns": [
801
+ {
802
+ "include": "#strings"
803
+ },
804
+ {
805
+ "include": "#numbers"
806
+ },
807
+ {
808
+ "include": "#language_constants"
809
+ },
810
+ {
811
+ "include": "#comments"
812
+ },
813
+ {
814
+ "include": "#primitive_types"
815
+ },
816
+ {
817
+ "include": "#primitive_error_types"
818
+ },
819
+ {
820
+ "include": "#dynamic_type"
821
+ },
822
+ {
823
+ "include": "#guess_type"
824
+ },
825
+ {
826
+ "include": "#guess_constant"
827
+ }
828
+ ]
829
+ },
830
+ "primitive_error_types": {
831
+ "captures": {
832
+ "1": {
833
+ "name": "support.class.error.actionscript.3"
834
+ }
835
+ },
836
+ "match": "\\b((Argument|Definition|Eval|Internal|Range|Reference|Security|Syntax|Type|URI|Verify)?Error)\\b"
837
+ },
838
+ "primitive_functions": {
839
+ "captures": {
840
+ "1": {
841
+ "name": "support.function.actionscript.3"
842
+ }
843
+ },
844
+ "match": "\\b(decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|isFinite|isNaN|isXMLName|parseFloat|parseInt|trace|unescape)(?=\\s*\\()"
845
+ },
846
+ "primitive_types": {
847
+ "captures": {
848
+ "1": {
849
+ "name": "support.class.builtin.actionscript.3"
850
+ }
851
+ },
852
+ "match": "\\b(Array|Boolean|Class|Date|Function|int|JSON|Math|Namespace|Number|Object|QName|RegExp|String|uint|Vector|XML|XMLList|\\*(?<=a))\\b"
853
+ },
854
+ "regexp": {
855
+ "begin": "(?<=[=(:,\\[]|^|return|&&|\\|\\||!)\\s*(/)(?![/*+{}?])",
856
+ "end": "$|(/)[igm]*",
857
+ "name": "string.regex.actionscript.3",
858
+ "patterns": [
859
+ {
860
+ "match": "\\\\.",
861
+ "name": "constant.character.escape.actionscript.3"
862
+ },
863
+ {
864
+ "match": "\\[(\\\\\\]|[^\\]])*\\]",
865
+ "name": "constant.character.class.actionscript.3"
866
+ }
867
+ ]
868
+ },
869
+ "return_type": {
870
+ "captures": {
871
+ "1": {
872
+ "name": "keyword.operator.actionscript.3"
873
+ },
874
+ "2": {
875
+ "name": "support.type.actionscript.3"
876
+ },
877
+ "3": {
878
+ "name": "support.type.actionscript.3"
879
+ },
880
+ "4": {
881
+ "name": "support.type.actionscript.3"
882
+ }
883
+ },
884
+ "match": "(\\:)\\s*(?:([A-Za-z\\$][A-Za-z0-9_\\$]+(?:\\.[A-Za-z\\$][A-Za-z0-9_\\$]+)*)(?:\\.<([A-Za-z\\$][A-Za-z0-9_\\$]+(?:\\.[A-Za-z\\$][A-Za-z0-9_\\$]+)*)>)?)|(\\*)"
885
+ },
886
+ "strings": {
887
+ "patterns": [
888
+ {
889
+ "begin": "\"",
890
+ "end": "\"",
891
+ "name": "string.quoted.double.actionscript.3",
892
+ "patterns": [
893
+ {
894
+ "include": "#escapes"
895
+ }
896
+ ]
897
+ },
898
+ {
899
+ "begin": "'",
900
+ "end": "'",
901
+ "name": "string.quoted.single.actionscript.3",
902
+ "patterns": [
903
+ {
904
+ "include": "#escapes"
905
+ }
906
+ ]
907
+ }
908
+ ]
909
+ },
910
+ "use_namespace": {
911
+ "captures": {
912
+ "2": {
913
+ "name": "keyword.other.actionscript.3"
914
+ },
915
+ "3": {
916
+ "name": "keyword.other.actionscript.3"
917
+ },
918
+ "4": {
919
+ "name": "storage.modifier.actionscript.3"
920
+ }
921
+ },
922
+ "match": "(?x) (^|\\s+|;) (use\\s+)? (namespace) \\s+ (\\w+) \\s* (;|$)"
923
+ },
924
+ "variable_declaration": {
925
+ "captures": {
926
+ "2": {
927
+ "name": "storage.modifier.actionscript.3"
928
+ },
929
+ "4": {
930
+ "name": "storage.modifier.actionscript.3"
931
+ },
932
+ "6": {
933
+ "name": "storage.modifier.actionscript.3"
934
+ },
935
+ "7": {
936
+ "name": "storage.modifier.actionscript.3"
937
+ },
938
+ "8": {
939
+ "name": "keyword.operator.actionscript.3"
940
+ }
941
+ },
942
+ "match": "(?x) ((static)\\s+)? ((\\w+)\\s+)? ((static)\\s+)? (const|var) \\s+ (?:[A-Za-z0-9_\\$]+)(?:\\s*(:))?",
943
+ "name": "meta.variable_declaration.actionscript.3"
944
+ },
945
+ "vector_creation_operators": {
946
+ "match": "(<|>)",
947
+ "name": "keyword.operator.actionscript.3"
948
+ }
949
+ },
950
+ "scopeName": "source.actionscript.3"
951
+ }