tm-grammars 1.7.1 → 1.8.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.
@@ -0,0 +1,2484 @@
1
+ {
2
+ "displayName": "Haxe",
3
+ "fileTypes": [
4
+ "hx",
5
+ "dump"
6
+ ],
7
+ "name": "haxe",
8
+ "patterns": [
9
+ {
10
+ "include": "#all"
11
+ }
12
+ ],
13
+ "repository": {
14
+ "abstract": {
15
+ "begin": "(?=abstract\\s+[A-Z])",
16
+ "end": "(?<=\\})|(;)",
17
+ "endCaptures": {
18
+ "1": {
19
+ "name": "punctuation.terminator.hx"
20
+ }
21
+ },
22
+ "name": "meta.abstract.hx",
23
+ "patterns": [
24
+ {
25
+ "include": "#abstract-name"
26
+ },
27
+ {
28
+ "include": "#abstract-name-post"
29
+ },
30
+ {
31
+ "include": "#abstract-block"
32
+ }
33
+ ]
34
+ },
35
+ "abstract-block": {
36
+ "begin": "(?<=\\{)",
37
+ "end": "(\\})",
38
+ "endCaptures": {
39
+ "1": {
40
+ "name": "punctuation.definition.block.end.hx"
41
+ }
42
+ },
43
+ "name": "meta.block.hx",
44
+ "patterns": [
45
+ {
46
+ "include": "#method"
47
+ },
48
+ {
49
+ "include": "#modifiers"
50
+ },
51
+ {
52
+ "include": "#variable"
53
+ },
54
+ {
55
+ "include": "#block"
56
+ },
57
+ {
58
+ "include": "#block-contents"
59
+ }
60
+ ]
61
+ },
62
+ "abstract-name": {
63
+ "begin": "\\b(abstract)\\b",
64
+ "beginCaptures": {
65
+ "1": {
66
+ "name": "storage.type.class.hx"
67
+ }
68
+ },
69
+ "end": "([_A-Za-z]\\w*)",
70
+ "endCaptures": {
71
+ "1": {
72
+ "name": "entity.name.type.class.hx"
73
+ }
74
+ },
75
+ "patterns": [
76
+ {
77
+ "include": "#global"
78
+ }
79
+ ]
80
+ },
81
+ "abstract-name-post": {
82
+ "begin": "(?<=\\w)",
83
+ "end": "([\\{;])",
84
+ "endCaptures": {
85
+ "1": {
86
+ "name": "punctuation.definition.block.begin.hx"
87
+ }
88
+ },
89
+ "patterns": [
90
+ {
91
+ "include": "#global"
92
+ },
93
+ {
94
+ "match": "\\b(from|to)\\b",
95
+ "name": "keyword.other.hx"
96
+ },
97
+ {
98
+ "include": "#type"
99
+ },
100
+ {
101
+ "match": "[\\(\\)]",
102
+ "name": "punctuation.definition.other.hx"
103
+ }
104
+ ]
105
+ },
106
+ "accessor-method": {
107
+ "patterns": [
108
+ {
109
+ "match": "\\b(get|set)_[_A-Za-z]\\w*\\b",
110
+ "name": "entity.name.function.hx"
111
+ }
112
+ ]
113
+ },
114
+ "all": {
115
+ "patterns": [
116
+ {
117
+ "include": "#global"
118
+ },
119
+ {
120
+ "include": "#package"
121
+ },
122
+ {
123
+ "include": "#import"
124
+ },
125
+ {
126
+ "include": "#using"
127
+ },
128
+ {
129
+ "match": "\\b(final)\\b(?=\\s+(class|interface|extern|private)\\b)",
130
+ "name": "storage.modifier.hx"
131
+ },
132
+ {
133
+ "include": "#abstract"
134
+ },
135
+ {
136
+ "include": "#class"
137
+ },
138
+ {
139
+ "include": "#enum"
140
+ },
141
+ {
142
+ "include": "#interface"
143
+ },
144
+ {
145
+ "include": "#typedef"
146
+ },
147
+ {
148
+ "include": "#block"
149
+ },
150
+ {
151
+ "include": "#block-contents"
152
+ }
153
+ ]
154
+ },
155
+ "array": {
156
+ "begin": "\\[",
157
+ "beginCaptures": {
158
+ "0": {
159
+ "name": "punctuation.definition.array.begin.hx"
160
+ }
161
+ },
162
+ "end": "\\]",
163
+ "endCaptures": {
164
+ "0": {
165
+ "name": "punctuation.definition.array.end.hx"
166
+ }
167
+ },
168
+ "name": "meta.array.literal.hx",
169
+ "patterns": [
170
+ {
171
+ "include": "#block"
172
+ },
173
+ {
174
+ "include": "#block-contents"
175
+ }
176
+ ]
177
+ },
178
+ "arrow-function": {
179
+ "begin": "(\\()(?=[^(]*?\\)\\s*->)",
180
+ "beginCaptures": {
181
+ "1": {
182
+ "name": "punctuation.definition.parameters.begin.hx"
183
+ }
184
+ },
185
+ "end": "(\\))\\s*(->)",
186
+ "endCaptures": {
187
+ "1": {
188
+ "name": "punctuation.definition.parameters.end.hx"
189
+ },
190
+ "2": {
191
+ "name": "storage.type.function.arrow.hx"
192
+ }
193
+ },
194
+ "name": "meta.method.arrow.hx",
195
+ "patterns": [
196
+ {
197
+ "include": "#arrow-function-parameter"
198
+ }
199
+ ]
200
+ },
201
+ "arrow-function-parameter": {
202
+ "begin": "(?<=\\(|,)",
203
+ "end": "(?=\\)|,)",
204
+ "patterns": [
205
+ {
206
+ "include": "#parameter-name"
207
+ },
208
+ {
209
+ "include": "#arrow-function-parameter-type-hint"
210
+ },
211
+ {
212
+ "include": "#parameter-assign"
213
+ },
214
+ {
215
+ "include": "#punctuation-comma"
216
+ },
217
+ {
218
+ "include": "#global"
219
+ }
220
+ ]
221
+ },
222
+ "arrow-function-parameter-type-hint": {
223
+ "begin": ":",
224
+ "beginCaptures": {
225
+ "0": {
226
+ "name": "keyword.operator.type.annotation.hx"
227
+ }
228
+ },
229
+ "end": "(?=\\)|,|=)",
230
+ "patterns": [
231
+ {
232
+ "include": "#type"
233
+ }
234
+ ]
235
+ },
236
+ "block": {
237
+ "begin": "\\{",
238
+ "beginCaptures": {
239
+ "0": {
240
+ "name": "punctuation.definition.block.begin.hx"
241
+ }
242
+ },
243
+ "end": "\\}",
244
+ "endCaptures": {
245
+ "0": {
246
+ "name": "punctuation.definition.block.end.hx"
247
+ }
248
+ },
249
+ "patterns": [
250
+ {
251
+ "include": "#block"
252
+ },
253
+ {
254
+ "include": "#block-contents"
255
+ }
256
+ ]
257
+ },
258
+ "block-contents": {
259
+ "patterns": [
260
+ {
261
+ "include": "#global"
262
+ },
263
+ {
264
+ "include": "#regex"
265
+ },
266
+ {
267
+ "include": "#array"
268
+ },
269
+ {
270
+ "include": "#constants"
271
+ },
272
+ {
273
+ "include": "#strings"
274
+ },
275
+ {
276
+ "include": "#metadata"
277
+ },
278
+ {
279
+ "include": "#method"
280
+ },
281
+ {
282
+ "include": "#variable"
283
+ },
284
+ {
285
+ "include": "#modifiers"
286
+ },
287
+ {
288
+ "include": "#new-expr"
289
+ },
290
+ {
291
+ "include": "#for-loop"
292
+ },
293
+ {
294
+ "include": "#keywords"
295
+ },
296
+ {
297
+ "include": "#arrow-function"
298
+ },
299
+ {
300
+ "include": "#method-call"
301
+ },
302
+ {
303
+ "include": "#enum-constructor-call"
304
+ },
305
+ {
306
+ "include": "#punctuation-braces"
307
+ },
308
+ {
309
+ "include": "#macro-reification"
310
+ },
311
+ {
312
+ "include": "#operators"
313
+ },
314
+ {
315
+ "include": "#operator-assignment"
316
+ },
317
+ {
318
+ "include": "#punctuation-terminator"
319
+ },
320
+ {
321
+ "include": "#punctuation-comma"
322
+ },
323
+ {
324
+ "include": "#punctuation-accessor"
325
+ },
326
+ {
327
+ "include": "#identifiers"
328
+ }
329
+ ]
330
+ },
331
+ "class": {
332
+ "begin": "(?=class)",
333
+ "end": "(?<=\\})|(;)",
334
+ "endCaptures": {
335
+ "1": {
336
+ "name": "punctuation.terminator.hx"
337
+ }
338
+ },
339
+ "name": "meta.class.hx",
340
+ "patterns": [
341
+ {
342
+ "include": "#class-name"
343
+ },
344
+ {
345
+ "include": "#class-name-post"
346
+ },
347
+ {
348
+ "include": "#class-block"
349
+ }
350
+ ]
351
+ },
352
+ "class-block": {
353
+ "begin": "(?<=\\{)",
354
+ "end": "(\\})",
355
+ "endCaptures": {
356
+ "1": {
357
+ "name": "punctuation.definition.block.end.hx"
358
+ }
359
+ },
360
+ "name": "meta.block.hx",
361
+ "patterns": [
362
+ {
363
+ "include": "#method"
364
+ },
365
+ {
366
+ "include": "#modifiers"
367
+ },
368
+ {
369
+ "include": "#variable"
370
+ },
371
+ {
372
+ "include": "#block"
373
+ },
374
+ {
375
+ "include": "#block-contents"
376
+ }
377
+ ]
378
+ },
379
+ "class-name": {
380
+ "begin": "\\b(class)\\b",
381
+ "beginCaptures": {
382
+ "1": {
383
+ "name": "storage.type.class.hx"
384
+ }
385
+ },
386
+ "end": "([_A-Za-z]\\w*)",
387
+ "endCaptures": {
388
+ "1": {
389
+ "name": "entity.name.type.class.hx"
390
+ }
391
+ },
392
+ "name": "meta.class.identifier.hx",
393
+ "patterns": [
394
+ {
395
+ "include": "#global"
396
+ }
397
+ ]
398
+ },
399
+ "class-name-post": {
400
+ "begin": "(?<=\\w)",
401
+ "end": "([\\{;])",
402
+ "endCaptures": {
403
+ "1": {
404
+ "name": "punctuation.definition.block.begin.hx"
405
+ }
406
+ },
407
+ "patterns": [
408
+ {
409
+ "include": "#modifiers-inheritance"
410
+ },
411
+ {
412
+ "include": "#type"
413
+ }
414
+ ]
415
+ },
416
+ "comments": {
417
+ "patterns": [
418
+ {
419
+ "begin": "/\\*\\*(?!/)",
420
+ "beginCaptures": {
421
+ "0": {
422
+ "name": "punctuation.definition.comment.hx"
423
+ }
424
+ },
425
+ "end": "\\*/",
426
+ "endCaptures": {
427
+ "0": {
428
+ "name": "punctuation.definition.comment.hx"
429
+ }
430
+ },
431
+ "name": "comment.block.documentation.hx",
432
+ "patterns": [
433
+ {
434
+ "include": "#javadoc-tags"
435
+ }
436
+ ]
437
+ },
438
+ {
439
+ "begin": "/\\*",
440
+ "beginCaptures": {
441
+ "0": {
442
+ "name": "punctuation.definition.comment.hx"
443
+ }
444
+ },
445
+ "end": "\\*/",
446
+ "endCaptures": {
447
+ "0": {
448
+ "name": "punctuation.definition.comment.hx"
449
+ }
450
+ },
451
+ "name": "comment.block.hx",
452
+ "patterns": [
453
+ {
454
+ "include": "#javadoc-tags"
455
+ }
456
+ ]
457
+ },
458
+ {
459
+ "captures": {
460
+ "1": {
461
+ "name": "punctuation.definition.comment.hx"
462
+ }
463
+ },
464
+ "match": "(//).*$\\n?",
465
+ "name": "comment.line.double-slash.hx"
466
+ }
467
+ ]
468
+ },
469
+ "conditional-compilation": {
470
+ "patterns": [
471
+ {
472
+ "captures": {
473
+ "0": {
474
+ "name": "punctuation.definition.tag"
475
+ }
476
+ },
477
+ "match": "((#(if|elseif))[\\s!]+([a-zA-Z_][a-zA-Z0-9_]*(\\.[a-zA-Z_][a-zA-Z0-9_]*)*)(?=\\s|/\\*|//))"
478
+ },
479
+ {
480
+ "begin": "((#(if|elseif))[\\s!]*)(?=\\()",
481
+ "beginCaptures": {
482
+ "0": {
483
+ "name": "punctuation.definition.tag"
484
+ }
485
+ },
486
+ "end": "(?<=\\)|\\n)",
487
+ "endCaptures": {
488
+ "0": {
489
+ "name": "punctuation.definition.tag"
490
+ }
491
+ },
492
+ "name": "punctuation.definition.tag",
493
+ "patterns": [
494
+ {
495
+ "include": "#conditional-compilation-parens"
496
+ }
497
+ ]
498
+ },
499
+ {
500
+ "match": "(#(end|else|error|line))",
501
+ "name": "punctuation.definition.tag"
502
+ },
503
+ {
504
+ "match": "(#([a-zA-Z0-9_]*))\\s",
505
+ "name": "punctuation.definition.tag"
506
+ }
507
+ ]
508
+ },
509
+ "conditional-compilation-parens": {
510
+ "begin": "\\(",
511
+ "end": "\\)",
512
+ "patterns": [
513
+ {
514
+ "include": "#conditional-compilation-parens"
515
+ }
516
+ ]
517
+ },
518
+ "constant-name": {
519
+ "match": "\\b([_A-Z][_A-Z0-9]*)\\b",
520
+ "name": "variable.other.hx"
521
+ },
522
+ "constants": {
523
+ "patterns": [
524
+ {
525
+ "match": "\\b(true|false|null)\\b",
526
+ "name": "constant.language.hx"
527
+ },
528
+ {
529
+ "captures": {
530
+ "0": {
531
+ "name": "constant.numeric.hex.hx"
532
+ },
533
+ "1": {
534
+ "name": "constant.numeric.suffix.hx"
535
+ }
536
+ },
537
+ "match": "\\b(?:0[xX][0-9a-fA-F][_0-9a-fA-F]*([iu][0-9][0-9_]*)?)\\b"
538
+ },
539
+ {
540
+ "captures": {
541
+ "0": {
542
+ "name": "constant.numeric.bin.hx"
543
+ },
544
+ "1": {
545
+ "name": "constant.numeric.suffix.hx"
546
+ }
547
+ },
548
+ "match": "\\b(?:0[bB][01][_01]*([iu][0-9][0-9_]*)?)\\b"
549
+ },
550
+ {
551
+ "captures": {
552
+ "0": {
553
+ "name": "constant.numeric.decimal.hx"
554
+ },
555
+ "1": {
556
+ "name": "meta.delimiter.decimal.period.hx"
557
+ },
558
+ "10": {
559
+ "name": "meta.delimiter.decimal.period.hx"
560
+ },
561
+ "11": {
562
+ "name": "constant.numeric.suffix.hx"
563
+ },
564
+ "12": {
565
+ "name": "meta.delimiter.decimal.period.hx"
566
+ },
567
+ "13": {
568
+ "name": "constant.numeric.suffix.hx"
569
+ },
570
+ "14": {
571
+ "name": "constant.numeric.suffix.hx"
572
+ },
573
+ "2": {
574
+ "name": "constant.numeric.suffix.hx"
575
+ },
576
+ "3": {
577
+ "name": "meta.delimiter.decimal.period.hx"
578
+ },
579
+ "4": {
580
+ "name": "constant.numeric.suffix.hx"
581
+ },
582
+ "5": {
583
+ "name": "meta.delimiter.decimal.period.hx"
584
+ },
585
+ "6": {
586
+ "name": "constant.numeric.suffix.hx"
587
+ },
588
+ "7": {
589
+ "name": "constant.numeric.suffix.hx"
590
+ },
591
+ "8": {
592
+ "name": "meta.delimiter.decimal.period.hx"
593
+ },
594
+ "9": {
595
+ "name": "constant.numeric.suffix.hx"
596
+ }
597
+ },
598
+ "match": "(?x)\n(?<!\\$)(?:\n(?:\\b[0-9][0-9_]*(\\.)[0-9_]+[eE][+-]?[0-9_]+([fiu][0-9][0-9_]*)?\\b)|\n(?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9_]+([fiu][0-9][0-9_]*)?\\b)|\n(?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9_]+([fiu][0-9][0-9_]*)?\\b)|\n(?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*([fiu][0-9][0-9_]*)?\\b)|\n(?:\\b[0-9][0-9_]*(\\.)[0-9_]+([fiu][0-9][0-9_]*)?\\b)|\n(?:\\b[0-9][0-9_]*(\\.)(?!\\.)(?:\\B|([fiu][0-9][0-9_]*)\\b))|\n(?:\\B(\\.)[0-9][0-9_]*([fiu][0-9][0-9_]*)?\\b)|\n(?:\\b[0-9][0-9_]*([fiu][0-9][0-9_]*)?\\b)\n)(?!\\$)"
599
+ }
600
+ ]
601
+ },
602
+ "enum": {
603
+ "begin": "(?=enum\\s+[A-Z])",
604
+ "end": "(?<=\\})|(;)",
605
+ "endCaptures": {
606
+ "1": {
607
+ "name": "punctuation.terminator.hx"
608
+ }
609
+ },
610
+ "name": "meta.enum.hx",
611
+ "patterns": [
612
+ {
613
+ "include": "#enum-name"
614
+ },
615
+ {
616
+ "include": "#enum-name-post"
617
+ },
618
+ {
619
+ "include": "#enum-block"
620
+ }
621
+ ]
622
+ },
623
+ "enum-block": {
624
+ "begin": "(?<=\\{)",
625
+ "end": "(\\})",
626
+ "endCaptures": {
627
+ "1": {
628
+ "name": "punctuation.definition.block.end.hx"
629
+ }
630
+ },
631
+ "name": "meta.block.hx",
632
+ "patterns": [
633
+ {
634
+ "include": "#global"
635
+ },
636
+ {
637
+ "include": "#metadata"
638
+ },
639
+ {
640
+ "include": "#parameters"
641
+ },
642
+ {
643
+ "include": "#identifiers"
644
+ }
645
+ ]
646
+ },
647
+ "enum-constructor-call": {
648
+ "begin": "\\b(?<!\\.)((_*[a-z]\\w*\\.)*)(_*[A-Z]\\w*)(?:(\\.)(_*[A-Z]\\w*[a-z]\\w*))*\\s*(\\()",
649
+ "beginCaptures": {
650
+ "1": {
651
+ "name": "support.package.hx"
652
+ },
653
+ "3": {
654
+ "name": "entity.name.type.hx"
655
+ },
656
+ "4": {
657
+ "name": "support.package.hx"
658
+ },
659
+ "5": {
660
+ "name": "entity.name.type.hx"
661
+ },
662
+ "6": {
663
+ "name": "meta.brace.round.hx"
664
+ }
665
+ },
666
+ "end": "(\\))",
667
+ "endCaptures": {
668
+ "1": {
669
+ "name": "meta.brace.round.hx"
670
+ }
671
+ },
672
+ "patterns": [
673
+ {
674
+ "include": "#block"
675
+ },
676
+ {
677
+ "include": "#block-contents"
678
+ }
679
+ ]
680
+ },
681
+ "enum-name": {
682
+ "begin": "\\b(enum)\\b",
683
+ "beginCaptures": {
684
+ "1": {
685
+ "name": "storage.type.class.hx"
686
+ }
687
+ },
688
+ "end": "([_A-Za-z]\\w*)",
689
+ "endCaptures": {
690
+ "1": {
691
+ "name": "entity.name.type.class.hx"
692
+ }
693
+ },
694
+ "patterns": [
695
+ {
696
+ "include": "#global"
697
+ }
698
+ ]
699
+ },
700
+ "enum-name-post": {
701
+ "begin": "(?<=\\w)",
702
+ "end": "([\\{;])",
703
+ "endCaptures": {
704
+ "1": {
705
+ "name": "punctuation.definition.block.begin.hx"
706
+ }
707
+ },
708
+ "patterns": [
709
+ {
710
+ "include": "#type"
711
+ }
712
+ ]
713
+ },
714
+ "for-loop": {
715
+ "begin": "\\b(for)\\b\\s*(\\()",
716
+ "beginCaptures": {
717
+ "1": {
718
+ "name": "keyword.control.flow-control.hx"
719
+ },
720
+ "2": {
721
+ "name": "meta.brace.round.hx"
722
+ }
723
+ },
724
+ "end": "(\\))",
725
+ "endCaptures": {
726
+ "1": {
727
+ "name": "meta.brace.round.hx"
728
+ }
729
+ },
730
+ "patterns": [
731
+ {
732
+ "match": "\\b(in)\\b",
733
+ "name": "keyword.other.in.hx"
734
+ },
735
+ {
736
+ "include": "#block"
737
+ },
738
+ {
739
+ "include": "#block-contents"
740
+ }
741
+ ]
742
+ },
743
+ "function-type": {
744
+ "begin": "\\(",
745
+ "beginCaptures": {
746
+ "0": {
747
+ "name": "punctuation.definition.parameters.begin.hx"
748
+ }
749
+ },
750
+ "end": "\\)",
751
+ "endCaptures": {
752
+ "0": {
753
+ "name": "punctuation.definition.parameters.end.hx"
754
+ }
755
+ },
756
+ "patterns": [
757
+ {
758
+ "include": "#function-type-parameter"
759
+ }
760
+ ]
761
+ },
762
+ "function-type-parameter": {
763
+ "begin": "(?<=\\(|,)",
764
+ "end": "(?=\\)|,)",
765
+ "patterns": [
766
+ {
767
+ "include": "#global"
768
+ },
769
+ {
770
+ "include": "#metadata"
771
+ },
772
+ {
773
+ "include": "#operator-optional"
774
+ },
775
+ {
776
+ "include": "#punctuation-comma"
777
+ },
778
+ {
779
+ "include": "#function-type-parameter-name"
780
+ },
781
+ {
782
+ "include": "#function-type-parameter-type-hint"
783
+ },
784
+ {
785
+ "include": "#parameter-assign"
786
+ },
787
+ {
788
+ "include": "#type"
789
+ },
790
+ {
791
+ "include": "#global"
792
+ }
793
+ ]
794
+ },
795
+ "function-type-parameter-name": {
796
+ "captures": {
797
+ "1": {
798
+ "name": "variable.parameter.hx"
799
+ }
800
+ },
801
+ "match": "([_a-zA-Z]\\w*)(?=\\s*:)"
802
+ },
803
+ "function-type-parameter-type-hint": {
804
+ "begin": ":",
805
+ "beginCaptures": {
806
+ "0": {
807
+ "name": "keyword.operator.type.annotation.hx"
808
+ }
809
+ },
810
+ "end": "(?=\\)|,|=)",
811
+ "patterns": [
812
+ {
813
+ "include": "#type"
814
+ }
815
+ ]
816
+ },
817
+ "global": {
818
+ "patterns": [
819
+ {
820
+ "include": "#comments"
821
+ },
822
+ {
823
+ "include": "#conditional-compilation"
824
+ }
825
+ ]
826
+ },
827
+ "identifier-name": {
828
+ "match": "\\b([_A-Za-z]\\w*)\\b",
829
+ "name": "variable.other.hx"
830
+ },
831
+ "identifiers": {
832
+ "patterns": [
833
+ {
834
+ "include": "#constant-name"
835
+ },
836
+ {
837
+ "include": "#type-name"
838
+ },
839
+ {
840
+ "include": "#identifier-name"
841
+ }
842
+ ]
843
+ },
844
+ "import": {
845
+ "begin": "import\\b",
846
+ "beginCaptures": {
847
+ "0": {
848
+ "name": "keyword.control.import.hx"
849
+ }
850
+ },
851
+ "end": "$|(;)",
852
+ "endCaptures": {
853
+ "1": {
854
+ "name": "punctuation.terminator.hx"
855
+ }
856
+ },
857
+ "patterns": [
858
+ {
859
+ "include": "#type-path"
860
+ },
861
+ {
862
+ "match": "\\b(as)\\b",
863
+ "name": "keyword.control.as.hx"
864
+ },
865
+ {
866
+ "match": "\\b(in)\\b",
867
+ "name": "keyword.control.in.hx"
868
+ },
869
+ {
870
+ "match": "\\*",
871
+ "name": "constant.language.import-all.hx"
872
+ },
873
+ {
874
+ "match": "\\b([_A-Za-z]\\w*)\\b(?=\\s*(as|in|$|(;)))",
875
+ "name": "variable.other.hxt"
876
+ },
877
+ {
878
+ "include": "#type-path-package-name"
879
+ }
880
+ ]
881
+ },
882
+ "interface": {
883
+ "begin": "(?=interface)",
884
+ "end": "(?<=\\})|(;)",
885
+ "endCaptures": {
886
+ "1": {
887
+ "name": "punctuation.terminator.hx"
888
+ }
889
+ },
890
+ "name": "meta.interface.hx",
891
+ "patterns": [
892
+ {
893
+ "include": "#interface-name"
894
+ },
895
+ {
896
+ "include": "#interface-name-post"
897
+ },
898
+ {
899
+ "include": "#interface-block"
900
+ }
901
+ ]
902
+ },
903
+ "interface-block": {
904
+ "begin": "(?<=\\{)",
905
+ "end": "(\\})",
906
+ "endCaptures": {
907
+ "1": {
908
+ "name": "punctuation.definition.block.end.hx"
909
+ }
910
+ },
911
+ "name": "meta.block.hx",
912
+ "patterns": [
913
+ {
914
+ "include": "#method"
915
+ },
916
+ {
917
+ "include": "#variable"
918
+ },
919
+ {
920
+ "include": "#block"
921
+ },
922
+ {
923
+ "include": "#block-contents"
924
+ }
925
+ ]
926
+ },
927
+ "interface-name": {
928
+ "begin": "\\b(interface)\\b",
929
+ "beginCaptures": {
930
+ "1": {
931
+ "name": "storage.type.class.hx"
932
+ }
933
+ },
934
+ "end": "([_A-Za-z]\\w*)",
935
+ "endCaptures": {
936
+ "1": {
937
+ "name": "entity.name.type.class.hx"
938
+ }
939
+ },
940
+ "patterns": [
941
+ {
942
+ "include": "#global"
943
+ }
944
+ ]
945
+ },
946
+ "interface-name-post": {
947
+ "begin": "(?<=\\w)",
948
+ "end": "([\\{;])",
949
+ "endCaptures": {
950
+ "1": {
951
+ "name": "punctuation.definition.block.begin.hx"
952
+ }
953
+ },
954
+ "patterns": [
955
+ {
956
+ "include": "#global"
957
+ },
958
+ {
959
+ "include": "#modifiers-inheritance"
960
+ },
961
+ {
962
+ "include": "#type"
963
+ }
964
+ ]
965
+ },
966
+ "javadoc-tags": {
967
+ "patterns": [
968
+ {
969
+ "captures": {
970
+ "1": {
971
+ "name": "storage.type.class.javadoc"
972
+ },
973
+ "2": {
974
+ "name": "variable.other.javadoc"
975
+ }
976
+ },
977
+ "match": "(@(?:param|exception|throws|event))\\s+([_A-Za-z]\\w*)\\s+"
978
+ },
979
+ {
980
+ "captures": {
981
+ "1": {
982
+ "name": "storage.type.class.javadoc"
983
+ },
984
+ "2": {
985
+ "name": "constant.numeric.javadoc"
986
+ }
987
+ },
988
+ "match": "(@since)\\s+([\\w\\.-]+)\\s+"
989
+ },
990
+ {
991
+ "captures": {
992
+ "0": {
993
+ "name": "storage.type.class.javadoc"
994
+ }
995
+ },
996
+ "match": "@(param|exception|throws|deprecated|returns?|since|default|see|event)"
997
+ }
998
+ ]
999
+ },
1000
+ "keywords": {
1001
+ "patterns": [
1002
+ {
1003
+ "begin": "(?<=trace|$type|if|while|for|super)\\s*(\\()",
1004
+ "beginCaptures": {
1005
+ "2": {
1006
+ "name": "meta.brace.round.hx"
1007
+ }
1008
+ },
1009
+ "end": "\\)",
1010
+ "endCaptures": {
1011
+ "0": {
1012
+ "name": "meta.brace.round.hx"
1013
+ }
1014
+ },
1015
+ "patterns": [
1016
+ {
1017
+ "include": "#block-contents"
1018
+ }
1019
+ ]
1020
+ },
1021
+ {
1022
+ "begin": "(?<=catch)\\s*(\\()",
1023
+ "beginCaptures": {
1024
+ "2": {
1025
+ "name": "meta.brace.round.hx"
1026
+ }
1027
+ },
1028
+ "end": "\\)",
1029
+ "endCaptures": {
1030
+ "0": {
1031
+ "name": "meta.brace.round.hx"
1032
+ }
1033
+ },
1034
+ "patterns": [
1035
+ {
1036
+ "include": "#block-contents"
1037
+ },
1038
+ {
1039
+ "include": "#type-check"
1040
+ }
1041
+ ]
1042
+ },
1043
+ {
1044
+ "begin": "(?<=cast)\\s*(\\()",
1045
+ "beginCaptures": {
1046
+ "2": {
1047
+ "name": "meta.brace.round.hx"
1048
+ }
1049
+ },
1050
+ "end": "\\)",
1051
+ "endCaptures": {
1052
+ "0": {
1053
+ "name": "meta.brace.round.hx"
1054
+ }
1055
+ },
1056
+ "patterns": [
1057
+ {
1058
+ "begin": "(?=,)",
1059
+ "end": "(?=\\))",
1060
+ "patterns": [
1061
+ {
1062
+ "include": "#type"
1063
+ }
1064
+ ]
1065
+ },
1066
+ {
1067
+ "include": "#block-contents"
1068
+ }
1069
+ ]
1070
+ },
1071
+ {
1072
+ "match": "\\b(try|catch|throw)\\b",
1073
+ "name": "keyword.control.catch-exception.hx"
1074
+ },
1075
+ {
1076
+ "begin": "\\b(case|default)\\b",
1077
+ "beginCaptures": {
1078
+ "1": {
1079
+ "name": "keyword.control.flow-control.hx"
1080
+ }
1081
+ },
1082
+ "end": ":|(?=if)|$",
1083
+ "patterns": [
1084
+ {
1085
+ "include": "#global"
1086
+ },
1087
+ {
1088
+ "include": "#metadata"
1089
+ },
1090
+ {
1091
+ "captures": {
1092
+ "1": {
1093
+ "name": "storage.type.variable.hx"
1094
+ },
1095
+ "2": {
1096
+ "name": "variable.other.hx"
1097
+ }
1098
+ },
1099
+ "match": "\\b(var|final)\\b\\s*([_a-zA-Z]\\w*)\\b"
1100
+ },
1101
+ {
1102
+ "include": "#array"
1103
+ },
1104
+ {
1105
+ "include": "#constants"
1106
+ },
1107
+ {
1108
+ "include": "#strings"
1109
+ },
1110
+ {
1111
+ "match": "\\(",
1112
+ "name": "meta.brace.round.hx"
1113
+ },
1114
+ {
1115
+ "match": "\\)",
1116
+ "name": "meta.brace.round.hx"
1117
+ },
1118
+ {
1119
+ "include": "#macro-reification"
1120
+ },
1121
+ {
1122
+ "match": "=>",
1123
+ "name": "keyword.operator.extractor.hx"
1124
+ },
1125
+ {
1126
+ "include": "#operator-assignment"
1127
+ },
1128
+ {
1129
+ "include": "#punctuation-comma"
1130
+ },
1131
+ {
1132
+ "include": "#keywords"
1133
+ },
1134
+ {
1135
+ "include": "#method-call"
1136
+ },
1137
+ {
1138
+ "include": "#identifiers"
1139
+ }
1140
+ ]
1141
+ },
1142
+ {
1143
+ "match": "\\b(if|else|return|do|while|for|break|continue|switch|case|default)\\b",
1144
+ "name": "keyword.control.flow-control.hx"
1145
+ },
1146
+ {
1147
+ "match": "\\b(cast|untyped)\\b",
1148
+ "name": "keyword.other.untyped.hx"
1149
+ },
1150
+ {
1151
+ "match": "\\btrace\\b",
1152
+ "name": "keyword.other.trace.hx"
1153
+ },
1154
+ {
1155
+ "match": "\\$type\\b",
1156
+ "name": "keyword.other.type.hx"
1157
+ },
1158
+ {
1159
+ "match": "\\__(global|this)__\\b",
1160
+ "name": "keyword.other.untyped-property.hx"
1161
+ },
1162
+ {
1163
+ "match": "\\b(this|super)\\b",
1164
+ "name": "variable.language.hx"
1165
+ },
1166
+ {
1167
+ "match": "\\bnew\\b",
1168
+ "name": "keyword.operator.new.hx"
1169
+ },
1170
+ {
1171
+ "match": "\\b(abstract|class|enum|interface|typedef)\\b",
1172
+ "name": "storage.type.hx"
1173
+ },
1174
+ {
1175
+ "match": "->",
1176
+ "name": "storage.type.function.arrow.hx"
1177
+ },
1178
+ {
1179
+ "include": "#modifiers"
1180
+ },
1181
+ {
1182
+ "include": "#modifiers-inheritance"
1183
+ }
1184
+ ]
1185
+ },
1186
+ "keywords-accessor": {
1187
+ "match": "\\b(default|get|set|dynamic|never|null)\\b",
1188
+ "name": "storage.type.property.hx"
1189
+ },
1190
+ "macro-reification": {
1191
+ "patterns": [
1192
+ {
1193
+ "captures": {
1194
+ "1": {
1195
+ "name": "punctuation.definition.reification.hx"
1196
+ },
1197
+ "2": {
1198
+ "name": "keyword.reification.hx"
1199
+ }
1200
+ },
1201
+ "match": "(\\$)([eabipv])\\{"
1202
+ },
1203
+ {
1204
+ "captures": {
1205
+ "2": {
1206
+ "name": "punctuation.definition.reification.hx"
1207
+ },
1208
+ "3": {
1209
+ "name": "variable.reification.hx"
1210
+ }
1211
+ },
1212
+ "match": "((\\$)([a-zA-Z]*))"
1213
+ }
1214
+ ]
1215
+ },
1216
+ "metadata": {
1217
+ "patterns": [
1218
+ {
1219
+ "begin": "(@)(:(abi|abstract|access|allow|analyzer|annotation|arrayAccess|astSource|autoBuild|bind|bitmap|bridgeProperties|build|buildXml|bypassAccessor|callable|classCode|commutative|compilerGenerated|const|coreApi|coreType|cppFileCode|cppInclude|cppNamespaceCode|cs.assemblyMeta|cs.assemblyStrict|cs.using|dce|debug|decl|delegate|depend|deprecated|eager|enum|event|expose|extern|file|fileXml|final|fixed|flash.property|font|forward.new|forward.variance|forward|forwardStatics|from|functionCode|functionTailCode|generic|genericBuild|genericClassPerMethod|getter|hack|headerClassCode|headerCode|headerInclude|headerNamespaceCode|hlNative|hxGen|ifFeature|include|inheritDoc|inline|internal|isVar|java.native|javaCanonical|jsRequire|jvm.synthetic|keep|keepInit|keepSub|luaDotMethod|luaRequire|macro|markup|mergeBlock|multiReturn|multiType|native|nativeChildren|nativeGen|nativeProperty|nativeStaticExtension|noClosure|noCompletion|noDebug|noDoc|noImportGlobal|noPrivateAccess|noStack|noUsing|nonVirtual|notNull|nullSafety|objc|objcProtocol|op|optional|overload|persistent|phpClassConst|phpGlobal|phpMagic|phpNoConstructor|pos|private|privateAccess|property|protected|publicFields|pure|pythonImport|readOnly|remove|require|resolve|rtti|runtimeValue|scalar|selfCall|semantics|setter|sound|sourceFile|stackOnly|strict|struct|structAccess|structInit|suppressWarnings|templatedCall|throws|to|transient|transitive|unifyMinDynamic|unreflective|unsafe|using|void|volatile)\\b)\\s*(\\()",
1220
+ "beginCaptures": {
1221
+ "1": {
1222
+ "name": "punctuation.metadata.hx"
1223
+ },
1224
+ "2": {
1225
+ "name": "storage.modifier.metadata.hx"
1226
+ },
1227
+ "3": {
1228
+ "name": "meta.brace.round.hx"
1229
+ }
1230
+ },
1231
+ "end": "\\)",
1232
+ "endCaptures": {
1233
+ "0": {
1234
+ "name": "meta.brace.round.hx"
1235
+ }
1236
+ },
1237
+ "patterns": [
1238
+ {
1239
+ "include": "#block-contents"
1240
+ }
1241
+ ]
1242
+ },
1243
+ {
1244
+ "captures": {
1245
+ "2": {
1246
+ "name": "punctuation.metadata.hx"
1247
+ },
1248
+ "3": {
1249
+ "name": "storage.modifier.metadata.hx"
1250
+ }
1251
+ },
1252
+ "match": "((@)(:(abi|abstract|access|allow|analyzer|annotation|arrayAccess|astSource|autoBuild|bind|bitmap|bridgeProperties|build|buildXml|bypassAccessor|callable|classCode|commutative|compilerGenerated|const|coreApi|coreType|cppFileCode|cppInclude|cppNamespaceCode|cs.assemblyMeta|cs.assemblyStrict|cs.using|dce|debug|decl|delegate|depend|deprecated|eager|enum|event|expose|extern|file|fileXml|final|fixed|flash.property|font|forward.new|forward.variance|forward|forwardStatics|from|functionCode|functionTailCode|generic|genericBuild|genericClassPerMethod|getter|hack|headerClassCode|headerCode|headerInclude|headerNamespaceCode|hlNative|hxGen|ifFeature|include|inheritDoc|inline|internal|isVar|java.native|javaCanonical|jsRequire|jvm.synthetic|keep|keepInit|keepSub|luaDotMethod|luaRequire|macro|markup|mergeBlock|multiReturn|multiType|native|nativeChildren|nativeGen|nativeProperty|nativeStaticExtension|noClosure|noCompletion|noDebug|noDoc|noImportGlobal|noPrivateAccess|noStack|noUsing|nonVirtual|notNull|nullSafety|objc|objcProtocol|op|optional|overload|persistent|phpClassConst|phpGlobal|phpMagic|phpNoConstructor|pos|private|privateAccess|property|protected|publicFields|pure|pythonImport|readOnly|remove|require|resolve|rtti|runtimeValue|scalar|selfCall|semantics|setter|sound|sourceFile|stackOnly|strict|struct|structAccess|structInit|suppressWarnings|templatedCall|throws|to|transient|transitive|unifyMinDynamic|unreflective|unsafe|using|void|volatile)\\b))"
1253
+ },
1254
+ {
1255
+ "begin": "(@)(:?[a-zA-Z_]*)\\s*(\\()",
1256
+ "beginCaptures": {
1257
+ "1": {
1258
+ "name": "punctuation.metadata.hx"
1259
+ },
1260
+ "2": {
1261
+ "name": "variable.metadata.hx"
1262
+ },
1263
+ "3": {
1264
+ "name": "meta.brace.round.hx"
1265
+ }
1266
+ },
1267
+ "end": "\\)",
1268
+ "endCaptures": {
1269
+ "0": {
1270
+ "name": "meta.brace.round.hx"
1271
+ }
1272
+ },
1273
+ "patterns": [
1274
+ {
1275
+ "include": "#block-contents"
1276
+ }
1277
+ ]
1278
+ },
1279
+ {
1280
+ "captures": {
1281
+ "1": {
1282
+ "name": "punctuation.metadata.hx"
1283
+ },
1284
+ "2": {
1285
+ "name": "variable.metadata.hx"
1286
+ },
1287
+ "3": {
1288
+ "name": "variable.metadata.hx"
1289
+ },
1290
+ "4": {
1291
+ "name": "punctuation.accessor.hx"
1292
+ },
1293
+ "5": {
1294
+ "name": "variable.metadata.hx"
1295
+ }
1296
+ },
1297
+ "match": "(@)(:?)([a-zA-Z_]*(\\.))*([a-zA-Z_]*)?"
1298
+ }
1299
+ ]
1300
+ },
1301
+ "method": {
1302
+ "begin": "(?=\\bfunction\\b)",
1303
+ "end": "(?<=[\\};])",
1304
+ "name": "meta.method.hx",
1305
+ "patterns": [
1306
+ {
1307
+ "include": "#macro-reification"
1308
+ },
1309
+ {
1310
+ "include": "#method-name"
1311
+ },
1312
+ {
1313
+ "include": "#method-name-post"
1314
+ },
1315
+ {
1316
+ "include": "#method-block"
1317
+ }
1318
+ ]
1319
+ },
1320
+ "method-block": {
1321
+ "begin": "(?<=\\{)",
1322
+ "beginCaptures": {
1323
+ "1": {
1324
+ "name": "punctuation.definition.block.begin.hx"
1325
+ }
1326
+ },
1327
+ "end": "(\\})",
1328
+ "endCaptures": {
1329
+ "1": {
1330
+ "name": "punctuation.definition.block.end.hx"
1331
+ }
1332
+ },
1333
+ "name": "meta.method.block.hx",
1334
+ "patterns": [
1335
+ {
1336
+ "include": "#block"
1337
+ },
1338
+ {
1339
+ "include": "#block-contents"
1340
+ }
1341
+ ]
1342
+ },
1343
+ "method-call": {
1344
+ "begin": "\\b(?:(__(?:addressOf|as|call|checked|cpp|cs|define_feature|delete|feature|field|fixed|foreach|forin|has_next|hkeys|in|int|is|java|js|keys|lock|lua|lua_table|new|php|physeq|prefix|ptr|resources|rethrow|set|setfield|sizeof|type|typeof|unprotect|unsafe|valueOf|var|vector|vmem_get|vmem_set|vmem_sign|instanceof|strict_eq|strict_neq)__)|([_a-z]\\w*))\\s*(\\()",
1345
+ "beginCaptures": {
1346
+ "1": {
1347
+ "name": "keyword.other.untyped-function.hx"
1348
+ },
1349
+ "2": {
1350
+ "name": "entity.name.function.hx"
1351
+ },
1352
+ "3": {
1353
+ "name": "meta.brace.round.hx"
1354
+ }
1355
+ },
1356
+ "end": "(\\))",
1357
+ "endCaptures": {
1358
+ "1": {
1359
+ "name": "meta.brace.round.hx"
1360
+ }
1361
+ },
1362
+ "patterns": [
1363
+ {
1364
+ "include": "#block"
1365
+ },
1366
+ {
1367
+ "include": "#block-contents"
1368
+ }
1369
+ ]
1370
+ },
1371
+ "method-name": {
1372
+ "begin": "\\b(function)\\b\\s*\\b(?:(new)|([_A-Za-z]\\w*))?\\b",
1373
+ "beginCaptures": {
1374
+ "1": {
1375
+ "name": "storage.type.function.hx"
1376
+ },
1377
+ "2": {
1378
+ "name": "storage.type.hx"
1379
+ },
1380
+ "3": {
1381
+ "name": "entity.name.function.hx"
1382
+ }
1383
+ },
1384
+ "end": "(?=$|\\()",
1385
+ "patterns": [
1386
+ {
1387
+ "include": "#macro-reification"
1388
+ },
1389
+ {
1390
+ "include": "#type-parameters"
1391
+ }
1392
+ ]
1393
+ },
1394
+ "method-name-post": {
1395
+ "begin": "(?<=[\\w\\s>])",
1396
+ "end": "(\\{)|(;)",
1397
+ "endCaptures": {
1398
+ "1": {
1399
+ "name": "punctuation.definition.block.begin.hx"
1400
+ },
1401
+ "2": {
1402
+ "name": "punctuation.terminator.hx"
1403
+ }
1404
+ },
1405
+ "patterns": [
1406
+ {
1407
+ "include": "#parameters"
1408
+ },
1409
+ {
1410
+ "include": "#method-return-type-hint"
1411
+ },
1412
+ {
1413
+ "include": "#block"
1414
+ },
1415
+ {
1416
+ "include": "#block-contents"
1417
+ }
1418
+ ]
1419
+ },
1420
+ "method-return-type-hint": {
1421
+ "begin": "(?<=\\))\\s*(:)",
1422
+ "beginCaptures": {
1423
+ "1": {
1424
+ "name": "keyword.operator.type.annotation.hx"
1425
+ }
1426
+ },
1427
+ "end": "(?=\\{|;|[a-z0-9])",
1428
+ "patterns": [
1429
+ {
1430
+ "include": "#type"
1431
+ }
1432
+ ]
1433
+ },
1434
+ "modifiers": {
1435
+ "patterns": [
1436
+ {
1437
+ "match": "\\b(enum)\\b",
1438
+ "name": "storage.type.class"
1439
+ },
1440
+ {
1441
+ "match": "\\b(public|private|static|dynamic|inline|macro|extern|override|overload|abstract)\\b",
1442
+ "name": "storage.modifier.hx"
1443
+ },
1444
+ {
1445
+ "match": "\\b(final)\\b(?=\\s+(public|private|static|dynamic|inline|macro|extern|override|overload|abstract|function))",
1446
+ "name": "storage.modifier.hx"
1447
+ }
1448
+ ]
1449
+ },
1450
+ "modifiers-inheritance": {
1451
+ "match": "\\b(implements|extends)\\b",
1452
+ "name": "storage.modifier.hx"
1453
+ },
1454
+ "new-expr": {
1455
+ "begin": "(?<!\\.)\\b(new)\\b",
1456
+ "beginCaptures": {
1457
+ "1": {
1458
+ "name": "keyword.operator.new.hx"
1459
+ }
1460
+ },
1461
+ "end": "(?=$|\\()",
1462
+ "name": "new.expr.hx",
1463
+ "patterns": [
1464
+ {
1465
+ "include": "#type"
1466
+ }
1467
+ ]
1468
+ },
1469
+ "operator-assignment": {
1470
+ "match": "(=)",
1471
+ "name": "keyword.operator.assignment.hx"
1472
+ },
1473
+ "operator-optional": {
1474
+ "match": "(\\?)(?!\\s)",
1475
+ "name": "keyword.operator.optional.hx"
1476
+ },
1477
+ "operator-type-hint": {
1478
+ "match": "(:)",
1479
+ "name": "keyword.operator.type.annotation.hx"
1480
+ },
1481
+ "operators": {
1482
+ "patterns": [
1483
+ {
1484
+ "match": "(&&|\\|\\|)",
1485
+ "name": "keyword.operator.logical.hx"
1486
+ },
1487
+ {
1488
+ "match": "(~|&|\\||\\^|>>>|<<|>>)",
1489
+ "name": "keyword.operator.bitwise.hx"
1490
+ },
1491
+ {
1492
+ "match": "(==|!=|<=|>=|<|>)",
1493
+ "name": "keyword.operator.comparison.hx"
1494
+ },
1495
+ {
1496
+ "match": "(!)",
1497
+ "name": "keyword.operator.logical.hx"
1498
+ },
1499
+ {
1500
+ "match": "(\\-\\-|\\+\\+)",
1501
+ "name": "keyword.operator.increment-decrement.hx"
1502
+ },
1503
+ {
1504
+ "match": "(\\-|\\+|\\*|\\/|%)",
1505
+ "name": "keyword.operator.arithmetic.hx"
1506
+ },
1507
+ {
1508
+ "match": "\\.\\.\\.",
1509
+ "name": "keyword.operator.intiterator.hx"
1510
+ },
1511
+ {
1512
+ "match": "=>",
1513
+ "name": "keyword.operator.arrow.hx"
1514
+ },
1515
+ {
1516
+ "match": "\\?\\?",
1517
+ "name": "keyword.operator.nullcoalescing.hx"
1518
+ },
1519
+ {
1520
+ "match": "\\?\\.",
1521
+ "name": "keyword.operator.safenavigation.hx"
1522
+ },
1523
+ {
1524
+ "match": "\\bis\\b(?!\\()",
1525
+ "name": "keyword.other.hx"
1526
+ },
1527
+ {
1528
+ "begin": "\\?",
1529
+ "beginCaptures": {
1530
+ "0": {
1531
+ "name": "keyword.operator.ternary.hx"
1532
+ }
1533
+ },
1534
+ "end": ":",
1535
+ "endCaptures": {
1536
+ "0": {
1537
+ "name": "keyword.operator.ternary.hx"
1538
+ }
1539
+ },
1540
+ "patterns": [
1541
+ {
1542
+ "include": "#block-contents"
1543
+ }
1544
+ ]
1545
+ }
1546
+ ]
1547
+ },
1548
+ "package": {
1549
+ "begin": "package\\b",
1550
+ "beginCaptures": {
1551
+ "0": {
1552
+ "name": "keyword.other.package.hx"
1553
+ }
1554
+ },
1555
+ "end": "$|(;)",
1556
+ "endCaptures": {
1557
+ "1": {
1558
+ "name": "punctuation.terminator.hx"
1559
+ }
1560
+ },
1561
+ "patterns": [
1562
+ {
1563
+ "include": "#type-path"
1564
+ },
1565
+ {
1566
+ "include": "#type-path-package-name"
1567
+ }
1568
+ ]
1569
+ },
1570
+ "parameter": {
1571
+ "begin": "(?<=\\(|,)",
1572
+ "end": "(?=\\)(?!\\s*->)|,)",
1573
+ "patterns": [
1574
+ {
1575
+ "include": "#parameter-name"
1576
+ },
1577
+ {
1578
+ "include": "#parameter-type-hint"
1579
+ },
1580
+ {
1581
+ "include": "#parameter-assign"
1582
+ },
1583
+ {
1584
+ "include": "#punctuation-comma"
1585
+ },
1586
+ {
1587
+ "include": "#global"
1588
+ }
1589
+ ]
1590
+ },
1591
+ "parameter-assign": {
1592
+ "begin": "=",
1593
+ "beginCaptures": {
1594
+ "0": {
1595
+ "name": "keyword.operator.assignment.hx"
1596
+ }
1597
+ },
1598
+ "end": "(?=\\)|,)",
1599
+ "patterns": [
1600
+ {
1601
+ "include": "#block"
1602
+ },
1603
+ {
1604
+ "include": "#block-contents"
1605
+ }
1606
+ ]
1607
+ },
1608
+ "parameter-name": {
1609
+ "begin": "(?<=\\(|,)",
1610
+ "end": "([_a-zA-Z]\\w*)",
1611
+ "endCaptures": {
1612
+ "1": {
1613
+ "name": "variable.parameter.hx"
1614
+ }
1615
+ },
1616
+ "patterns": [
1617
+ {
1618
+ "include": "#global"
1619
+ },
1620
+ {
1621
+ "include": "#metadata"
1622
+ },
1623
+ {
1624
+ "include": "#operator-optional"
1625
+ }
1626
+ ]
1627
+ },
1628
+ "parameter-type-hint": {
1629
+ "begin": ":",
1630
+ "beginCaptures": {
1631
+ "0": {
1632
+ "name": "keyword.operator.type.annotation.hx"
1633
+ }
1634
+ },
1635
+ "end": "(?=\\)(?!\\s*->)|,|=)",
1636
+ "patterns": [
1637
+ {
1638
+ "include": "#type"
1639
+ }
1640
+ ]
1641
+ },
1642
+ "parameters": {
1643
+ "begin": "\\(",
1644
+ "beginCaptures": {
1645
+ "0": {
1646
+ "name": "punctuation.definition.parameters.begin.hx"
1647
+ }
1648
+ },
1649
+ "end": "\\s*(\\)(?!\\s*->))",
1650
+ "endCaptures": {
1651
+ "1": {
1652
+ "name": "punctuation.definition.parameters.end.hx"
1653
+ }
1654
+ },
1655
+ "name": "meta.parameters.hx",
1656
+ "patterns": [
1657
+ {
1658
+ "include": "#parameter"
1659
+ }
1660
+ ]
1661
+ },
1662
+ "punctuation-accessor": {
1663
+ "match": "\\.",
1664
+ "name": "punctuation.accessor.hx"
1665
+ },
1666
+ "punctuation-braces": {
1667
+ "begin": "\\(",
1668
+ "beginCaptures": {
1669
+ "0": {
1670
+ "name": "meta.brace.round.hx"
1671
+ }
1672
+ },
1673
+ "end": "\\)",
1674
+ "endCaptures": {
1675
+ "0": {
1676
+ "name": "meta.brace.round.hx"
1677
+ }
1678
+ },
1679
+ "patterns": [
1680
+ {
1681
+ "include": "#keywords"
1682
+ },
1683
+ {
1684
+ "include": "#block"
1685
+ },
1686
+ {
1687
+ "include": "#block-contents"
1688
+ },
1689
+ {
1690
+ "include": "#type-check"
1691
+ }
1692
+ ]
1693
+ },
1694
+ "punctuation-comma": {
1695
+ "match": ",",
1696
+ "name": "punctuation.separator.comma.hx"
1697
+ },
1698
+ "punctuation-terminator": {
1699
+ "match": ";",
1700
+ "name": "punctuation.terminator.hx"
1701
+ },
1702
+ "regex": {
1703
+ "begin": "(~/)",
1704
+ "beginCaptures": {
1705
+ "1": {
1706
+ "name": "punctuation.definition.string.begin.hx"
1707
+ }
1708
+ },
1709
+ "end": "(/)([gimsu]*)",
1710
+ "endCaptures": {
1711
+ "1": {
1712
+ "name": "punctuation.definition.string.end.hx"
1713
+ },
1714
+ "2": {
1715
+ "name": "keyword.other.hx"
1716
+ }
1717
+ },
1718
+ "name": "string.regexp.hx",
1719
+ "patterns": [
1720
+ {
1721
+ "include": "#regexp"
1722
+ }
1723
+ ]
1724
+ },
1725
+ "regex-character-class": {
1726
+ "patterns": [
1727
+ {
1728
+ "match": "\\\\[wWsSdDtrnvf]|\\.",
1729
+ "name": "constant.other.character-class.regexp"
1730
+ },
1731
+ {
1732
+ "match": "\\\\([0-7]{3}|x\\h\\h|u\\h\\h\\h\\h)",
1733
+ "name": "constant.character.numeric.regexp"
1734
+ },
1735
+ {
1736
+ "match": "\\\\c[A-Z]",
1737
+ "name": "constant.character.control.regexp"
1738
+ },
1739
+ {
1740
+ "match": "\\\\.",
1741
+ "name": "constant.character.escape.backslash.regexp"
1742
+ }
1743
+ ]
1744
+ },
1745
+ "regexp": {
1746
+ "patterns": [
1747
+ {
1748
+ "match": "\\\\[bB]|\\^|\\$",
1749
+ "name": "keyword.control.anchor.regexp"
1750
+ },
1751
+ {
1752
+ "match": "\\\\[1-9]\\d*",
1753
+ "name": "keyword.other.back-reference.regexp"
1754
+ },
1755
+ {
1756
+ "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??",
1757
+ "name": "keyword.operator.quantifier.regexp"
1758
+ },
1759
+ {
1760
+ "match": "\\|",
1761
+ "name": "keyword.operator.or.regexp"
1762
+ },
1763
+ {
1764
+ "begin": "(\\()((\\?=)|(\\?!))",
1765
+ "beginCaptures": {
1766
+ "1": {
1767
+ "name": "punctuation.definition.group.regexp"
1768
+ },
1769
+ "2": {
1770
+ "name": "punctuation.definition.group.assertion.regexp"
1771
+ },
1772
+ "3": {
1773
+ "name": "meta.assertion.look-ahead.regexp"
1774
+ },
1775
+ "4": {
1776
+ "name": "meta.assertion.negative-look-ahead.regexp"
1777
+ }
1778
+ },
1779
+ "end": "(\\))",
1780
+ "endCaptures": {
1781
+ "1": {
1782
+ "name": "punctuation.definition.group.regexp"
1783
+ }
1784
+ },
1785
+ "name": "meta.group.assertion.regexp",
1786
+ "patterns": [
1787
+ {
1788
+ "include": "#regexp"
1789
+ }
1790
+ ]
1791
+ },
1792
+ {
1793
+ "begin": "\\((\\?:)?",
1794
+ "beginCaptures": {
1795
+ "0": {
1796
+ "name": "punctuation.definition.group.regexp"
1797
+ },
1798
+ "1": {
1799
+ "name": "punctuation.definition.group.capture.regexp"
1800
+ }
1801
+ },
1802
+ "end": "\\)",
1803
+ "endCaptures": {
1804
+ "0": {
1805
+ "name": "punctuation.definition.group.regexp"
1806
+ }
1807
+ },
1808
+ "name": "meta.group.regexp",
1809
+ "patterns": [
1810
+ {
1811
+ "include": "#regexp"
1812
+ }
1813
+ ]
1814
+ },
1815
+ {
1816
+ "begin": "(\\[)(\\^)?",
1817
+ "beginCaptures": {
1818
+ "1": {
1819
+ "name": "punctuation.definition.character-class.regexp"
1820
+ },
1821
+ "2": {
1822
+ "name": "keyword.operator.negation.regexp"
1823
+ }
1824
+ },
1825
+ "end": "(\\])",
1826
+ "endCaptures": {
1827
+ "1": {
1828
+ "name": "punctuation.definition.character-class.regexp"
1829
+ }
1830
+ },
1831
+ "name": "constant.other.character-class.set.regexp",
1832
+ "patterns": [
1833
+ {
1834
+ "captures": {
1835
+ "1": {
1836
+ "name": "constant.character.numeric.regexp"
1837
+ },
1838
+ "2": {
1839
+ "name": "constant.character.control.regexp"
1840
+ },
1841
+ "3": {
1842
+ "name": "constant.character.escape.backslash.regexp"
1843
+ },
1844
+ "4": {
1845
+ "name": "constant.character.numeric.regexp"
1846
+ },
1847
+ "5": {
1848
+ "name": "constant.character.control.regexp"
1849
+ },
1850
+ "6": {
1851
+ "name": "constant.character.escape.backslash.regexp"
1852
+ }
1853
+ },
1854
+ "match": "(?:.|(\\\\(?:[0-7]{3}|x\\h\\h|u\\h\\h\\h\\h))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x\\h\\h|u\\h\\h\\h\\h))|(\\\\c[A-Z])|(\\\\.))",
1855
+ "name": "constant.other.character-class.range.regexp"
1856
+ },
1857
+ {
1858
+ "include": "#regex-character-class"
1859
+ }
1860
+ ]
1861
+ },
1862
+ {
1863
+ "include": "#regex-character-class"
1864
+ }
1865
+ ]
1866
+ },
1867
+ "string-escape-sequences": {
1868
+ "patterns": [
1869
+ {
1870
+ "match": "\\\\[0-3][0-9]{2}",
1871
+ "name": "constant.character.escape.hx"
1872
+ },
1873
+ {
1874
+ "match": "\\\\x[0-9A-Fa-f]{2}",
1875
+ "name": "constant.character.escape.hx"
1876
+ },
1877
+ {
1878
+ "match": "\\\\u[0-9]{4}",
1879
+ "name": "constant.character.escape.hx"
1880
+ },
1881
+ {
1882
+ "match": "\\\\u\\{[0-9A-Fa-f]{1,}\\}",
1883
+ "name": "constant.character.escape.hx"
1884
+ },
1885
+ {
1886
+ "match": "\\\\[nrt\"'\\\\]",
1887
+ "name": "constant.character.escape.hx"
1888
+ },
1889
+ {
1890
+ "match": "\\\\.",
1891
+ "name": "invalid.escape.sequence.hx"
1892
+ }
1893
+ ]
1894
+ },
1895
+ "strings": {
1896
+ "patterns": [
1897
+ {
1898
+ "begin": "\"",
1899
+ "beginCaptures": {
1900
+ "0": {
1901
+ "name": "punctuation.definition.string.begin.hx"
1902
+ }
1903
+ },
1904
+ "end": "\"",
1905
+ "endCaptures": {
1906
+ "0": {
1907
+ "name": "punctuation.definition.string.end.hx"
1908
+ }
1909
+ },
1910
+ "name": "string.quoted.double.hx",
1911
+ "patterns": [
1912
+ {
1913
+ "include": "#string-escape-sequences"
1914
+ }
1915
+ ]
1916
+ },
1917
+ {
1918
+ "begin": "(')",
1919
+ "beginCaptures": {
1920
+ "0": {
1921
+ "name": "string.quoted.single.hx"
1922
+ },
1923
+ "1": {
1924
+ "name": "punctuation.definition.string.begin.hx"
1925
+ }
1926
+ },
1927
+ "end": "(')",
1928
+ "endCaptures": {
1929
+ "0": {
1930
+ "name": "string.quoted.single.hx"
1931
+ },
1932
+ "1": {
1933
+ "name": "punctuation.definition.string.end.hx"
1934
+ }
1935
+ },
1936
+ "patterns": [
1937
+ {
1938
+ "begin": "\\$(?=\\$)",
1939
+ "beginCaptures": {
1940
+ "0": {
1941
+ "name": "constant.character.escape.hx"
1942
+ }
1943
+ },
1944
+ "end": "\\$",
1945
+ "endCaptures": {
1946
+ "0": {
1947
+ "name": "constant.character.escape.hx"
1948
+ }
1949
+ },
1950
+ "name": "string.quoted.single.hx"
1951
+ },
1952
+ {
1953
+ "include": "#string-escape-sequences"
1954
+ },
1955
+ {
1956
+ "begin": "(\\${)",
1957
+ "beginCaptures": {
1958
+ "0": {
1959
+ "name": "punctuation.definition.block.begin.hx"
1960
+ }
1961
+ },
1962
+ "end": "(})",
1963
+ "endCaptures": {
1964
+ "0": {
1965
+ "name": "punctuation.definition.block.end.hx"
1966
+ }
1967
+ },
1968
+ "patterns": [
1969
+ {
1970
+ "include": "#block-contents"
1971
+ }
1972
+ ]
1973
+ },
1974
+ {
1975
+ "captures": {
1976
+ "1": {
1977
+ "name": "punctuation.definition.block.begin.hx"
1978
+ },
1979
+ "2": {
1980
+ "name": "variable.other.hx"
1981
+ }
1982
+ },
1983
+ "match": "(\\$)([_a-zA-Z]\\w*)"
1984
+ },
1985
+ {
1986
+ "match": "",
1987
+ "name": "constant.character.escape.hx"
1988
+ },
1989
+ {
1990
+ "match": ".",
1991
+ "name": "string.quoted.single.hx"
1992
+ }
1993
+ ]
1994
+ }
1995
+ ]
1996
+ },
1997
+ "type": {
1998
+ "patterns": [
1999
+ {
2000
+ "include": "#global"
2001
+ },
2002
+ {
2003
+ "include": "#macro-reification"
2004
+ },
2005
+ {
2006
+ "include": "#type-name"
2007
+ },
2008
+ {
2009
+ "include": "#type-parameters"
2010
+ },
2011
+ {
2012
+ "match": "->",
2013
+ "name": "keyword.operator.type.function.hx"
2014
+ },
2015
+ {
2016
+ "match": "&",
2017
+ "name": "keyword.operator.type.intersection.hx"
2018
+ },
2019
+ {
2020
+ "match": "\\?(?=\\s*[_A-Z])",
2021
+ "name": "keyword.operator.optional"
2022
+ },
2023
+ {
2024
+ "match": "\\?(?!\\s*[_A-Z])",
2025
+ "name": "punctuation.definition.tag"
2026
+ },
2027
+ {
2028
+ "begin": "(\\{)",
2029
+ "beginCaptures": {
2030
+ "0": {
2031
+ "name": "punctuation.definition.block.begin.hx"
2032
+ }
2033
+ },
2034
+ "end": "(?<=\\})",
2035
+ "patterns": [
2036
+ {
2037
+ "include": "#typedef-block"
2038
+ }
2039
+ ]
2040
+ },
2041
+ {
2042
+ "include": "#function-type"
2043
+ }
2044
+ ]
2045
+ },
2046
+ "type-check": {
2047
+ "begin": "(?<!macro)(?=:)",
2048
+ "end": "(?=\\))",
2049
+ "patterns": [
2050
+ {
2051
+ "include": "#operator-type-hint"
2052
+ },
2053
+ {
2054
+ "include": "#type"
2055
+ }
2056
+ ]
2057
+ },
2058
+ "type-name": {
2059
+ "patterns": [
2060
+ {
2061
+ "captures": {
2062
+ "1": {
2063
+ "name": "support.class.builtin.hx"
2064
+ },
2065
+ "2": {
2066
+ "name": "support.package.hx"
2067
+ },
2068
+ "3": {
2069
+ "name": "entity.name.type.hx"
2070
+ }
2071
+ },
2072
+ "match": "\\b(Any|Array|ArrayAccess|Bool|Class|Date|DateTools|Dynamic|Enum|EnumValue|EReg|Float|IMap|Int|IntIterator|Iterable|Iterator|KeyValueIterator|KeyValueIterable|Lambda|List|ListIterator|ListNode|Map|Math|Null|Reflect|Single|Std|String|StringBuf|StringTools|Sys|Type|UInt|UnicodeString|ValueType|Void|Xml|XmlType)(?:(\\.)(_*[A-Z]\\w*[a-z]\\w*))*\\b"
2073
+ },
2074
+ {
2075
+ "captures": {
2076
+ "1": {
2077
+ "name": "support.package.hx"
2078
+ },
2079
+ "3": {
2080
+ "name": "entity.name.type.hx"
2081
+ },
2082
+ "4": {
2083
+ "name": "support.package.hx"
2084
+ },
2085
+ "5": {
2086
+ "name": "entity.name.type.hx"
2087
+ }
2088
+ },
2089
+ "match": "\\b(?<![^.]\\.)((_*[a-z]\\w*\\.)*)(_*[A-Z]\\w*)(?:(\\.)(_*[A-Z]\\w*[a-z]\\w*))*\\b"
2090
+ }
2091
+ ]
2092
+ },
2093
+ "type-parameter-constraint-new": {
2094
+ "match": ":",
2095
+ "name": "keyword.operator.type.annotation.hxt"
2096
+ },
2097
+ "type-parameter-constraint-old": {
2098
+ "begin": "(:)\\s*(\\()",
2099
+ "beginCaptures": {
2100
+ "1": {
2101
+ "name": "keyword.operator.type.annotation.hx"
2102
+ },
2103
+ "2": {
2104
+ "name": "punctuation.definition.constraint.begin.hx"
2105
+ }
2106
+ },
2107
+ "end": "\\)",
2108
+ "endCaptures": {
2109
+ "0": {
2110
+ "name": "punctuation.definition.constraint.end.hx"
2111
+ }
2112
+ },
2113
+ "patterns": [
2114
+ {
2115
+ "include": "#type"
2116
+ },
2117
+ {
2118
+ "include": "#punctuation-comma"
2119
+ }
2120
+ ]
2121
+ },
2122
+ "type-parameters": {
2123
+ "begin": "(<)",
2124
+ "beginCaptures": {
2125
+ "1": {
2126
+ "name": "punctuation.definition.typeparameters.begin.hx"
2127
+ }
2128
+ },
2129
+ "end": "(?=$)|(>)",
2130
+ "endCaptures": {
2131
+ "1": {
2132
+ "name": "punctuation.definition.typeparameters.end.hx"
2133
+ }
2134
+ },
2135
+ "name": "meta.type-parameters.hx",
2136
+ "patterns": [
2137
+ {
2138
+ "include": "#type"
2139
+ },
2140
+ {
2141
+ "include": "#type-parameter-constraint-old"
2142
+ },
2143
+ {
2144
+ "include": "#type-parameter-constraint-new"
2145
+ },
2146
+ {
2147
+ "include": "#global"
2148
+ },
2149
+ {
2150
+ "include": "#regex"
2151
+ },
2152
+ {
2153
+ "include": "#array"
2154
+ },
2155
+ {
2156
+ "include": "#constants"
2157
+ },
2158
+ {
2159
+ "include": "#strings"
2160
+ },
2161
+ {
2162
+ "include": "#metadata"
2163
+ },
2164
+ {
2165
+ "include": "#punctuation-comma"
2166
+ }
2167
+ ]
2168
+ },
2169
+ "type-path": {
2170
+ "patterns": [
2171
+ {
2172
+ "include": "#global"
2173
+ },
2174
+ {
2175
+ "include": "#punctuation-accessor"
2176
+ },
2177
+ {
2178
+ "include": "#type-path-type-name"
2179
+ }
2180
+ ]
2181
+ },
2182
+ "type-path-package-name": {
2183
+ "match": "\\b([_A-Za-z]\\w*)\\b",
2184
+ "name": "support.package.hx"
2185
+ },
2186
+ "type-path-type-name": {
2187
+ "match": "\\b(_*[A-Z]\\w*)\\b",
2188
+ "name": "entity.name.type.hx"
2189
+ },
2190
+ "typedef": {
2191
+ "begin": "(?=typedef)",
2192
+ "end": "(?<=\\})|(;)",
2193
+ "endCaptures": {
2194
+ "1": {
2195
+ "name": "punctuation.terminator.hx"
2196
+ }
2197
+ },
2198
+ "name": "meta.typedef.hx",
2199
+ "patterns": [
2200
+ {
2201
+ "include": "#typedef-name"
2202
+ },
2203
+ {
2204
+ "include": "#typedef-name-post"
2205
+ },
2206
+ {
2207
+ "include": "#typedef-block"
2208
+ }
2209
+ ]
2210
+ },
2211
+ "typedef-block": {
2212
+ "begin": "(?<=\\{)",
2213
+ "end": "(\\})",
2214
+ "endCaptures": {
2215
+ "1": {
2216
+ "name": "punctuation.definition.block.end.hx"
2217
+ }
2218
+ },
2219
+ "name": "meta.block.hx",
2220
+ "patterns": [
2221
+ {
2222
+ "include": "#global"
2223
+ },
2224
+ {
2225
+ "include": "#metadata"
2226
+ },
2227
+ {
2228
+ "include": "#method"
2229
+ },
2230
+ {
2231
+ "include": "#variable"
2232
+ },
2233
+ {
2234
+ "include": "#modifiers"
2235
+ },
2236
+ {
2237
+ "include": "#punctuation-comma"
2238
+ },
2239
+ {
2240
+ "include": "#operator-optional"
2241
+ },
2242
+ {
2243
+ "include": "#typedef-extension"
2244
+ },
2245
+ {
2246
+ "include": "#typedef-simple-field-type-hint"
2247
+ },
2248
+ {
2249
+ "include": "#identifier-name"
2250
+ },
2251
+ {
2252
+ "include": "#strings"
2253
+ }
2254
+ ]
2255
+ },
2256
+ "typedef-extension": {
2257
+ "begin": ">",
2258
+ "end": ",|$",
2259
+ "patterns": [
2260
+ {
2261
+ "include": "#type"
2262
+ }
2263
+ ]
2264
+ },
2265
+ "typedef-name": {
2266
+ "begin": "\\b(typedef)\\b",
2267
+ "beginCaptures": {
2268
+ "1": {
2269
+ "name": "storage.type.class.hx"
2270
+ }
2271
+ },
2272
+ "end": "([_A-Za-z]\\w*)",
2273
+ "endCaptures": {
2274
+ "1": {
2275
+ "name": "entity.name.type.class.hx"
2276
+ }
2277
+ },
2278
+ "patterns": [
2279
+ {
2280
+ "include": "#global"
2281
+ }
2282
+ ]
2283
+ },
2284
+ "typedef-name-post": {
2285
+ "begin": "(?<=\\w)",
2286
+ "end": "(\\{)|(?=;)",
2287
+ "endCaptures": {
2288
+ "1": {
2289
+ "name": "punctuation.definition.block.begin.hx"
2290
+ }
2291
+ },
2292
+ "patterns": [
2293
+ {
2294
+ "include": "#global"
2295
+ },
2296
+ {
2297
+ "include": "#punctuation-brackets"
2298
+ },
2299
+ {
2300
+ "include": "#punctuation-separator"
2301
+ },
2302
+ {
2303
+ "include": "#operator-assignment"
2304
+ },
2305
+ {
2306
+ "include": "#type"
2307
+ }
2308
+ ]
2309
+ },
2310
+ "typedef-simple-field-type-hint": {
2311
+ "begin": ":",
2312
+ "beginCaptures": {
2313
+ "0": {
2314
+ "name": "keyword.operator.type.annotation.hx"
2315
+ }
2316
+ },
2317
+ "end": "(?=\\}|,|;)",
2318
+ "patterns": [
2319
+ {
2320
+ "include": "#type"
2321
+ }
2322
+ ]
2323
+ },
2324
+ "using": {
2325
+ "begin": "using\\b",
2326
+ "beginCaptures": {
2327
+ "0": {
2328
+ "name": "keyword.other.using.hx"
2329
+ }
2330
+ },
2331
+ "end": "$|(;)",
2332
+ "endCaptures": {
2333
+ "1": {
2334
+ "name": "punctuation.terminator.hx"
2335
+ }
2336
+ },
2337
+ "patterns": [
2338
+ {
2339
+ "include": "#type-path"
2340
+ },
2341
+ {
2342
+ "include": "#type-path-package-name"
2343
+ }
2344
+ ]
2345
+ },
2346
+ "variable": {
2347
+ "begin": "(?=\\b(var|final)\\b)",
2348
+ "end": "(?=$)|(;)",
2349
+ "endCaptures": {
2350
+ "1": {
2351
+ "name": "punctuation.terminator.hx"
2352
+ }
2353
+ },
2354
+ "patterns": [
2355
+ {
2356
+ "include": "#variable-name"
2357
+ },
2358
+ {
2359
+ "include": "#variable-name-next"
2360
+ },
2361
+ {
2362
+ "include": "#variable-assign"
2363
+ },
2364
+ {
2365
+ "include": "#variable-name-post"
2366
+ }
2367
+ ]
2368
+ },
2369
+ "variable-accessors": {
2370
+ "begin": "\\(",
2371
+ "beginCaptures": {
2372
+ "0": {
2373
+ "name": "punctuation.definition.parameters.begin.hx"
2374
+ }
2375
+ },
2376
+ "end": "\\)",
2377
+ "endCaptures": {
2378
+ "0": {
2379
+ "name": "punctuation.definition.parameters.end.hx"
2380
+ }
2381
+ },
2382
+ "name": "meta.parameters.hx",
2383
+ "patterns": [
2384
+ {
2385
+ "include": "#global"
2386
+ },
2387
+ {
2388
+ "include": "#keywords-accessor"
2389
+ },
2390
+ {
2391
+ "include": "#accessor-method"
2392
+ },
2393
+ {
2394
+ "include": "#punctuation-comma"
2395
+ }
2396
+ ]
2397
+ },
2398
+ "variable-assign": {
2399
+ "begin": "=",
2400
+ "beginCaptures": {
2401
+ "0": {
2402
+ "name": "keyword.operator.assignment.hx"
2403
+ }
2404
+ },
2405
+ "end": "(?=;|,)",
2406
+ "patterns": [
2407
+ {
2408
+ "include": "#block"
2409
+ },
2410
+ {
2411
+ "include": "#block-contents"
2412
+ }
2413
+ ]
2414
+ },
2415
+ "variable-name": {
2416
+ "begin": "\\b(var|final)\\b",
2417
+ "beginCaptures": {
2418
+ "1": {
2419
+ "name": "storage.type.variable.hx"
2420
+ }
2421
+ },
2422
+ "end": "(?=$)|([_a-zA-Z]\\w*)",
2423
+ "endCaptures": {
2424
+ "1": {
2425
+ "name": "variable.other.hx"
2426
+ }
2427
+ },
2428
+ "patterns": [
2429
+ {
2430
+ "include": "#operator-optional"
2431
+ }
2432
+ ]
2433
+ },
2434
+ "variable-name-next": {
2435
+ "begin": ",",
2436
+ "beginCaptures": {
2437
+ "0": {
2438
+ "name": "punctuation.separator.comma.hx"
2439
+ }
2440
+ },
2441
+ "end": "([_a-zA-Z]\\w*)",
2442
+ "endCaptures": {
2443
+ "1": {
2444
+ "name": "variable.other.hx"
2445
+ }
2446
+ },
2447
+ "patterns": [
2448
+ {
2449
+ "include": "#global"
2450
+ }
2451
+ ]
2452
+ },
2453
+ "variable-name-post": {
2454
+ "begin": "(?<=\\w)",
2455
+ "end": "(?=;)|(?==)",
2456
+ "patterns": [
2457
+ {
2458
+ "include": "#variable-accessors"
2459
+ },
2460
+ {
2461
+ "include": "#variable-type-hint"
2462
+ },
2463
+ {
2464
+ "include": "#block-contents"
2465
+ }
2466
+ ]
2467
+ },
2468
+ "variable-type-hint": {
2469
+ "begin": ":",
2470
+ "beginCaptures": {
2471
+ "0": {
2472
+ "name": "keyword.operator.type.annotation.hx"
2473
+ }
2474
+ },
2475
+ "end": "(?=$|;|,|=)",
2476
+ "patterns": [
2477
+ {
2478
+ "include": "#type"
2479
+ }
2480
+ ]
2481
+ }
2482
+ },
2483
+ "scopeName": "source.hx"
2484
+ }