tm-grammars 1.26.0 → 1.27.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,1982 @@
1
+ {
2
+ "displayName": "C3",
3
+ "fileTypes": [
4
+ "c3",
5
+ "c3i",
6
+ "c3t"
7
+ ],
8
+ "name": "c3",
9
+ "patterns": [
10
+ {
11
+ "include": "#top_level"
12
+ },
13
+ {
14
+ "include": "#statements"
15
+ }
16
+ ],
17
+ "repository": {
18
+ "assign_right_expression": {
19
+ "begin": "=",
20
+ "beginCaptures": {
21
+ "0": {
22
+ "name": "keyword.operator.assignment.c3"
23
+ }
24
+ },
25
+ "end": "(?=;)",
26
+ "patterns": [
27
+ {
28
+ "include": "#comments"
29
+ },
30
+ {
31
+ "include": "#expression"
32
+ }
33
+ ]
34
+ },
35
+ "attribute": {
36
+ "patterns": [
37
+ {
38
+ "begin": "@(?:(?:align|allow_deprecated|benchmark|bigendian|builtin|callconv|cname|compact|const|deprecated|dynamic|export|extern|finalizer|format|if|inline|init|jump|link|littleendian|local|maydiscard|naked|noalias|nodiscard|noinit|noinline|nopadding|norecurse|noreturn|nosanitize|nostrip|obfuscate|operator|operator_r|operator_s|optional|overlap|packed|private|public|pure|reflect|safeinfer|safemacro|simd|section|structlike|tag|test|unused|used|wasm|weak|winmain)|\\b_*[A-Z][0-9A-Z_]*[a-z][0-9A-Z_a-z]*)\\b",
39
+ "beginCaptures": {
40
+ "0": {
41
+ "name": "keyword.annotation.c3"
42
+ }
43
+ },
44
+ "end": "(?=[^\\t (])|(?<=\\))",
45
+ "name": "meta.annotation.c3",
46
+ "patterns": [
47
+ {
48
+ "include": "#parens"
49
+ }
50
+ ]
51
+ }
52
+ ]
53
+ },
54
+ "block": {
55
+ "patterns": [
56
+ {
57
+ "begin": "\\{",
58
+ "beginCaptures": {
59
+ "0": {
60
+ "name": "punctuation.section.block.begin.c3"
61
+ }
62
+ },
63
+ "end": "}",
64
+ "endCaptures": {
65
+ "0": {
66
+ "name": "punctuation.section.block.end.c3"
67
+ }
68
+ },
69
+ "name": "meta.block.c3",
70
+ "patterns": [
71
+ {
72
+ "include": "#statements"
73
+ }
74
+ ]
75
+ }
76
+ ]
77
+ },
78
+ "block_comment": {
79
+ "begin": "/\\*",
80
+ "beginCaptures": {
81
+ "0": {
82
+ "name": "punctuation.definition.comment.begin.c3"
83
+ }
84
+ },
85
+ "end": "\\*/",
86
+ "endCaptures": {
87
+ "0": {
88
+ "name": "punctuation.definition.comment.end.c3"
89
+ }
90
+ },
91
+ "name": "comment.block.c3",
92
+ "patterns": [
93
+ {
94
+ "include": "#block_comment_body"
95
+ }
96
+ ]
97
+ },
98
+ "block_comment_body": {
99
+ "patterns": [
100
+ {
101
+ "begin": "/\\*",
102
+ "end": "\\*/",
103
+ "patterns": [
104
+ {
105
+ "include": "#block_comment_body"
106
+ }
107
+ ]
108
+ }
109
+ ]
110
+ },
111
+ "brackets": {
112
+ "patterns": [
113
+ {
114
+ "begin": "\\[<?",
115
+ "beginCaptures": {
116
+ "0": {
117
+ "name": "punctuation.section.brackets.begin.c3"
118
+ }
119
+ },
120
+ "end": ">?]",
121
+ "endCaptures": {
122
+ "0": {
123
+ "name": "punctuation.section.brackets.end.c3"
124
+ }
125
+ },
126
+ "name": "meta.brackets.c3",
127
+ "patterns": [
128
+ {
129
+ "include": "#expression"
130
+ }
131
+ ]
132
+ }
133
+ ]
134
+ },
135
+ "builtin": {
136
+ "patterns": [
137
+ {
138
+ "captures": {
139
+ "1": {
140
+ "name": "constant.language.c3"
141
+ },
142
+ "2": {
143
+ "name": "entity.name.function.builtin.c3"
144
+ }
145
+ },
146
+ "match": "(?:(\\$\\$\\b_*[A-Z][0-9A-Z_]*)|(\\$\\$\\b_*[a-z][0-9A-Z_a-z]*))\\b"
147
+ }
148
+ ]
149
+ },
150
+ "bytes_literal": {
151
+ "patterns": [
152
+ {
153
+ "begin": "(x)([\"'`])",
154
+ "beginCaptures": {
155
+ "1": {
156
+ "name": "keyword.other.c3"
157
+ },
158
+ "2": {
159
+ "name": "punctuation.definition.string.begin.c3"
160
+ }
161
+ },
162
+ "end": "\\2",
163
+ "endCaptures": {
164
+ "0": {
165
+ "name": "punctuation.definition.string.end.c3"
166
+ }
167
+ },
168
+ "name": "string.quoted.other.c3",
169
+ "patterns": [
170
+ {
171
+ "match": "[f\\s\\h]+",
172
+ "name": "constant.numeric.integer.c3"
173
+ }
174
+ ]
175
+ },
176
+ {
177
+ "begin": "(b64)([\"'`])",
178
+ "beginCaptures": {
179
+ "1": {
180
+ "name": "keyword.other.c3"
181
+ },
182
+ "2": {
183
+ "name": "punctuation.definition.string.begin.c3"
184
+ }
185
+ },
186
+ "end": "\\2",
187
+ "endCaptures": {
188
+ "0": {
189
+ "name": "punctuation.definition.string.end.c3"
190
+ }
191
+ },
192
+ "name": "string.quoted.other.c3",
193
+ "patterns": [
194
+ {
195
+ "match": "[+/-9=A-Za-z\\s]+",
196
+ "name": "constant.numeric.integer.c3"
197
+ }
198
+ ]
199
+ }
200
+ ]
201
+ },
202
+ "char_literal": {
203
+ "begin": "'",
204
+ "beginCaptures": {
205
+ "0": {
206
+ "name": "punctuation.definition.string.begin.c3"
207
+ }
208
+ },
209
+ "end": "'",
210
+ "endCaptures": {
211
+ "0": {
212
+ "name": "punctuation.definition.string.end.c3"
213
+ }
214
+ },
215
+ "name": "string.quoted.single.c3",
216
+ "patterns": [
217
+ {
218
+ "include": "#escape_sequence"
219
+ }
220
+ ]
221
+ },
222
+ "comments": {
223
+ "patterns": [
224
+ {
225
+ "include": "#line_comment"
226
+ },
227
+ {
228
+ "include": "#block_comment"
229
+ },
230
+ {
231
+ "include": "#doc_comment"
232
+ }
233
+ ]
234
+ },
235
+ "constants": {
236
+ "patterns": [
237
+ {
238
+ "match": "\\b(true|false|null)\\b",
239
+ "name": "constant.language.c3"
240
+ },
241
+ {
242
+ "begin": "\\b_*[A-Z][0-9A-Z_]*\\b",
243
+ "beginCaptures": {
244
+ "0": {
245
+ "name": "variable.other.constant.c3"
246
+ }
247
+ },
248
+ "end": "(?=[^\\t {])|(?<=})",
249
+ "patterns": [
250
+ {
251
+ "include": "#generic_params"
252
+ }
253
+ ]
254
+ }
255
+ ]
256
+ },
257
+ "control_statements": {
258
+ "patterns": [
259
+ {
260
+ "begin": "\\$for\\b",
261
+ "beginCaptures": {
262
+ "0": {
263
+ "name": "keyword.control.ct.c3"
264
+ }
265
+ },
266
+ "end": ":",
267
+ "endCaptures": {
268
+ "0": {
269
+ "name": "punctuation.separator.c3"
270
+ }
271
+ },
272
+ "patterns": [
273
+ {
274
+ "include": "#statements"
275
+ }
276
+ ]
277
+ },
278
+ {
279
+ "begin": "\\$foreach\\b",
280
+ "beginCaptures": {
281
+ "0": {
282
+ "name": "keyword.control.ct.c3"
283
+ }
284
+ },
285
+ "end": "(?<=:)",
286
+ "patterns": [
287
+ {
288
+ "include": "#comments"
289
+ },
290
+ {
291
+ "match": "\\$\\b_*[a-z][0-9A-Z_a-z]*\\b",
292
+ "name": "variable.other.c3"
293
+ },
294
+ {
295
+ "match": ",",
296
+ "name": "punctuation.separator.c3"
297
+ },
298
+ {
299
+ "begin": ":",
300
+ "beginCaptures": {
301
+ "0": {
302
+ "name": "keyword.operator.c3"
303
+ }
304
+ },
305
+ "end": ":",
306
+ "endCaptures": {
307
+ "0": {
308
+ "name": "punctuation.separator.c3"
309
+ }
310
+ },
311
+ "patterns": [
312
+ {
313
+ "include": "#expression"
314
+ }
315
+ ]
316
+ }
317
+ ]
318
+ },
319
+ {
320
+ "begin": "\\bfor\\b",
321
+ "beginCaptures": {
322
+ "0": {
323
+ "name": "keyword.control.c3"
324
+ }
325
+ },
326
+ "end": "(?<=\\))",
327
+ "patterns": [
328
+ {
329
+ "include": "#comments"
330
+ },
331
+ {
332
+ "begin": "\\(",
333
+ "beginCaptures": {
334
+ "0": {
335
+ "name": "punctuation.section.group.begin.c3"
336
+ }
337
+ },
338
+ "end": "\\)",
339
+ "endCaptures": {
340
+ "0": {
341
+ "name": "punctuation.section.group.end.c3"
342
+ }
343
+ },
344
+ "patterns": [
345
+ {
346
+ "include": "#statements"
347
+ }
348
+ ]
349
+ }
350
+ ]
351
+ },
352
+ {
353
+ "begin": "\\$(?:switch|case|default|if)\\b",
354
+ "beginCaptures": {
355
+ "0": {
356
+ "name": "keyword.control.ct.c3"
357
+ }
358
+ },
359
+ "end": ":",
360
+ "endCaptures": {
361
+ "0": {
362
+ "name": "punctuation.separator.c3"
363
+ }
364
+ },
365
+ "patterns": [
366
+ {
367
+ "include": "#expression"
368
+ }
369
+ ]
370
+ },
371
+ {
372
+ "begin": "\\b(?:case|default)\\b",
373
+ "beginCaptures": {
374
+ "0": {
375
+ "name": "keyword.control.c3"
376
+ }
377
+ },
378
+ "end": ":",
379
+ "endCaptures": {
380
+ "0": {
381
+ "name": "punctuation.separator.c3"
382
+ }
383
+ },
384
+ "patterns": [
385
+ {
386
+ "include": "#expression"
387
+ }
388
+ ]
389
+ }
390
+ ]
391
+ },
392
+ "doc_comment": {
393
+ "begin": "(?=<\\*)",
394
+ "end": "(\\*>)",
395
+ "endCaptures": {
396
+ "0": {
397
+ "name": "comment.block.documentation.c3"
398
+ },
399
+ "1": {
400
+ "name": "punctuation.definition.comment.end.c3"
401
+ }
402
+ },
403
+ "patterns": [
404
+ {
405
+ "include": "#doc_comment_body"
406
+ }
407
+ ]
408
+ },
409
+ "doc_comment_body": {
410
+ "patterns": [
411
+ {
412
+ "begin": "(<\\*)\\s*(?=@)",
413
+ "beginCaptures": {
414
+ "0": {
415
+ "name": "comment.block.documentation.c3"
416
+ },
417
+ "1": {
418
+ "name": "punctuation.definition.comment.begin.c3"
419
+ }
420
+ },
421
+ "end": "(?=\\*>)",
422
+ "patterns": [
423
+ {
424
+ "captures": {
425
+ "0": {
426
+ "name": "comment.block.documentation.c3"
427
+ },
428
+ "1": {
429
+ "name": "variable.parameter.c3"
430
+ },
431
+ "2": {
432
+ "name": "support.type.c3"
433
+ },
434
+ "3": {
435
+ "name": "keyword.operator.variadic.c3"
436
+ }
437
+ },
438
+ "match": "@param(?:\\s*\\[&?(?:in|out|inout)])?\\s*(?:([#$]?\\b_*[a-z][0-9A-Z_a-z]*)\\b|(\\$\\b_*[A-Z][0-9A-Z_]*[a-z][0-9A-Z_a-z]*)\\b|(\\.\\.\\.))"
439
+ },
440
+ {
441
+ "begin": "@(?:require\\b|ensure\\b|return\\?)",
442
+ "beginCaptures": {
443
+ "0": {
444
+ "name": "comment.block.documentation.c3"
445
+ }
446
+ },
447
+ "end": "(?=:|\\*>|$)",
448
+ "patterns": [
449
+ {
450
+ "include": "#expression"
451
+ }
452
+ ]
453
+ },
454
+ {
455
+ "match": "@\\b_*[a-z][0-9A-Z_a-z]*\\b",
456
+ "name": "comment.block.documentation.c3"
457
+ },
458
+ {
459
+ "match": ":",
460
+ "name": "comment.block.documentation.c3"
461
+ },
462
+ {
463
+ "begin": "([\"`])",
464
+ "end": "\\\\1",
465
+ "name": "comment.block.documentation.c3"
466
+ }
467
+ ]
468
+ },
469
+ {
470
+ "begin": "(<\\*)",
471
+ "beginCaptures": {
472
+ "0": {
473
+ "name": "comment.block.documentation.c3"
474
+ },
475
+ "1": {
476
+ "name": "punctuation.definition.comment.begin.c3"
477
+ }
478
+ },
479
+ "end": "(?=^\\s*@|\\*>)",
480
+ "name": "comment.block.documentation.c3"
481
+ },
482
+ {
483
+ "begin": "",
484
+ "end": "(?=\\*>)",
485
+ "patterns": [
486
+ {
487
+ "captures": {
488
+ "0": {
489
+ "name": "comment.block.documentation.c3"
490
+ },
491
+ "1": {
492
+ "name": "variable.parameter.c3"
493
+ },
494
+ "2": {
495
+ "name": "support.type.c3"
496
+ },
497
+ "3": {
498
+ "name": "keyword.operator.variadic.c3"
499
+ }
500
+ },
501
+ "match": "^\\s*@param(?:\\s*\\[&?(?:in|out|inout)])?\\s*(?:([#$]?\\b_*[a-z][0-9A-Z_a-z]*)\\b|(\\$\\b_*[A-Z][0-9A-Z_]*[a-z][0-9A-Z_a-z]*)\\b|(\\.\\.\\.))"
502
+ },
503
+ {
504
+ "begin": "^\\s*@(?:require\\b|ensure\\b|return\\?)",
505
+ "beginCaptures": {
506
+ "0": {
507
+ "name": "comment.block.documentation.c3"
508
+ }
509
+ },
510
+ "end": "(?=:|\\*>|$)",
511
+ "patterns": [
512
+ {
513
+ "include": "#expression"
514
+ }
515
+ ]
516
+ },
517
+ {
518
+ "match": "^\\s*@\\b_*[a-z][0-9A-Z_a-z]*\\b",
519
+ "name": "comment.block.documentation.c3"
520
+ },
521
+ {
522
+ "match": ":",
523
+ "name": "comment.block.documentation.c3"
524
+ },
525
+ {
526
+ "begin": "([\"`])",
527
+ "end": "\\\\1",
528
+ "name": "comment.block.documentation.c3"
529
+ }
530
+ ]
531
+ }
532
+ ]
533
+ },
534
+ "escape_sequence": {
535
+ "match": "\\\\([\"'0\\\\abefnrtv]|x\\h{2}|u\\h{4}|U\\h{8})",
536
+ "name": "constant.character.escape.c3"
537
+ },
538
+ "expression": {
539
+ "patterns": [
540
+ {
541
+ "include": "#comments"
542
+ },
543
+ {
544
+ "include": "#function"
545
+ },
546
+ {
547
+ "include": "#constants"
548
+ },
549
+ {
550
+ "include": "#builtin"
551
+ },
552
+ {
553
+ "include": "#literals"
554
+ },
555
+ {
556
+ "include": "#operators"
557
+ },
558
+ {
559
+ "include": "#keywords"
560
+ },
561
+ {
562
+ "include": "#type"
563
+ },
564
+ {
565
+ "include": "#path"
566
+ },
567
+ {
568
+ "include": "#function_call"
569
+ },
570
+ {
571
+ "include": "#variable"
572
+ },
573
+ {
574
+ "include": "#parens"
575
+ },
576
+ {
577
+ "include": "#brackets"
578
+ },
579
+ {
580
+ "include": "#block"
581
+ },
582
+ {
583
+ "include": "#punctuation"
584
+ },
585
+ {
586
+ "include": "#leftover_at_ident"
587
+ }
588
+ ]
589
+ },
590
+ "function": {
591
+ "begin": "(?=\\b(fn|macro)\\b)",
592
+ "end": "(?=[;={])",
593
+ "patterns": [
594
+ {
595
+ "begin": "\\b(fn|macro)\\b",
596
+ "beginCaptures": {
597
+ "1": {
598
+ "name": "keyword.declaration.function.c3"
599
+ }
600
+ },
601
+ "end": "(?=\\()",
602
+ "name": "meta.function.c3",
603
+ "patterns": [
604
+ {
605
+ "include": "#comments"
606
+ },
607
+ {
608
+ "include": "#function_header"
609
+ }
610
+ ]
611
+ },
612
+ {
613
+ "begin": "\\(",
614
+ "beginCaptures": {
615
+ "0": {
616
+ "name": "punctuation.section.group.begin.c3"
617
+ }
618
+ },
619
+ "end": "\\)",
620
+ "endCaptures": {
621
+ "0": {
622
+ "name": "punctuation.section.group.end.c3"
623
+ }
624
+ },
625
+ "name": "meta.function.parameters.c3",
626
+ "patterns": [
627
+ {
628
+ "include": "#parameters"
629
+ }
630
+ ]
631
+ },
632
+ {
633
+ "begin": "(?<=\\))",
634
+ "contentName": "meta.function.c3",
635
+ "end": "(?=[;={])",
636
+ "patterns": [
637
+ {
638
+ "include": "#comments"
639
+ },
640
+ {
641
+ "include": "#attribute"
642
+ }
643
+ ]
644
+ }
645
+ ]
646
+ },
647
+ "function_call": {
648
+ "begin": "([#@]?\\b_*[a-z][0-9A-Z_a-z]*)\\b(?=\\s*(\\{.*})?\\s*\\()",
649
+ "beginCaptures": {
650
+ "1": {
651
+ "name": "entity.name.function.c3"
652
+ }
653
+ },
654
+ "end": "(?<=\\))",
655
+ "name": "meta.function_call.c3",
656
+ "patterns": [
657
+ {
658
+ "include": "#generic_params"
659
+ },
660
+ {
661
+ "begin": "\\(",
662
+ "beginCaptures": {
663
+ "0": {
664
+ "name": "punctuation.section.group.begin.c3"
665
+ }
666
+ },
667
+ "end": "\\)",
668
+ "endCaptures": {
669
+ "0": {
670
+ "name": "punctuation.section.group.end.c3"
671
+ }
672
+ },
673
+ "name": "meta.group.c3",
674
+ "patterns": [
675
+ {
676
+ "include": "#comments"
677
+ },
678
+ {
679
+ "begin": "([#$]?\\b_*[a-z][0-9A-Z_a-z]*|\\$\\b_*[A-Z][0-9A-Z_]*[a-z][0-9A-Z_a-z]*)\\b\\s*(:)(?!:)",
680
+ "beginCaptures": {
681
+ "1": {
682
+ "name": "variable.parameter.c3"
683
+ },
684
+ "2": {
685
+ "name": "punctuation.separator.c3"
686
+ }
687
+ },
688
+ "end": "(?=\\))|([,;])",
689
+ "endCaptures": {
690
+ "1": {
691
+ "name": "punctuation.separator.c3"
692
+ }
693
+ },
694
+ "patterns": [
695
+ {
696
+ "include": "#expression"
697
+ }
698
+ ]
699
+ },
700
+ {
701
+ "begin": "(?=\\S)",
702
+ "end": "(?=\\))|([,;])",
703
+ "endCaptures": {
704
+ "1": {
705
+ "name": "punctuation.separator.c3"
706
+ }
707
+ },
708
+ "patterns": [
709
+ {
710
+ "include": "#expression"
711
+ }
712
+ ]
713
+ },
714
+ {
715
+ "match": ";",
716
+ "name": "punctuation.separator.c3"
717
+ }
718
+ ]
719
+ }
720
+ ]
721
+ },
722
+ "function_header": {
723
+ "patterns": [
724
+ {
725
+ "include": "#type"
726
+ },
727
+ {
728
+ "match": "\\.",
729
+ "name": "punctuation.accessor.c3"
730
+ },
731
+ {
732
+ "match": "@?\\b_*[a-z][0-9A-Z_a-z]*\\b",
733
+ "name": "entity.name.function.c3"
734
+ }
735
+ ]
736
+ },
737
+ "generic_params": {
738
+ "patterns": [
739
+ {
740
+ "begin": "\\{",
741
+ "beginCaptures": {
742
+ "0": {
743
+ "name": "punctuation.definition.generic.begin.c3"
744
+ }
745
+ },
746
+ "end": "}",
747
+ "endCaptures": {
748
+ "0": {
749
+ "name": "punctuation.definition.generic.end.c3"
750
+ }
751
+ },
752
+ "name": "meta.generic.c3",
753
+ "patterns": [
754
+ {
755
+ "include": "#expression"
756
+ }
757
+ ]
758
+ }
759
+ ]
760
+ },
761
+ "integer_literal": {
762
+ "match": "\\b(?:0[Xx]\\h(?:_?\\h)*|0[Oo][0-7](_?[0-7])*|0[Bb][01](_?[01])*|[0-9](?:_?[0-9])*)(?:[IUiu](?:8|16|32|64|128)|[Uu][Ll]{0,2}|[Ll]{1,2})?",
763
+ "name": "constant.numeric.integer.c3"
764
+ },
765
+ "keywords": {
766
+ "patterns": [
767
+ {
768
+ "match": "\\$(?:alignof|assert|assignable|default|defined|echo|embed|eval|error|exec|extnameof|feature|include|is_const|kindof|nameof|offsetof|qnameof|sizeof|stringify|vacount|vaconst|vaarg|vaexpr|vasplat)\\b",
769
+ "name": "keyword.other.ct.c3"
770
+ },
771
+ {
772
+ "match": "\\$(?:case|else|endfor|endforeach|endif|endswitch|for|foreach|if|switch)\\b",
773
+ "name": "keyword.control.ct.c3"
774
+ },
775
+ {
776
+ "match": "\\b(?:assert|asm|catch|inline|import|module|interface|try|var)\\b",
777
+ "name": "keyword.other.c3"
778
+ },
779
+ {
780
+ "match": "\\b(?:break|case|continue|default|defer|do|else|for|foreach|foreach_r|if|nextcase|return|switch|while)\\b",
781
+ "name": "keyword.control.c3"
782
+ }
783
+ ]
784
+ },
785
+ "leftover_at_ident": {
786
+ "patterns": [
787
+ {
788
+ "captures": {
789
+ "0": {
790
+ "name": "keyword.annotation.c3"
791
+ }
792
+ },
793
+ "match": "@(?:pure|inline|noinline)",
794
+ "name": "meta.annotation.c3"
795
+ },
796
+ {
797
+ "begin": "@\\b_*[a-z][0-9A-Z_a-z]*\\b",
798
+ "beginCaptures": {
799
+ "0": {
800
+ "name": "entity.name.function.c3"
801
+ }
802
+ },
803
+ "end": "(?=[^\\t {])|(?<=})",
804
+ "patterns": [
805
+ {
806
+ "include": "#generic_params"
807
+ }
808
+ ]
809
+ }
810
+ ]
811
+ },
812
+ "line_comment": {
813
+ "match": "//.*$",
814
+ "name": "comment.line.double-slash.c3"
815
+ },
816
+ "literals": {
817
+ "patterns": [
818
+ {
819
+ "include": "#string_literal"
820
+ },
821
+ {
822
+ "include": "#char_literal"
823
+ },
824
+ {
825
+ "include": "#raw_string_literal"
826
+ },
827
+ {
828
+ "include": "#real_literal"
829
+ },
830
+ {
831
+ "include": "#integer_literal"
832
+ },
833
+ {
834
+ "include": "#bytes_literal"
835
+ }
836
+ ]
837
+ },
838
+ "modifier_keywords": {
839
+ "patterns": [
840
+ {
841
+ "match": "\\b(?:const|extern|static|tlocal|inline)\\b",
842
+ "name": "storage.modifier.c3"
843
+ }
844
+ ]
845
+ },
846
+ "module_path": {
847
+ "patterns": [
848
+ {
849
+ "include": "#path"
850
+ },
851
+ {
852
+ "captures": {
853
+ "1": {
854
+ "name": "entity.name.scope-resolution.c3"
855
+ }
856
+ },
857
+ "match": "\\b(_*[a-z][0-9A-Z_a-z]*)\\b",
858
+ "name": "meta.path.c3"
859
+ }
860
+ ]
861
+ },
862
+ "operators": {
863
+ "patterns": [
864
+ {
865
+ "match": "=>",
866
+ "name": "keyword.declaration.function.arrow.c3"
867
+ },
868
+ {
869
+ "match": "(?:[-%\\&*+/^|]|>>|<<|\\+\\+\\+)=",
870
+ "name": "keyword.operator.assignment.augmented.c3"
871
+ },
872
+ {
873
+ "match": "<=|>=|==|[<>]|!=",
874
+ "name": "keyword.operator.comparison.c3"
875
+ },
876
+ {
877
+ "match": "\\.\\.\\.",
878
+ "name": "keyword.operator.variadic.c3"
879
+ },
880
+ {
881
+ "match": "\\.\\.",
882
+ "name": "keyword.operator.range.c3"
883
+ },
884
+ {
885
+ "match": "\\+\\+\\+?|--",
886
+ "name": "keyword.operator.arithmetic.c3"
887
+ },
888
+ {
889
+ "match": "<<|>>|&&&?|\\|\\|\\|?",
890
+ "name": "keyword.operator.arithmetic.c3"
891
+ },
892
+ {
893
+ "match": "[-%+/^|~]",
894
+ "name": "keyword.operator.arithmetic.c3"
895
+ },
896
+ {
897
+ "match": "=",
898
+ "name": "keyword.operator.assignment.c3"
899
+ },
900
+ {
901
+ "match": "\\?\\?\\??|\\?:|[!\\&*:?]",
902
+ "name": "keyword.operator.c3"
903
+ }
904
+ ]
905
+ },
906
+ "parameters": {
907
+ "patterns": [
908
+ {
909
+ "include": "#comments"
910
+ },
911
+ {
912
+ "begin": "\\$\\b_*[A-Z][0-9A-Z_]*[a-z][0-9A-Z_a-z]*\\b",
913
+ "beginCaptures": {
914
+ "0": {
915
+ "name": "support.type.c3"
916
+ }
917
+ },
918
+ "end": "(?=[),;])",
919
+ "patterns": [
920
+ {
921
+ "include": "#comments"
922
+ },
923
+ {
924
+ "include": "#attribute"
925
+ },
926
+ {
927
+ "begin": "=",
928
+ "beginCaptures": {
929
+ "0": {
930
+ "name": "keyword.operator.assignment.c3"
931
+ }
932
+ },
933
+ "end": "(?=[),;])",
934
+ "patterns": [
935
+ {
936
+ "include": "#expression"
937
+ }
938
+ ]
939
+ }
940
+ ]
941
+ },
942
+ {
943
+ "include": "#type"
944
+ },
945
+ {
946
+ "include": "#punctuation"
947
+ },
948
+ {
949
+ "match": "\\.\\.\\.",
950
+ "name": "keyword.operator.variadic.c3"
951
+ },
952
+ {
953
+ "match": "&",
954
+ "name": "keyword.operator.address.c3"
955
+ },
956
+ {
957
+ "begin": ";",
958
+ "beginCaptures": {
959
+ "0": {
960
+ "name": "punctuation.separator.c3"
961
+ }
962
+ },
963
+ "end": "(?=\\))",
964
+ "patterns": [
965
+ {
966
+ "include": "#comments"
967
+ },
968
+ {
969
+ "match": "@\\b_*[a-z][0-9A-Z_a-z]*\\b",
970
+ "name": "entity.name.function.c3"
971
+ },
972
+ {
973
+ "include": "#parameters"
974
+ }
975
+ ]
976
+ },
977
+ {
978
+ "begin": "[#$]?\\b_*[a-z][0-9A-Z_a-z]*\\b",
979
+ "beginCaptures": {
980
+ "0": {
981
+ "name": "variable.parameter.c3"
982
+ }
983
+ },
984
+ "end": "(?=[),;])",
985
+ "patterns": [
986
+ {
987
+ "include": "#comments"
988
+ },
989
+ {
990
+ "include": "#attribute"
991
+ },
992
+ {
993
+ "match": "\\.\\.\\.",
994
+ "name": "keyword.operator.variadic.c3"
995
+ },
996
+ {
997
+ "begin": "=",
998
+ "beginCaptures": {
999
+ "0": {
1000
+ "name": "keyword.operator.assignment.c3"
1001
+ }
1002
+ },
1003
+ "end": "(?=[),;])",
1004
+ "patterns": [
1005
+ {
1006
+ "include": "#expression"
1007
+ }
1008
+ ]
1009
+ }
1010
+ ]
1011
+ }
1012
+ ]
1013
+ },
1014
+ "parens": {
1015
+ "patterns": [
1016
+ {
1017
+ "begin": "\\(",
1018
+ "beginCaptures": {
1019
+ "0": {
1020
+ "name": "punctuation.section.group.begin.c3"
1021
+ }
1022
+ },
1023
+ "end": "\\)",
1024
+ "endCaptures": {
1025
+ "0": {
1026
+ "name": "punctuation.section.group.end.c3"
1027
+ }
1028
+ },
1029
+ "name": "meta.group.c3",
1030
+ "patterns": [
1031
+ {
1032
+ "include": "#expression"
1033
+ }
1034
+ ]
1035
+ }
1036
+ ]
1037
+ },
1038
+ "path": {
1039
+ "captures": {
1040
+ "1": {
1041
+ "name": "entity.name.scope-resolution.c3"
1042
+ },
1043
+ "2": {
1044
+ "name": "punctuation.separator.scope-resolution.c3"
1045
+ }
1046
+ },
1047
+ "match": "\\b(_*[a-z][0-9A-Z_a-z]*)\\b\\s*(::)",
1048
+ "name": "meta.path.c3"
1049
+ },
1050
+ "punctuation": {
1051
+ "patterns": [
1052
+ {
1053
+ "match": ",",
1054
+ "name": "punctuation.separator.c3"
1055
+ },
1056
+ {
1057
+ "match": ":",
1058
+ "name": "punctuation.separator.c3"
1059
+ },
1060
+ {
1061
+ "match": "\\.(?!\\.\\.)",
1062
+ "name": "punctuation.accessor.c3"
1063
+ }
1064
+ ]
1065
+ },
1066
+ "raw_string_literal": {
1067
+ "begin": "`",
1068
+ "beginCaptures": {
1069
+ "0": {
1070
+ "name": "punctuation.definition.string.begin.c3"
1071
+ }
1072
+ },
1073
+ "end": "`(?!`)",
1074
+ "endCaptures": {
1075
+ "0": {
1076
+ "name": "punctuation.definition.string.end.c3"
1077
+ }
1078
+ },
1079
+ "name": "string.quoted.other.c3",
1080
+ "patterns": [
1081
+ {
1082
+ "match": "``",
1083
+ "name": "constant.character.escape.c3"
1084
+ }
1085
+ ]
1086
+ },
1087
+ "real_literal": {
1088
+ "patterns": [
1089
+ {
1090
+ "match": "\\b[0-9](?:_?[0-9])*(?:[Ff](?:16|32|64|128)?|[Dd])",
1091
+ "name": "constant.numeric.float.c3"
1092
+ },
1093
+ {
1094
+ "match": "\\b(?:[0-9](?:_?[0-9])*[Ee][-+]?[0-9]+|[0-9](?:_?[0-9])*\\.(?!\\.)(?:[0-9](?:_?[0-9])*)?(?:[Ee][-+]?[0-9]+)?)(?:[Ff](?:16|32|64|128)?|[Dd])?",
1095
+ "name": "constant.numeric.float.c3"
1096
+ },
1097
+ {
1098
+ "match": "\\b0[Xx]\\h(?:_?\\h)*(?:\\.(?:\\h(?:_?\\h)*)?)?[Pp][-+]?[0-9]+(?:[Ff](?:16|32|64|128)?|[Dd])?",
1099
+ "name": "constant.numeric.float.c3"
1100
+ }
1101
+ ]
1102
+ },
1103
+ "statements": {
1104
+ "patterns": [
1105
+ {
1106
+ "include": "#comments"
1107
+ },
1108
+ {
1109
+ "include": "#modifier_keywords"
1110
+ },
1111
+ {
1112
+ "match": ";",
1113
+ "name": "punctuation.terminator.c3"
1114
+ },
1115
+ {
1116
+ "include": "#control_statements"
1117
+ },
1118
+ {
1119
+ "include": "#attribute"
1120
+ },
1121
+ {
1122
+ "include": "#block"
1123
+ },
1124
+ {
1125
+ "include": "#expression"
1126
+ }
1127
+ ]
1128
+ },
1129
+ "string_literal": {
1130
+ "begin": "\"",
1131
+ "beginCaptures": {
1132
+ "0": {
1133
+ "name": "punctuation.definition.string.begin.c3"
1134
+ }
1135
+ },
1136
+ "end": "\"",
1137
+ "endCaptures": {
1138
+ "0": {
1139
+ "name": "punctuation.definition.string.end.c3"
1140
+ }
1141
+ },
1142
+ "name": "string.quoted.double.c3",
1143
+ "patterns": [
1144
+ {
1145
+ "include": "#escape_sequence"
1146
+ }
1147
+ ]
1148
+ },
1149
+ "structlike": {
1150
+ "begin": "(?=\\b(?:((?:|bit)struct)|(union))\\b)",
1151
+ "end": "(?<=})",
1152
+ "patterns": [
1153
+ {
1154
+ "begin": "\\b(?:((?:|bit)struct)|(union))\\b",
1155
+ "beginCaptures": {
1156
+ "1": {
1157
+ "name": "keyword.declaration.struct.c3"
1158
+ },
1159
+ "2": {
1160
+ "name": "keyword.declaration.union.c3"
1161
+ }
1162
+ },
1163
+ "end": "(?=\\{)",
1164
+ "name": "meta.struct.c3",
1165
+ "patterns": [
1166
+ {
1167
+ "include": "#comments"
1168
+ },
1169
+ {
1170
+ "match": "\\b_*[A-Z][0-9A-Z_]*[a-z][0-9A-Z_a-z]*\\b",
1171
+ "name": "entity.name.type.struct.c3"
1172
+ },
1173
+ {
1174
+ "match": "\\b_*[a-z][0-9A-Z_a-z]*\\b",
1175
+ "name": "variable.other.member.c3"
1176
+ },
1177
+ {
1178
+ "include": "#attribute"
1179
+ },
1180
+ {
1181
+ "begin": ":",
1182
+ "beginCaptures": {
1183
+ "0": {
1184
+ "name": "punctuation.separator.c3"
1185
+ }
1186
+ },
1187
+ "end": "(?=\\{)",
1188
+ "patterns": [
1189
+ {
1190
+ "include": "#comments"
1191
+ },
1192
+ {
1193
+ "include": "#type_no_generics"
1194
+ },
1195
+ {
1196
+ "include": "#attribute"
1197
+ }
1198
+ ]
1199
+ },
1200
+ {
1201
+ "begin": "\\(",
1202
+ "beginCaptures": {
1203
+ "0": {
1204
+ "name": "punctuation.section.group.begin.c3"
1205
+ }
1206
+ },
1207
+ "end": "\\)",
1208
+ "endCaptures": {
1209
+ "0": {
1210
+ "name": "punctuation.section.group.end.c3"
1211
+ }
1212
+ },
1213
+ "name": "meta.group.c3",
1214
+ "patterns": [
1215
+ {
1216
+ "include": "#comments"
1217
+ },
1218
+ {
1219
+ "include": "#path"
1220
+ },
1221
+ {
1222
+ "include": "#type"
1223
+ },
1224
+ {
1225
+ "include": "#punctuation"
1226
+ }
1227
+ ]
1228
+ }
1229
+ ]
1230
+ },
1231
+ {
1232
+ "begin": "\\{",
1233
+ "beginCaptures": {
1234
+ "0": {
1235
+ "name": "punctuation.section.block.begin.c3"
1236
+ }
1237
+ },
1238
+ "end": "}",
1239
+ "endCaptures": {
1240
+ "0": {
1241
+ "name": "punctuation.section.block.end.c3"
1242
+ }
1243
+ },
1244
+ "name": "meta.struct.body.c3",
1245
+ "patterns": [
1246
+ {
1247
+ "include": "#comments"
1248
+ },
1249
+ {
1250
+ "include": "#structlike"
1251
+ },
1252
+ {
1253
+ "include": "#modifier_keywords"
1254
+ },
1255
+ {
1256
+ "include": "#type"
1257
+ },
1258
+ {
1259
+ "match": "\\b_*[a-z][0-9A-Z_a-z]*\\b",
1260
+ "name": "variable.other.member.c3"
1261
+ },
1262
+ {
1263
+ "include": "#attribute"
1264
+ },
1265
+ {
1266
+ "match": ";",
1267
+ "name": "punctuation.terminator.c3"
1268
+ },
1269
+ {
1270
+ "begin": ":",
1271
+ "beginCaptures": {
1272
+ "0": {
1273
+ "name": "punctuation.separator.c3"
1274
+ }
1275
+ },
1276
+ "end": "(?=;)",
1277
+ "patterns": [
1278
+ {
1279
+ "include": "#attribute"
1280
+ },
1281
+ {
1282
+ "include": "#expression"
1283
+ }
1284
+ ]
1285
+ }
1286
+ ]
1287
+ }
1288
+ ]
1289
+ },
1290
+ "top_level": {
1291
+ "patterns": [
1292
+ {
1293
+ "include": "#comments"
1294
+ },
1295
+ {
1296
+ "include": "#modifier_keywords"
1297
+ },
1298
+ {
1299
+ "begin": "\\$(?:assert|include|echo|exec)\\b",
1300
+ "beginCaptures": {
1301
+ "0": {
1302
+ "name": "keyword.other.c3"
1303
+ }
1304
+ },
1305
+ "end": ";",
1306
+ "endCaptures": {
1307
+ "0": {
1308
+ "name": "punctuation.terminator.c3"
1309
+ }
1310
+ },
1311
+ "patterns": [
1312
+ {
1313
+ "include": "#comments"
1314
+ },
1315
+ {
1316
+ "include": "#expression"
1317
+ }
1318
+ ]
1319
+ },
1320
+ {
1321
+ "begin": "\\bmodule\\b",
1322
+ "beginCaptures": {
1323
+ "0": {
1324
+ "name": "keyword.declaration.module.c3"
1325
+ }
1326
+ },
1327
+ "end": ";",
1328
+ "endCaptures": {
1329
+ "0": {
1330
+ "name": "punctuation.terminator.c3"
1331
+ }
1332
+ },
1333
+ "name": "meta.module.c3",
1334
+ "patterns": [
1335
+ {
1336
+ "include": "#comments"
1337
+ },
1338
+ {
1339
+ "include": "#attribute"
1340
+ },
1341
+ {
1342
+ "include": "#module_path"
1343
+ },
1344
+ {
1345
+ "include": "#generic_params"
1346
+ }
1347
+ ]
1348
+ },
1349
+ {
1350
+ "begin": "\\bimport\\b",
1351
+ "beginCaptures": {
1352
+ "0": {
1353
+ "name": "keyword.declaration.import.c3"
1354
+ }
1355
+ },
1356
+ "end": ";",
1357
+ "endCaptures": {
1358
+ "0": {
1359
+ "name": "punctuation.terminator.c3"
1360
+ }
1361
+ },
1362
+ "name": "meta.import.c3",
1363
+ "patterns": [
1364
+ {
1365
+ "include": "#comments"
1366
+ },
1367
+ {
1368
+ "include": "#attribute"
1369
+ },
1370
+ {
1371
+ "include": "#module_path"
1372
+ },
1373
+ {
1374
+ "match": ",",
1375
+ "name": "punctuation.separator.c3"
1376
+ }
1377
+ ]
1378
+ },
1379
+ {
1380
+ "include": "#function"
1381
+ },
1382
+ {
1383
+ "begin": "\\balias\\b",
1384
+ "beginCaptures": {
1385
+ "0": {
1386
+ "name": "keyword.declaration.alias.c3"
1387
+ }
1388
+ },
1389
+ "end": ";",
1390
+ "endCaptures": {
1391
+ "0": {
1392
+ "name": "punctuation.terminator.c3"
1393
+ }
1394
+ },
1395
+ "name": "meta.alias.c3",
1396
+ "patterns": [
1397
+ {
1398
+ "include": "#comments"
1399
+ },
1400
+ {
1401
+ "begin": "(?=\\b(_*[a-z][0-9A-Z_a-z]*)\\b\\s*=\\s*module)",
1402
+ "end": "(?=;)",
1403
+ "patterns": [
1404
+ {
1405
+ "begin": "\\b(_*[a-z][0-9A-Z_a-z]*)\\b",
1406
+ "end": "(?=;)",
1407
+ "patterns": [
1408
+ {
1409
+ "include": "#comments"
1410
+ },
1411
+ {
1412
+ "include": "#attribute"
1413
+ },
1414
+ {
1415
+ "begin": "=",
1416
+ "beginCaptures": {
1417
+ "0": {
1418
+ "name": "keyword.operator.assignment.c3"
1419
+ }
1420
+ },
1421
+ "end": "(?=;)",
1422
+ "patterns": [
1423
+ {
1424
+ "include": "#comments"
1425
+ },
1426
+ {
1427
+ "begin": "module",
1428
+ "beginCaptures": {
1429
+ "0": {
1430
+ "name": "keyword.declaration.module.c3"
1431
+ }
1432
+ },
1433
+ "end": "(?=;)",
1434
+ "patterns": [
1435
+ {
1436
+ "include": "#comments"
1437
+ },
1438
+ {
1439
+ "include": "#module_path"
1440
+ }
1441
+ ]
1442
+ }
1443
+ ]
1444
+ }
1445
+ ]
1446
+ }
1447
+ ]
1448
+ },
1449
+ {
1450
+ "begin": "(?:(@\\b_*[a-z][0-9A-Z_a-z]*)|\\b(_*[a-z][0-9A-Z_a-z]*)|\\b(_*[A-Z][0-9A-Z_]*))\\b",
1451
+ "beginCaptures": {
1452
+ "1": {
1453
+ "name": "entity.name.function.c3"
1454
+ },
1455
+ "2": {
1456
+ "name": "variable.global.c3"
1457
+ },
1458
+ "3": {
1459
+ "name": "variable.other.constant.c3"
1460
+ }
1461
+ },
1462
+ "end": "(?=;)",
1463
+ "patterns": [
1464
+ {
1465
+ "include": "#comments"
1466
+ },
1467
+ {
1468
+ "include": "#attribute"
1469
+ },
1470
+ {
1471
+ "include": "#assign_right_expression"
1472
+ }
1473
+ ]
1474
+ },
1475
+ {
1476
+ "begin": "\\b_*[A-Z][0-9A-Z_]*[a-z][0-9A-Z_a-z]*\\b",
1477
+ "beginCaptures": {
1478
+ "0": {
1479
+ "name": "entity.name.type.c3"
1480
+ }
1481
+ },
1482
+ "end": "(?=;)",
1483
+ "patterns": [
1484
+ {
1485
+ "include": "#comments"
1486
+ },
1487
+ {
1488
+ "include": "#attribute"
1489
+ },
1490
+ {
1491
+ "include": "#assign_right_expression"
1492
+ }
1493
+ ]
1494
+ }
1495
+ ]
1496
+ },
1497
+ {
1498
+ "begin": "\\btypedef\\b",
1499
+ "beginCaptures": {
1500
+ "0": {
1501
+ "name": "keyword.declaration.typedef.c3"
1502
+ }
1503
+ },
1504
+ "end": ";",
1505
+ "endCaptures": {
1506
+ "0": {
1507
+ "name": "punctuation.terminator.c3"
1508
+ }
1509
+ },
1510
+ "name": "meta.typedef.c3",
1511
+ "patterns": [
1512
+ {
1513
+ "include": "#comments"
1514
+ },
1515
+ {
1516
+ "begin": "\\b_*[A-Z][0-9A-Z_]*[a-z][0-9A-Z_a-z]*\\b",
1517
+ "beginCaptures": {
1518
+ "0": {
1519
+ "name": "entity.name.type.c3"
1520
+ }
1521
+ },
1522
+ "end": "(?=;)",
1523
+ "patterns": [
1524
+ {
1525
+ "include": "#comments"
1526
+ },
1527
+ {
1528
+ "include": "#parens"
1529
+ },
1530
+ {
1531
+ "include": "#attribute"
1532
+ },
1533
+ {
1534
+ "include": "#assign_right_expression"
1535
+ }
1536
+ ]
1537
+ }
1538
+ ]
1539
+ },
1540
+ {
1541
+ "begin": "\\bfaultdef\\b",
1542
+ "beginCaptures": {
1543
+ "0": {
1544
+ "name": "keyword.declaration.faultdef.c3"
1545
+ }
1546
+ },
1547
+ "end": ";",
1548
+ "endCaptures": {
1549
+ "0": {
1550
+ "name": "punctuation.terminator.c3"
1551
+ }
1552
+ },
1553
+ "name": "meta.faultdef.c3",
1554
+ "patterns": [
1555
+ {
1556
+ "include": "#comments"
1557
+ },
1558
+ {
1559
+ "include": "#attribute"
1560
+ },
1561
+ {
1562
+ "match": "\\b_*[A-Z][0-9A-Z_]*\\b",
1563
+ "name": "variable.other.constant.c3"
1564
+ },
1565
+ {
1566
+ "match": ",",
1567
+ "name": "punctuation.separator.c3"
1568
+ }
1569
+ ]
1570
+ },
1571
+ {
1572
+ "begin": "\\battrdef\\b",
1573
+ "beginCaptures": {
1574
+ "0": {
1575
+ "name": "keyword.declaration.attrdef.c3"
1576
+ }
1577
+ },
1578
+ "end": ";",
1579
+ "endCaptures": {
1580
+ "0": {
1581
+ "name": "punctuation.terminator.c3"
1582
+ }
1583
+ },
1584
+ "name": "meta.attrdef.c3",
1585
+ "patterns": [
1586
+ {
1587
+ "include": "#comments"
1588
+ },
1589
+ {
1590
+ "begin": "@\\b_*[A-Z][0-9A-Z_]*[a-z][0-9A-Z_a-z]*\\b",
1591
+ "beginCaptures": {
1592
+ "0": {
1593
+ "name": "keyword.annotation.c3"
1594
+ }
1595
+ },
1596
+ "end": "(?=;)",
1597
+ "patterns": [
1598
+ {
1599
+ "include": "#comments"
1600
+ },
1601
+ {
1602
+ "include": "#attribute"
1603
+ },
1604
+ {
1605
+ "begin": "\\(",
1606
+ "beginCaptures": {
1607
+ "0": {
1608
+ "name": "punctuation.section.group.begin.c3"
1609
+ }
1610
+ },
1611
+ "end": "\\)",
1612
+ "endCaptures": {
1613
+ "0": {
1614
+ "name": "punctuation.section.group.end.c3"
1615
+ }
1616
+ },
1617
+ "name": "meta.group.c3",
1618
+ "patterns": [
1619
+ {
1620
+ "include": "#parameters"
1621
+ }
1622
+ ]
1623
+ },
1624
+ {
1625
+ "begin": "=",
1626
+ "beginCaptures": {
1627
+ "0": {
1628
+ "name": "keyword.operator.assignment.c3"
1629
+ }
1630
+ },
1631
+ "end": "(?=;)",
1632
+ "patterns": [
1633
+ {
1634
+ "include": "#comments"
1635
+ },
1636
+ {
1637
+ "include": "#attribute"
1638
+ },
1639
+ {
1640
+ "match": ",",
1641
+ "name": "punctuation.separator.c3"
1642
+ }
1643
+ ]
1644
+ }
1645
+ ]
1646
+ }
1647
+ ]
1648
+ },
1649
+ {
1650
+ "include": "#structlike"
1651
+ },
1652
+ {
1653
+ "begin": "(?=\\benum\\b)",
1654
+ "end": "(?<=})",
1655
+ "patterns": [
1656
+ {
1657
+ "begin": "\\benum\\b",
1658
+ "beginCaptures": {
1659
+ "0": {
1660
+ "name": "keyword.declaration.enum.c3"
1661
+ }
1662
+ },
1663
+ "end": "(?=\\{)",
1664
+ "name": "meta.enum.c3",
1665
+ "patterns": [
1666
+ {
1667
+ "include": "#comments"
1668
+ },
1669
+ {
1670
+ "match": "\\b_*[A-Z][0-9A-Z_]*[a-z][0-9A-Z_a-z]*\\b",
1671
+ "name": "entity.name.type.enum.c3"
1672
+ },
1673
+ {
1674
+ "include": "#attribute"
1675
+ },
1676
+ {
1677
+ "begin": ":",
1678
+ "beginCaptures": {
1679
+ "0": {
1680
+ "name": "punctuation.separator.c3"
1681
+ }
1682
+ },
1683
+ "end": "(?=\\{)",
1684
+ "patterns": [
1685
+ {
1686
+ "include": "#comments"
1687
+ },
1688
+ {
1689
+ "match": "\\b(?:inline|const)\\b",
1690
+ "name": "storage.modifier.c3"
1691
+ },
1692
+ {
1693
+ "include": "#type_no_generics"
1694
+ },
1695
+ {
1696
+ "begin": "\\(",
1697
+ "beginCaptures": {
1698
+ "0": {
1699
+ "name": "punctuation.section.group.begin.c3"
1700
+ }
1701
+ },
1702
+ "contentName": "meta.group.c3",
1703
+ "end": "\\)",
1704
+ "endCaptures": {
1705
+ "0": {
1706
+ "name": "punctuation.section.group.end.c3"
1707
+ }
1708
+ },
1709
+ "patterns": [
1710
+ {
1711
+ "include": "#comments"
1712
+ },
1713
+ {
1714
+ "match": "\\b(?:inline|const)\\b",
1715
+ "name": "storage.modifier.c3"
1716
+ },
1717
+ {
1718
+ "include": "#parameters"
1719
+ }
1720
+ ]
1721
+ },
1722
+ {
1723
+ "include": "#attribute"
1724
+ }
1725
+ ]
1726
+ }
1727
+ ]
1728
+ },
1729
+ {
1730
+ "begin": "\\{",
1731
+ "beginCaptures": {
1732
+ "0": {
1733
+ "name": "punctuation.section.block.begin.c3"
1734
+ }
1735
+ },
1736
+ "end": "}",
1737
+ "endCaptures": {
1738
+ "0": {
1739
+ "name": "punctuation.section.block.end.c3"
1740
+ }
1741
+ },
1742
+ "name": "meta.enum.body.c3",
1743
+ "patterns": [
1744
+ {
1745
+ "include": "#comments"
1746
+ },
1747
+ {
1748
+ "begin": "=",
1749
+ "beginCaptures": {
1750
+ "0": {
1751
+ "name": "keyword.operator.assignment.c3"
1752
+ }
1753
+ },
1754
+ "end": "(?=,)",
1755
+ "patterns": [
1756
+ {
1757
+ "include": "#expression"
1758
+ }
1759
+ ]
1760
+ },
1761
+ {
1762
+ "include": "#attribute"
1763
+ },
1764
+ {
1765
+ "match": "\\b_*[A-Z][0-9A-Z_]*\\b",
1766
+ "name": "variable.other.constant.c3"
1767
+ },
1768
+ {
1769
+ "match": ",",
1770
+ "name": "punctuation.separator.c3"
1771
+ }
1772
+ ]
1773
+ }
1774
+ ]
1775
+ },
1776
+ {
1777
+ "begin": "(?=\\binterface\\b)",
1778
+ "end": "(?<=})",
1779
+ "patterns": [
1780
+ {
1781
+ "begin": "\\binterface\\b",
1782
+ "beginCaptures": {
1783
+ "0": {
1784
+ "name": "keyword.declaration.interface.c3"
1785
+ }
1786
+ },
1787
+ "end": "(?=\\{)",
1788
+ "name": "meta.interface.c3",
1789
+ "patterns": [
1790
+ {
1791
+ "include": "#comments"
1792
+ },
1793
+ {
1794
+ "match": "\\b_*[A-Z][0-9A-Z_]*[a-z][0-9A-Z_a-z]*\\b",
1795
+ "name": "entity.name.type.interface.c3"
1796
+ },
1797
+ {
1798
+ "include": "#attribute"
1799
+ },
1800
+ {
1801
+ "begin": ":",
1802
+ "beginCaptures": {
1803
+ "0": {
1804
+ "name": "punctuation.separator.c3"
1805
+ }
1806
+ },
1807
+ "end": "(?=\\{)",
1808
+ "patterns": [
1809
+ {
1810
+ "include": "#comments"
1811
+ },
1812
+ {
1813
+ "include": "#punctuation"
1814
+ },
1815
+ {
1816
+ "include": "#type_no_generics"
1817
+ }
1818
+ ]
1819
+ }
1820
+ ]
1821
+ },
1822
+ {
1823
+ "begin": "\\{",
1824
+ "beginCaptures": {
1825
+ "0": {
1826
+ "name": "punctuation.section.block.begin.c3"
1827
+ }
1828
+ },
1829
+ "end": "}",
1830
+ "endCaptures": {
1831
+ "0": {
1832
+ "name": "punctuation.section.block.end.c3"
1833
+ }
1834
+ },
1835
+ "name": "meta.interface.body.c3",
1836
+ "patterns": [
1837
+ {
1838
+ "include": "#comments"
1839
+ },
1840
+ {
1841
+ "match": ";",
1842
+ "name": "punctuation.terminator.c3"
1843
+ },
1844
+ {
1845
+ "include": "#function"
1846
+ }
1847
+ ]
1848
+ }
1849
+ ]
1850
+ }
1851
+ ]
1852
+ },
1853
+ "type": {
1854
+ "patterns": [
1855
+ {
1856
+ "include": "#path"
1857
+ },
1858
+ {
1859
+ "begin": "(?:\\b(void|bool|char|double|float|float16|bfloat|int128|ichar|int|iptr|isz|long|short|uint128|uint|ulong|uptr|ushort|usz|float128|any|fault|typeid)|(\\$?\\b\\b_*[A-Z][0-9A-Z_]*[a-z][0-9A-Z_a-z]*)\\b)\\b",
1860
+ "beginCaptures": {
1861
+ "1": {
1862
+ "name": "storage.type.built-in.primitive.c3"
1863
+ },
1864
+ "2": {
1865
+ "name": "support.type.c3"
1866
+ }
1867
+ },
1868
+ "end": "(?=\\*>|[^\\t *?\\[{])",
1869
+ "patterns": [
1870
+ {
1871
+ "include": "#comments"
1872
+ },
1873
+ {
1874
+ "include": "#generic_params"
1875
+ },
1876
+ {
1877
+ "include": "#type_suffix"
1878
+ }
1879
+ ]
1880
+ },
1881
+ {
1882
+ "include": "#type_expr"
1883
+ }
1884
+ ]
1885
+ },
1886
+ "type_expr": {
1887
+ "patterns": [
1888
+ {
1889
+ "begin": "\\$(?:typeof|typefrom|evaltype)\\b",
1890
+ "beginCaptures": {
1891
+ "0": {
1892
+ "name": "storage.type.c3"
1893
+ }
1894
+ },
1895
+ "end": "(?<=\\))",
1896
+ "patterns": [
1897
+ {
1898
+ "include": "#parens"
1899
+ }
1900
+ ]
1901
+ },
1902
+ {
1903
+ "begin": "\\$vatype\\b",
1904
+ "beginCaptures": {
1905
+ "0": {
1906
+ "name": "storage.type.c3"
1907
+ }
1908
+ },
1909
+ "end": "(?<=])",
1910
+ "patterns": [
1911
+ {
1912
+ "include": "#brackets"
1913
+ }
1914
+ ]
1915
+ },
1916
+ {
1917
+ "include": "#type_suffix"
1918
+ }
1919
+ ]
1920
+ },
1921
+ "type_no_generics": {
1922
+ "patterns": [
1923
+ {
1924
+ "include": "#path"
1925
+ },
1926
+ {
1927
+ "begin": "(?:\\b(void|bool|char|double|float|float16|bfloat|int128|ichar|int|iptr|isz|long|short|uint128|uint|ulong|uptr|ushort|usz|float128|any|fault|typeid)|(\\$?\\b\\b_*[A-Z][0-9A-Z_]*[a-z][0-9A-Z_a-z]*)\\b)\\b",
1928
+ "beginCaptures": {
1929
+ "1": {
1930
+ "name": "storage.type.built-in.primitive.c3"
1931
+ },
1932
+ "2": {
1933
+ "name": "support.type.c3"
1934
+ }
1935
+ },
1936
+ "end": "(?=[^\\t *?@\\[])",
1937
+ "patterns": [
1938
+ {
1939
+ "include": "#comments"
1940
+ },
1941
+ {
1942
+ "include": "#type_suffix"
1943
+ }
1944
+ ]
1945
+ },
1946
+ {
1947
+ "include": "#type_expr"
1948
+ }
1949
+ ]
1950
+ },
1951
+ "type_suffix": {
1952
+ "patterns": [
1953
+ {
1954
+ "include": "#brackets"
1955
+ },
1956
+ {
1957
+ "match": "\\*",
1958
+ "name": "keyword.operator.address.c3"
1959
+ },
1960
+ {
1961
+ "match": "\\?",
1962
+ "name": "keyword.operator.c3"
1963
+ }
1964
+ ]
1965
+ },
1966
+ "variable": {
1967
+ "begin": "(?<!#)\\$?\\b_*[a-z][0-9A-Z_a-z]*\\b",
1968
+ "beginCaptures": {
1969
+ "0": {
1970
+ "name": "variable.other.c3"
1971
+ }
1972
+ },
1973
+ "end": "(?=[^\\t {])|(?<=})",
1974
+ "patterns": [
1975
+ {
1976
+ "include": "#generic_params"
1977
+ }
1978
+ ]
1979
+ }
1980
+ },
1981
+ "scopeName": "source.c3"
1982
+ }