@codingame/monaco-vscode-csharp-default-extension 1.81.8-next.1

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,5014 @@
1
+ {
2
+ "information_for_contributors": [
3
+ "This file has been converted from https://github.com/dotnet/csharp-tmLanguage/blob/master/grammars/csharp.tmLanguage",
4
+ "If you want to provide a fix or improvement, please create a pull request against the original repository.",
5
+ "Once accepted there, we are happy to receive an update request."
6
+ ],
7
+ "version": "https://github.com/dotnet/csharp-tmLanguage/commit/878aefe73f942ac68dc4a46a0f154661bcb9eff4",
8
+ "name": "C#",
9
+ "scopeName": "source.cs",
10
+ "patterns": [
11
+ {
12
+ "include": "#preprocessor"
13
+ },
14
+ {
15
+ "include": "#comment"
16
+ },
17
+ {
18
+ "include": "#directives"
19
+ },
20
+ {
21
+ "include": "#declarations"
22
+ },
23
+ {
24
+ "include": "#script-top-level"
25
+ }
26
+ ],
27
+ "repository": {
28
+ "directives": {
29
+ "patterns": [
30
+ {
31
+ "include": "#extern-alias-directive"
32
+ },
33
+ {
34
+ "include": "#using-directive"
35
+ },
36
+ {
37
+ "include": "#attribute-section"
38
+ },
39
+ {
40
+ "include": "#punctuation-semicolon"
41
+ }
42
+ ]
43
+ },
44
+ "declarations": {
45
+ "patterns": [
46
+ {
47
+ "include": "#namespace-declaration"
48
+ },
49
+ {
50
+ "include": "#type-declarations"
51
+ },
52
+ {
53
+ "include": "#punctuation-semicolon"
54
+ }
55
+ ]
56
+ },
57
+ "script-top-level": {
58
+ "patterns": [
59
+ {
60
+ "include": "#statement"
61
+ },
62
+ {
63
+ "include": "#method-declaration"
64
+ },
65
+ {
66
+ "include": "#punctuation-semicolon"
67
+ }
68
+ ]
69
+ },
70
+ "type-declarations": {
71
+ "patterns": [
72
+ {
73
+ "include": "#preprocessor"
74
+ },
75
+ {
76
+ "include": "#comment"
77
+ },
78
+ {
79
+ "include": "#storage-modifier"
80
+ },
81
+ {
82
+ "include": "#class-declaration"
83
+ },
84
+ {
85
+ "include": "#delegate-declaration"
86
+ },
87
+ {
88
+ "include": "#enum-declaration"
89
+ },
90
+ {
91
+ "include": "#interface-declaration"
92
+ },
93
+ {
94
+ "include": "#struct-declaration"
95
+ },
96
+ {
97
+ "include": "#record-declaration"
98
+ },
99
+ {
100
+ "include": "#attribute-section"
101
+ },
102
+ {
103
+ "include": "#punctuation-semicolon"
104
+ }
105
+ ]
106
+ },
107
+ "class-or-struct-members": {
108
+ "patterns": [
109
+ {
110
+ "include": "#preprocessor"
111
+ },
112
+ {
113
+ "include": "#comment"
114
+ },
115
+ {
116
+ "include": "#storage-modifier"
117
+ },
118
+ {
119
+ "include": "#type-declarations"
120
+ },
121
+ {
122
+ "include": "#property-declaration"
123
+ },
124
+ {
125
+ "include": "#field-declaration"
126
+ },
127
+ {
128
+ "include": "#event-declaration"
129
+ },
130
+ {
131
+ "include": "#indexer-declaration"
132
+ },
133
+ {
134
+ "include": "#variable-initializer"
135
+ },
136
+ {
137
+ "include": "#constructor-declaration"
138
+ },
139
+ {
140
+ "include": "#destructor-declaration"
141
+ },
142
+ {
143
+ "include": "#operator-declaration"
144
+ },
145
+ {
146
+ "include": "#conversion-operator-declaration"
147
+ },
148
+ {
149
+ "include": "#method-declaration"
150
+ },
151
+ {
152
+ "include": "#attribute-section"
153
+ },
154
+ {
155
+ "include": "#punctuation-semicolon"
156
+ }
157
+ ]
158
+ },
159
+ "interface-members": {
160
+ "patterns": [
161
+ {
162
+ "include": "#preprocessor"
163
+ },
164
+ {
165
+ "include": "#comment"
166
+ },
167
+ {
168
+ "include": "#property-declaration"
169
+ },
170
+ {
171
+ "include": "#event-declaration"
172
+ },
173
+ {
174
+ "include": "#indexer-declaration"
175
+ },
176
+ {
177
+ "include": "#method-declaration"
178
+ },
179
+ {
180
+ "include": "#attribute-section"
181
+ },
182
+ {
183
+ "include": "#punctuation-semicolon"
184
+ }
185
+ ]
186
+ },
187
+ "statement": {
188
+ "patterns": [
189
+ {
190
+ "include": "#preprocessor"
191
+ },
192
+ {
193
+ "include": "#comment"
194
+ },
195
+ {
196
+ "include": "#while-statement"
197
+ },
198
+ {
199
+ "include": "#do-statement"
200
+ },
201
+ {
202
+ "include": "#for-statement"
203
+ },
204
+ {
205
+ "include": "#foreach-statement"
206
+ },
207
+ {
208
+ "include": "#if-statement"
209
+ },
210
+ {
211
+ "include": "#else-part"
212
+ },
213
+ {
214
+ "include": "#switch-statement"
215
+ },
216
+ {
217
+ "include": "#goto-statement"
218
+ },
219
+ {
220
+ "include": "#return-statement"
221
+ },
222
+ {
223
+ "include": "#break-or-continue-statement"
224
+ },
225
+ {
226
+ "include": "#throw-statement"
227
+ },
228
+ {
229
+ "include": "#yield-statement"
230
+ },
231
+ {
232
+ "include": "#await-statement"
233
+ },
234
+ {
235
+ "include": "#try-statement"
236
+ },
237
+ {
238
+ "include": "#checked-unchecked-statement"
239
+ },
240
+ {
241
+ "include": "#lock-statement"
242
+ },
243
+ {
244
+ "include": "#using-statement"
245
+ },
246
+ {
247
+ "include": "#labeled-statement"
248
+ },
249
+ {
250
+ "include": "#object-creation-expression"
251
+ },
252
+ {
253
+ "include": "#array-creation-expression"
254
+ },
255
+ {
256
+ "include": "#anonymous-object-creation-expression"
257
+ },
258
+ {
259
+ "include": "#local-declaration"
260
+ },
261
+ {
262
+ "include": "#block"
263
+ },
264
+ {
265
+ "include": "#expression"
266
+ },
267
+ {
268
+ "include": "#punctuation-semicolon"
269
+ }
270
+ ]
271
+ },
272
+ "expression": {
273
+ "patterns": [
274
+ {
275
+ "include": "#preprocessor"
276
+ },
277
+ {
278
+ "include": "#comment"
279
+ },
280
+ {
281
+ "include": "#checked-unchecked-expression"
282
+ },
283
+ {
284
+ "include": "#typeof-or-default-expression"
285
+ },
286
+ {
287
+ "include": "#nameof-expression"
288
+ },
289
+ {
290
+ "include": "#throw-expression"
291
+ },
292
+ {
293
+ "include": "#raw-interpolated-string"
294
+ },
295
+ {
296
+ "include": "#interpolated-string"
297
+ },
298
+ {
299
+ "include": "#verbatim-interpolated-string"
300
+ },
301
+ {
302
+ "include": "#this-or-base-expression"
303
+ },
304
+ {
305
+ "include": "#switch-expression"
306
+ },
307
+ {
308
+ "include": "#conditional-operator"
309
+ },
310
+ {
311
+ "include": "#expression-operators"
312
+ },
313
+ {
314
+ "include": "#await-expression"
315
+ },
316
+ {
317
+ "include": "#query-expression"
318
+ },
319
+ {
320
+ "include": "#as-expression"
321
+ },
322
+ {
323
+ "include": "#is-expression"
324
+ },
325
+ {
326
+ "include": "#anonymous-method-expression"
327
+ },
328
+ {
329
+ "include": "#object-creation-expression"
330
+ },
331
+ {
332
+ "include": "#array-creation-expression"
333
+ },
334
+ {
335
+ "include": "#anonymous-object-creation-expression"
336
+ },
337
+ {
338
+ "include": "#invocation-expression"
339
+ },
340
+ {
341
+ "include": "#member-access-expression"
342
+ },
343
+ {
344
+ "include": "#element-access-expression"
345
+ },
346
+ {
347
+ "include": "#cast-expression"
348
+ },
349
+ {
350
+ "include": "#literal"
351
+ },
352
+ {
353
+ "include": "#parenthesized-expression"
354
+ },
355
+ {
356
+ "include": "#tuple-deconstruction-assignment"
357
+ },
358
+ {
359
+ "include": "#initializer-expression"
360
+ },
361
+ {
362
+ "include": "#identifier"
363
+ }
364
+ ]
365
+ },
366
+ "extern-alias-directive": {
367
+ "begin": "\\s*(extern)\\b\\s*(alias)\\b\\s*(@?[_[:alpha:]][_[:alnum:]]*)",
368
+ "beginCaptures": {
369
+ "1": {
370
+ "name": "keyword.other.extern.cs"
371
+ },
372
+ "2": {
373
+ "name": "keyword.other.alias.cs"
374
+ },
375
+ "3": {
376
+ "name": "variable.other.alias.cs"
377
+ }
378
+ },
379
+ "end": "(?=;)"
380
+ },
381
+ "using-directive": {
382
+ "patterns": [
383
+ {
384
+ "begin": "(\\b(global)\\b\\s+)?\\b(using)\\b\\s+(static)\\b\\s+(\\b(unsafe)\\b\\s+)?",
385
+ "beginCaptures": {
386
+ "2": {
387
+ "name": "keyword.other.global.cs"
388
+ },
389
+ "3": {
390
+ "name": "keyword.other.using.cs"
391
+ },
392
+ "4": {
393
+ "name": "keyword.other.static.cs"
394
+ },
395
+ "6": {
396
+ "name": "storage.modifier.cs"
397
+ }
398
+ },
399
+ "end": "(?=;)",
400
+ "patterns": [
401
+ {
402
+ "include": "#type"
403
+ }
404
+ ]
405
+ },
406
+ {
407
+ "begin": "(\\b(global)\\b\\s+)?\\b(using)\\b\\s+(\\b(unsafe)\\b\\s+)?(?=(@?[_[:alpha:]][_[:alnum:]]*)\\s*=)",
408
+ "beginCaptures": {
409
+ "2": {
410
+ "name": "keyword.other.global.cs"
411
+ },
412
+ "3": {
413
+ "name": "keyword.other.using.cs"
414
+ },
415
+ "5": {
416
+ "name": "storage.modifier.cs"
417
+ },
418
+ "6": {
419
+ "name": "entity.name.type.alias.cs"
420
+ }
421
+ },
422
+ "end": "(?=;)",
423
+ "patterns": [
424
+ {
425
+ "include": "#comment"
426
+ },
427
+ {
428
+ "include": "#type"
429
+ },
430
+ {
431
+ "include": "#operator-assignment"
432
+ }
433
+ ]
434
+ },
435
+ {
436
+ "begin": "(\\b(global)\\b\\s+)?\\b(using)\\s*(?!\\(|\\s|var)",
437
+ "beginCaptures": {
438
+ "2": {
439
+ "name": "keyword.other.global.cs"
440
+ },
441
+ "3": {
442
+ "name": "keyword.other.using.cs"
443
+ }
444
+ },
445
+ "end": "(?=;)",
446
+ "patterns": [
447
+ {
448
+ "include": "#comment"
449
+ },
450
+ {
451
+ "name": "entity.name.type.namespace.cs",
452
+ "match": "@?[_[:alpha:]][_[:alnum:]]*"
453
+ },
454
+ {
455
+ "include": "#operator-assignment"
456
+ }
457
+ ]
458
+ }
459
+ ]
460
+ },
461
+ "attribute-section": {
462
+ "begin": "(\\[)(assembly|module|field|event|method|param|property|return|type)?(\\:)?",
463
+ "beginCaptures": {
464
+ "1": {
465
+ "name": "punctuation.squarebracket.open.cs"
466
+ },
467
+ "2": {
468
+ "name": "keyword.other.attribute-specifier.cs"
469
+ },
470
+ "3": {
471
+ "name": "punctuation.separator.colon.cs"
472
+ }
473
+ },
474
+ "end": "(\\])",
475
+ "endCaptures": {
476
+ "1": {
477
+ "name": "punctuation.squarebracket.close.cs"
478
+ }
479
+ },
480
+ "patterns": [
481
+ {
482
+ "include": "#comment"
483
+ },
484
+ {
485
+ "include": "#attribute"
486
+ },
487
+ {
488
+ "include": "#punctuation-comma"
489
+ }
490
+ ]
491
+ },
492
+ "attribute": {
493
+ "patterns": [
494
+ {
495
+ "include": "#type-name"
496
+ },
497
+ {
498
+ "include": "#attribute-arguments"
499
+ }
500
+ ]
501
+ },
502
+ "attribute-arguments": {
503
+ "begin": "(\\()",
504
+ "beginCaptures": {
505
+ "1": {
506
+ "name": "punctuation.parenthesis.open.cs"
507
+ }
508
+ },
509
+ "end": "(\\))",
510
+ "endCaptures": {
511
+ "1": {
512
+ "name": "punctuation.parenthesis.close.cs"
513
+ }
514
+ },
515
+ "patterns": [
516
+ {
517
+ "include": "#attribute-named-argument"
518
+ },
519
+ {
520
+ "include": "#expression"
521
+ },
522
+ {
523
+ "include": "#punctuation-comma"
524
+ }
525
+ ]
526
+ },
527
+ "attribute-named-argument": {
528
+ "begin": "(@?[_[:alpha:]][_[:alnum:]]*)\\s*(?==)",
529
+ "beginCaptures": {
530
+ "1": {
531
+ "name": "entity.name.variable.property.cs"
532
+ }
533
+ },
534
+ "end": "(?=(,|\\)))",
535
+ "patterns": [
536
+ {
537
+ "include": "#operator-assignment"
538
+ },
539
+ {
540
+ "include": "#expression"
541
+ }
542
+ ]
543
+ },
544
+ "namespace-declaration": {
545
+ "begin": "\\b(namespace)\\s+",
546
+ "beginCaptures": {
547
+ "1": {
548
+ "name": "keyword.other.namespace.cs"
549
+ }
550
+ },
551
+ "end": "(?<=\\})|(?=;)",
552
+ "patterns": [
553
+ {
554
+ "include": "#comment"
555
+ },
556
+ {
557
+ "name": "entity.name.type.namespace.cs",
558
+ "match": "@?[_[:alpha:]][_[:alnum:]]*"
559
+ },
560
+ {
561
+ "include": "#punctuation-accessor"
562
+ },
563
+ {
564
+ "begin": "\\{",
565
+ "beginCaptures": {
566
+ "0": {
567
+ "name": "punctuation.curlybrace.open.cs"
568
+ }
569
+ },
570
+ "end": "\\}",
571
+ "endCaptures": {
572
+ "0": {
573
+ "name": "punctuation.curlybrace.close.cs"
574
+ }
575
+ },
576
+ "patterns": [
577
+ {
578
+ "include": "#declarations"
579
+ },
580
+ {
581
+ "include": "#using-directive"
582
+ },
583
+ {
584
+ "include": "#punctuation-semicolon"
585
+ }
586
+ ]
587
+ }
588
+ ]
589
+ },
590
+ "storage-modifier": {
591
+ "name": "storage.modifier.cs",
592
+ "match": "(?<!\\.)\\b(new|public|protected|internal|private|abstract|virtual|override|sealed|static|partial|readonly|volatile|const|extern|async|unsafe|ref|required|file)\\b"
593
+ },
594
+ "class-declaration": {
595
+ "begin": "(?=(\\brecord\\b\\s+)?\\bclass\\b)",
596
+ "end": "(?<=\\})|(?=;)",
597
+ "patterns": [
598
+ {
599
+ "begin": "(?x)\n(\\b(record)\\b\\s+)?\n\\b(class)\\b\\s+\n(@?[_[:alpha:]][_[:alnum:]]*)\\s*",
600
+ "beginCaptures": {
601
+ "2": {
602
+ "name": "keyword.other.record.cs"
603
+ },
604
+ "3": {
605
+ "name": "keyword.other.class.cs"
606
+ },
607
+ "4": {
608
+ "name": "entity.name.type.class.cs"
609
+ }
610
+ },
611
+ "end": "(?=\\{)|(?=;)",
612
+ "patterns": [
613
+ {
614
+ "include": "#comment"
615
+ },
616
+ {
617
+ "include": "#type-parameter-list"
618
+ },
619
+ {
620
+ "include": "#parenthesized-parameter-list"
621
+ },
622
+ {
623
+ "include": "#base-types"
624
+ },
625
+ {
626
+ "include": "#generic-constraints"
627
+ }
628
+ ]
629
+ },
630
+ {
631
+ "begin": "\\{",
632
+ "beginCaptures": {
633
+ "0": {
634
+ "name": "punctuation.curlybrace.open.cs"
635
+ }
636
+ },
637
+ "end": "\\}",
638
+ "endCaptures": {
639
+ "0": {
640
+ "name": "punctuation.curlybrace.close.cs"
641
+ }
642
+ },
643
+ "patterns": [
644
+ {
645
+ "include": "#class-or-struct-members"
646
+ }
647
+ ]
648
+ },
649
+ {
650
+ "include": "#preprocessor"
651
+ },
652
+ {
653
+ "include": "#comment"
654
+ }
655
+ ]
656
+ },
657
+ "delegate-declaration": {
658
+ "begin": "(?x)\n(?:\\b(delegate)\\b)\\s+\n(?<type_name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g<identifier>)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()",
659
+ "beginCaptures": {
660
+ "1": {
661
+ "name": "keyword.other.delegate.cs"
662
+ },
663
+ "2": {
664
+ "patterns": [
665
+ {
666
+ "include": "#type"
667
+ }
668
+ ]
669
+ },
670
+ "7": {
671
+ "name": "entity.name.type.delegate.cs"
672
+ },
673
+ "8": {
674
+ "patterns": [
675
+ {
676
+ "include": "#type-parameter-list"
677
+ }
678
+ ]
679
+ }
680
+ },
681
+ "end": "(?=;)",
682
+ "patterns": [
683
+ {
684
+ "include": "#comment"
685
+ },
686
+ {
687
+ "include": "#parenthesized-parameter-list"
688
+ },
689
+ {
690
+ "include": "#generic-constraints"
691
+ }
692
+ ]
693
+ },
694
+ "enum-declaration": {
695
+ "begin": "(?=\\benum\\b)",
696
+ "end": "(?<=\\})",
697
+ "patterns": [
698
+ {
699
+ "begin": "(?=enum)",
700
+ "end": "(?=\\{)",
701
+ "patterns": [
702
+ {
703
+ "include": "#comment"
704
+ },
705
+ {
706
+ "match": "(enum)\\s+(@?[_[:alpha:]][_[:alnum:]]*)",
707
+ "captures": {
708
+ "1": {
709
+ "name": "keyword.other.enum.cs"
710
+ },
711
+ "2": {
712
+ "name": "entity.name.type.enum.cs"
713
+ }
714
+ }
715
+ },
716
+ {
717
+ "begin": ":",
718
+ "beginCaptures": {
719
+ "0": {
720
+ "name": "punctuation.separator.colon.cs"
721
+ }
722
+ },
723
+ "end": "(?=\\{)",
724
+ "patterns": [
725
+ {
726
+ "include": "#type"
727
+ }
728
+ ]
729
+ }
730
+ ]
731
+ },
732
+ {
733
+ "begin": "\\{",
734
+ "beginCaptures": {
735
+ "0": {
736
+ "name": "punctuation.curlybrace.open.cs"
737
+ }
738
+ },
739
+ "end": "\\}",
740
+ "endCaptures": {
741
+ "0": {
742
+ "name": "punctuation.curlybrace.close.cs"
743
+ }
744
+ },
745
+ "patterns": [
746
+ {
747
+ "include": "#preprocessor"
748
+ },
749
+ {
750
+ "include": "#comment"
751
+ },
752
+ {
753
+ "include": "#attribute-section"
754
+ },
755
+ {
756
+ "include": "#punctuation-comma"
757
+ },
758
+ {
759
+ "begin": "@?[_[:alpha:]][_[:alnum:]]*",
760
+ "beginCaptures": {
761
+ "0": {
762
+ "name": "entity.name.variable.enum-member.cs"
763
+ }
764
+ },
765
+ "end": "(?=(,|\\}))",
766
+ "patterns": [
767
+ {
768
+ "include": "#comment"
769
+ },
770
+ {
771
+ "include": "#variable-initializer"
772
+ }
773
+ ]
774
+ }
775
+ ]
776
+ },
777
+ {
778
+ "include": "#preprocessor"
779
+ },
780
+ {
781
+ "include": "#comment"
782
+ }
783
+ ]
784
+ },
785
+ "interface-declaration": {
786
+ "begin": "(?=\\binterface\\b)",
787
+ "end": "(?<=\\})",
788
+ "patterns": [
789
+ {
790
+ "begin": "(?x)\n(interface)\\b\\s+\n(@?[_[:alpha:]][_[:alnum:]]*)",
791
+ "beginCaptures": {
792
+ "1": {
793
+ "name": "keyword.other.interface.cs"
794
+ },
795
+ "2": {
796
+ "name": "entity.name.type.interface.cs"
797
+ }
798
+ },
799
+ "end": "(?=\\{)",
800
+ "patterns": [
801
+ {
802
+ "include": "#comment"
803
+ },
804
+ {
805
+ "include": "#type-parameter-list"
806
+ },
807
+ {
808
+ "include": "#base-types"
809
+ },
810
+ {
811
+ "include": "#generic-constraints"
812
+ }
813
+ ]
814
+ },
815
+ {
816
+ "begin": "\\{",
817
+ "beginCaptures": {
818
+ "0": {
819
+ "name": "punctuation.curlybrace.open.cs"
820
+ }
821
+ },
822
+ "end": "\\}",
823
+ "endCaptures": {
824
+ "0": {
825
+ "name": "punctuation.curlybrace.close.cs"
826
+ }
827
+ },
828
+ "patterns": [
829
+ {
830
+ "include": "#interface-members"
831
+ }
832
+ ]
833
+ },
834
+ {
835
+ "include": "#preprocessor"
836
+ },
837
+ {
838
+ "include": "#comment"
839
+ }
840
+ ]
841
+ },
842
+ "record-declaration": {
843
+ "begin": "(?=\\brecord\\b)",
844
+ "end": "(?<=\\})|(?=;)",
845
+ "patterns": [
846
+ {
847
+ "begin": "(?x)\n(record)\\b\\s+\n(@?[_[:alpha:]][_[:alnum:]]*)",
848
+ "beginCaptures": {
849
+ "1": {
850
+ "name": "keyword.other.record.cs"
851
+ },
852
+ "2": {
853
+ "name": "entity.name.type.class.cs"
854
+ }
855
+ },
856
+ "end": "(?=\\{)|(?=;)",
857
+ "patterns": [
858
+ {
859
+ "include": "#comment"
860
+ },
861
+ {
862
+ "include": "#type-parameter-list"
863
+ },
864
+ {
865
+ "include": "#parenthesized-parameter-list"
866
+ },
867
+ {
868
+ "include": "#base-types"
869
+ },
870
+ {
871
+ "include": "#generic-constraints"
872
+ }
873
+ ]
874
+ },
875
+ {
876
+ "begin": "\\{",
877
+ "beginCaptures": {
878
+ "0": {
879
+ "name": "punctuation.curlybrace.open.cs"
880
+ }
881
+ },
882
+ "end": "\\}",
883
+ "endCaptures": {
884
+ "0": {
885
+ "name": "punctuation.curlybrace.close.cs"
886
+ }
887
+ },
888
+ "patterns": [
889
+ {
890
+ "include": "#class-or-struct-members"
891
+ }
892
+ ]
893
+ },
894
+ {
895
+ "include": "#preprocessor"
896
+ },
897
+ {
898
+ "include": "#comment"
899
+ }
900
+ ]
901
+ },
902
+ "struct-declaration": {
903
+ "begin": "(?=(\\brecord\\b\\s+)?\\bstruct\\b)",
904
+ "end": "(?<=\\})|(?=;)",
905
+ "patterns": [
906
+ {
907
+ "begin": "(?x)\n(\\b(record)\\b\\s+)?\n(struct)\\b\\s+\n(@?[_[:alpha:]][_[:alnum:]]*)",
908
+ "beginCaptures": {
909
+ "2": {
910
+ "name": "keyword.other.record.cs"
911
+ },
912
+ "3": {
913
+ "name": "keyword.other.struct.cs"
914
+ },
915
+ "4": {
916
+ "name": "entity.name.type.struct.cs"
917
+ }
918
+ },
919
+ "end": "(?=\\{)|(?=;)",
920
+ "patterns": [
921
+ {
922
+ "include": "#comment"
923
+ },
924
+ {
925
+ "include": "#type-parameter-list"
926
+ },
927
+ {
928
+ "include": "#parenthesized-parameter-list"
929
+ },
930
+ {
931
+ "include": "#base-types"
932
+ },
933
+ {
934
+ "include": "#generic-constraints"
935
+ }
936
+ ]
937
+ },
938
+ {
939
+ "begin": "\\{",
940
+ "beginCaptures": {
941
+ "0": {
942
+ "name": "punctuation.curlybrace.open.cs"
943
+ }
944
+ },
945
+ "end": "\\}",
946
+ "endCaptures": {
947
+ "0": {
948
+ "name": "punctuation.curlybrace.close.cs"
949
+ }
950
+ },
951
+ "patterns": [
952
+ {
953
+ "include": "#class-or-struct-members"
954
+ }
955
+ ]
956
+ },
957
+ {
958
+ "include": "#preprocessor"
959
+ },
960
+ {
961
+ "include": "#comment"
962
+ }
963
+ ]
964
+ },
965
+ "type-parameter-list": {
966
+ "begin": "\\<",
967
+ "beginCaptures": {
968
+ "0": {
969
+ "name": "punctuation.definition.typeparameters.begin.cs"
970
+ }
971
+ },
972
+ "end": "\\>",
973
+ "endCaptures": {
974
+ "0": {
975
+ "name": "punctuation.definition.typeparameters.end.cs"
976
+ }
977
+ },
978
+ "patterns": [
979
+ {
980
+ "match": "\\b(in|out)\\b",
981
+ "captures": {
982
+ "1": {
983
+ "name": "storage.modifier.cs"
984
+ }
985
+ }
986
+ },
987
+ {
988
+ "match": "(@?[_[:alpha:]][_[:alnum:]]*)\\b",
989
+ "captures": {
990
+ "1": {
991
+ "name": "entity.name.type.type-parameter.cs"
992
+ }
993
+ }
994
+ },
995
+ {
996
+ "include": "#comment"
997
+ },
998
+ {
999
+ "include": "#punctuation-comma"
1000
+ },
1001
+ {
1002
+ "include": "#attribute-section"
1003
+ }
1004
+ ]
1005
+ },
1006
+ "base-types": {
1007
+ "begin": ":",
1008
+ "beginCaptures": {
1009
+ "0": {
1010
+ "name": "punctuation.separator.colon.cs"
1011
+ }
1012
+ },
1013
+ "end": "(?=\\{|where|;)",
1014
+ "patterns": [
1015
+ {
1016
+ "include": "#type"
1017
+ },
1018
+ {
1019
+ "include": "#punctuation-comma"
1020
+ },
1021
+ {
1022
+ "include": "#preprocessor"
1023
+ }
1024
+ ]
1025
+ },
1026
+ "generic-constraints": {
1027
+ "begin": "(where)\\s+(@?[_[:alpha:]][_[:alnum:]]*)\\s*(:)",
1028
+ "beginCaptures": {
1029
+ "1": {
1030
+ "name": "keyword.other.where.cs"
1031
+ },
1032
+ "2": {
1033
+ "name": "entity.name.type.type-parameter.cs"
1034
+ },
1035
+ "3": {
1036
+ "name": "punctuation.separator.colon.cs"
1037
+ }
1038
+ },
1039
+ "end": "(?=\\{|where|;|=>)",
1040
+ "patterns": [
1041
+ {
1042
+ "name": "keyword.other.class.cs",
1043
+ "match": "\\bclass\\b"
1044
+ },
1045
+ {
1046
+ "name": "keyword.other.struct.cs",
1047
+ "match": "\\bstruct\\b"
1048
+ },
1049
+ {
1050
+ "match": "(new)\\s*(\\()\\s*(\\))",
1051
+ "captures": {
1052
+ "1": {
1053
+ "name": "keyword.other.new.cs"
1054
+ },
1055
+ "2": {
1056
+ "name": "punctuation.parenthesis.open.cs"
1057
+ },
1058
+ "3": {
1059
+ "name": "punctuation.parenthesis.close.cs"
1060
+ }
1061
+ }
1062
+ },
1063
+ {
1064
+ "include": "#type"
1065
+ },
1066
+ {
1067
+ "include": "#punctuation-comma"
1068
+ },
1069
+ {
1070
+ "include": "#generic-constraints"
1071
+ }
1072
+ ]
1073
+ },
1074
+ "field-declaration": {
1075
+ "begin": "(?x)\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g<identifier>)\\s* # first field name\n(?!=>|==)(?=,|;|=|$)",
1076
+ "beginCaptures": {
1077
+ "1": {
1078
+ "patterns": [
1079
+ {
1080
+ "include": "#type"
1081
+ }
1082
+ ]
1083
+ },
1084
+ "6": {
1085
+ "name": "entity.name.variable.field.cs"
1086
+ }
1087
+ },
1088
+ "end": "(?=;)",
1089
+ "patterns": [
1090
+ {
1091
+ "name": "entity.name.variable.field.cs",
1092
+ "match": "@?[_[:alpha:]][_[:alnum:]]*"
1093
+ },
1094
+ {
1095
+ "include": "#punctuation-comma"
1096
+ },
1097
+ {
1098
+ "include": "#comment"
1099
+ },
1100
+ {
1101
+ "include": "#variable-initializer"
1102
+ },
1103
+ {
1104
+ "include": "#class-or-struct-members"
1105
+ }
1106
+ ]
1107
+ },
1108
+ "property-declaration": {
1109
+ "begin": "(?x)\n\n# The negative lookahead below ensures that we don't match nested types\n# or other declarations as properties.\n(?![[:word:][:space:]]*\\b(?:class|interface|struct|enum|event)\\b)\n\n(?<return_type>\n (?<type_name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\\s+\n)\n(?<interface_name>\\g<type_name>\\s*\\.\\s*)?\n(?<property_name>\\g<identifier>)\\s*\n(?=\\{|=>|$)",
1110
+ "beginCaptures": {
1111
+ "1": {
1112
+ "patterns": [
1113
+ {
1114
+ "include": "#type"
1115
+ }
1116
+ ]
1117
+ },
1118
+ "7": {
1119
+ "patterns": [
1120
+ {
1121
+ "include": "#type"
1122
+ },
1123
+ {
1124
+ "include": "#punctuation-accessor"
1125
+ }
1126
+ ]
1127
+ },
1128
+ "8": {
1129
+ "name": "entity.name.variable.property.cs"
1130
+ }
1131
+ },
1132
+ "end": "(?<=\\})|(?=;)",
1133
+ "patterns": [
1134
+ {
1135
+ "include": "#comment"
1136
+ },
1137
+ {
1138
+ "include": "#property-accessors"
1139
+ },
1140
+ {
1141
+ "include": "#expression-body"
1142
+ },
1143
+ {
1144
+ "include": "#variable-initializer"
1145
+ },
1146
+ {
1147
+ "include": "#class-or-struct-members"
1148
+ }
1149
+ ]
1150
+ },
1151
+ "indexer-declaration": {
1152
+ "begin": "(?x)\n(?<return_type>\n (?<type_name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\\s+\n)\n(?<interface_name>\\g<type_name>\\s*\\.\\s*)?\n(?<indexer_name>this)\\s*\n(?=\\[)",
1153
+ "beginCaptures": {
1154
+ "1": {
1155
+ "patterns": [
1156
+ {
1157
+ "include": "#type"
1158
+ }
1159
+ ]
1160
+ },
1161
+ "7": {
1162
+ "patterns": [
1163
+ {
1164
+ "include": "#type"
1165
+ },
1166
+ {
1167
+ "include": "#punctuation-accessor"
1168
+ }
1169
+ ]
1170
+ },
1171
+ "8": {
1172
+ "name": "keyword.other.this.cs"
1173
+ }
1174
+ },
1175
+ "end": "(?<=\\})|(?=;)",
1176
+ "patterns": [
1177
+ {
1178
+ "include": "#comment"
1179
+ },
1180
+ {
1181
+ "include": "#bracketed-parameter-list"
1182
+ },
1183
+ {
1184
+ "include": "#property-accessors"
1185
+ },
1186
+ {
1187
+ "include": "#expression-body"
1188
+ },
1189
+ {
1190
+ "include": "#variable-initializer"
1191
+ }
1192
+ ]
1193
+ },
1194
+ "event-declaration": {
1195
+ "begin": "(?x)\n\\b(event)\\b\\s*\n(?<return_type>\n (?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\\s+\n)\n(?<interface_name>\\g<type_name>\\s*\\.\\s*)?\n(?<event_names>\\g<identifier>(?:\\s*,\\s*\\g<identifier>)*)\\s*\n(?=\\{|;|$)",
1196
+ "beginCaptures": {
1197
+ "1": {
1198
+ "name": "keyword.other.event.cs"
1199
+ },
1200
+ "2": {
1201
+ "patterns": [
1202
+ {
1203
+ "include": "#type"
1204
+ }
1205
+ ]
1206
+ },
1207
+ "8": {
1208
+ "patterns": [
1209
+ {
1210
+ "include": "#type"
1211
+ },
1212
+ {
1213
+ "include": "#punctuation-accessor"
1214
+ }
1215
+ ]
1216
+ },
1217
+ "9": {
1218
+ "patterns": [
1219
+ {
1220
+ "name": "entity.name.variable.event.cs",
1221
+ "match": "@?[_[:alpha:]][_[:alnum:]]*"
1222
+ },
1223
+ {
1224
+ "include": "#punctuation-comma"
1225
+ }
1226
+ ]
1227
+ }
1228
+ },
1229
+ "end": "(?<=\\})|(?=;)",
1230
+ "patterns": [
1231
+ {
1232
+ "include": "#comment"
1233
+ },
1234
+ {
1235
+ "include": "#event-accessors"
1236
+ },
1237
+ {
1238
+ "include": "#punctuation-comma"
1239
+ }
1240
+ ]
1241
+ },
1242
+ "property-accessors": {
1243
+ "begin": "\\{",
1244
+ "beginCaptures": {
1245
+ "0": {
1246
+ "name": "punctuation.curlybrace.open.cs"
1247
+ }
1248
+ },
1249
+ "end": "\\}",
1250
+ "endCaptures": {
1251
+ "0": {
1252
+ "name": "punctuation.curlybrace.close.cs"
1253
+ }
1254
+ },
1255
+ "patterns": [
1256
+ {
1257
+ "name": "storage.modifier.cs",
1258
+ "match": "\\b(private|protected|internal)\\b"
1259
+ },
1260
+ {
1261
+ "name": "keyword.other.get.cs",
1262
+ "match": "\\b(get)\\b"
1263
+ },
1264
+ {
1265
+ "name": "keyword.other.set.cs",
1266
+ "match": "\\b(set)\\b"
1267
+ },
1268
+ {
1269
+ "name": "keyword.other.init.cs",
1270
+ "match": "\\b(init)\\b"
1271
+ },
1272
+ {
1273
+ "include": "#comment"
1274
+ },
1275
+ {
1276
+ "include": "#attribute-section"
1277
+ },
1278
+ {
1279
+ "include": "#expression-body"
1280
+ },
1281
+ {
1282
+ "include": "#block"
1283
+ },
1284
+ {
1285
+ "include": "#punctuation-semicolon"
1286
+ }
1287
+ ]
1288
+ },
1289
+ "event-accessors": {
1290
+ "begin": "\\{",
1291
+ "beginCaptures": {
1292
+ "0": {
1293
+ "name": "punctuation.curlybrace.open.cs"
1294
+ }
1295
+ },
1296
+ "end": "\\}",
1297
+ "endCaptures": {
1298
+ "0": {
1299
+ "name": "punctuation.curlybrace.close.cs"
1300
+ }
1301
+ },
1302
+ "patterns": [
1303
+ {
1304
+ "name": "keyword.other.add.cs",
1305
+ "match": "\\b(add)\\b"
1306
+ },
1307
+ {
1308
+ "name": "keyword.other.remove.cs",
1309
+ "match": "\\b(remove)\\b"
1310
+ },
1311
+ {
1312
+ "include": "#comment"
1313
+ },
1314
+ {
1315
+ "include": "#attribute-section"
1316
+ },
1317
+ {
1318
+ "include": "#expression-body"
1319
+ },
1320
+ {
1321
+ "include": "#block"
1322
+ },
1323
+ {
1324
+ "include": "#punctuation-semicolon"
1325
+ }
1326
+ ]
1327
+ },
1328
+ "method-declaration": {
1329
+ "begin": "(?x)\n(?<return_type>\n (?<type_name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\\s+\n)\n(?<interface_name>\\g<type_name>\\s*\\.\\s*)?\n(\\g<identifier>)\\s*\n(<([^<>]+)>)?\\s*\n(?=\\()",
1330
+ "beginCaptures": {
1331
+ "1": {
1332
+ "patterns": [
1333
+ {
1334
+ "include": "#type"
1335
+ }
1336
+ ]
1337
+ },
1338
+ "7": {
1339
+ "patterns": [
1340
+ {
1341
+ "include": "#type"
1342
+ },
1343
+ {
1344
+ "include": "#punctuation-accessor"
1345
+ }
1346
+ ]
1347
+ },
1348
+ "8": {
1349
+ "name": "entity.name.function.cs"
1350
+ },
1351
+ "9": {
1352
+ "patterns": [
1353
+ {
1354
+ "include": "#type-parameter-list"
1355
+ }
1356
+ ]
1357
+ }
1358
+ },
1359
+ "end": "(?<=\\})|(?=;)",
1360
+ "patterns": [
1361
+ {
1362
+ "include": "#comment"
1363
+ },
1364
+ {
1365
+ "include": "#parenthesized-parameter-list"
1366
+ },
1367
+ {
1368
+ "include": "#generic-constraints"
1369
+ },
1370
+ {
1371
+ "include": "#expression-body"
1372
+ },
1373
+ {
1374
+ "include": "#block"
1375
+ }
1376
+ ]
1377
+ },
1378
+ "constructor-declaration": {
1379
+ "begin": "(?=@?[_[:alpha:]][_[:alnum:]]*\\s*\\()",
1380
+ "end": "(?<=\\})|(?=;)",
1381
+ "patterns": [
1382
+ {
1383
+ "match": "(@?[_[:alpha:]][_[:alnum:]]*)\\b",
1384
+ "captures": {
1385
+ "1": {
1386
+ "name": "entity.name.function.cs"
1387
+ }
1388
+ }
1389
+ },
1390
+ {
1391
+ "begin": "(:)",
1392
+ "beginCaptures": {
1393
+ "1": {
1394
+ "name": "punctuation.separator.colon.cs"
1395
+ }
1396
+ },
1397
+ "end": "(?=\\{|=>)",
1398
+ "patterns": [
1399
+ {
1400
+ "include": "#constructor-initializer"
1401
+ }
1402
+ ]
1403
+ },
1404
+ {
1405
+ "include": "#parenthesized-parameter-list"
1406
+ },
1407
+ {
1408
+ "include": "#preprocessor"
1409
+ },
1410
+ {
1411
+ "include": "#comment"
1412
+ },
1413
+ {
1414
+ "include": "#expression-body"
1415
+ },
1416
+ {
1417
+ "include": "#block"
1418
+ }
1419
+ ]
1420
+ },
1421
+ "constructor-initializer": {
1422
+ "begin": "\\b(?:(base)|(this))\\b\\s*(?=\\()",
1423
+ "beginCaptures": {
1424
+ "1": {
1425
+ "name": "keyword.other.base.cs"
1426
+ },
1427
+ "2": {
1428
+ "name": "keyword.other.this.cs"
1429
+ }
1430
+ },
1431
+ "end": "(?<=\\))",
1432
+ "patterns": [
1433
+ {
1434
+ "include": "#argument-list"
1435
+ }
1436
+ ]
1437
+ },
1438
+ "destructor-declaration": {
1439
+ "begin": "(~)(@?[_[:alpha:]][_[:alnum:]]*)\\s*(?=\\()",
1440
+ "beginCaptures": {
1441
+ "1": {
1442
+ "name": "punctuation.tilde.cs"
1443
+ },
1444
+ "2": {
1445
+ "name": "entity.name.function.cs"
1446
+ }
1447
+ },
1448
+ "end": "(?<=\\})|(?=;)",
1449
+ "patterns": [
1450
+ {
1451
+ "include": "#comment"
1452
+ },
1453
+ {
1454
+ "include": "#parenthesized-parameter-list"
1455
+ },
1456
+ {
1457
+ "include": "#expression-body"
1458
+ },
1459
+ {
1460
+ "include": "#block"
1461
+ }
1462
+ ]
1463
+ },
1464
+ "operator-declaration": {
1465
+ "begin": "(?x)\n(?<type_name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(?<operator_keyword>(?:\\b(?:operator)))\\s*\n(?<operator>(?:\\+|-|\\*|/|%|&|\\||\\^|\\<\\<|\\>\\>|==|!=|\\>|\\<|\\>=|\\<=|!|~|\\+\\+|--|true|false))\\s*\n(?=\\()",
1466
+ "beginCaptures": {
1467
+ "1": {
1468
+ "patterns": [
1469
+ {
1470
+ "include": "#type"
1471
+ }
1472
+ ]
1473
+ },
1474
+ "6": {
1475
+ "name": "keyword.other.operator-decl.cs"
1476
+ },
1477
+ "7": {
1478
+ "name": "entity.name.function.cs"
1479
+ }
1480
+ },
1481
+ "end": "(?<=\\})|(?=;)",
1482
+ "patterns": [
1483
+ {
1484
+ "include": "#comment"
1485
+ },
1486
+ {
1487
+ "include": "#parenthesized-parameter-list"
1488
+ },
1489
+ {
1490
+ "include": "#expression-body"
1491
+ },
1492
+ {
1493
+ "include": "#block"
1494
+ }
1495
+ ]
1496
+ },
1497
+ "conversion-operator-declaration": {
1498
+ "begin": "(?x)\n(?<explicit_or_implicit_keyword>(?:\\b(?:explicit|implicit)))\\s*\n(?<operator_keyword>(?:\\b(?:operator)))\\s*\n(?<type_name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(?=\\()",
1499
+ "beginCaptures": {
1500
+ "1": {
1501
+ "patterns": [
1502
+ {
1503
+ "match": "\\b(explicit)\\b",
1504
+ "captures": {
1505
+ "1": {
1506
+ "name": "keyword.other.explicit.cs"
1507
+ }
1508
+ }
1509
+ },
1510
+ {
1511
+ "match": "\\b(implicit)\\b",
1512
+ "captures": {
1513
+ "1": {
1514
+ "name": "keyword.other.implicit.cs"
1515
+ }
1516
+ }
1517
+ }
1518
+ ]
1519
+ },
1520
+ "2": {
1521
+ "name": "keyword.other.operator-decl.cs"
1522
+ },
1523
+ "3": {
1524
+ "patterns": [
1525
+ {
1526
+ "include": "#type"
1527
+ }
1528
+ ]
1529
+ }
1530
+ },
1531
+ "end": "(?<=\\})|(?=;)",
1532
+ "patterns": [
1533
+ {
1534
+ "include": "#comment"
1535
+ },
1536
+ {
1537
+ "include": "#parenthesized-parameter-list"
1538
+ },
1539
+ {
1540
+ "include": "#expression-body"
1541
+ },
1542
+ {
1543
+ "include": "#block"
1544
+ }
1545
+ ]
1546
+ },
1547
+ "block": {
1548
+ "begin": "\\{",
1549
+ "beginCaptures": {
1550
+ "0": {
1551
+ "name": "punctuation.curlybrace.open.cs"
1552
+ }
1553
+ },
1554
+ "end": "\\}",
1555
+ "endCaptures": {
1556
+ "0": {
1557
+ "name": "punctuation.curlybrace.close.cs"
1558
+ }
1559
+ },
1560
+ "patterns": [
1561
+ {
1562
+ "include": "#statement"
1563
+ }
1564
+ ]
1565
+ },
1566
+ "variable-initializer": {
1567
+ "begin": "(?<!=|!)(=)(?!=|>)",
1568
+ "beginCaptures": {
1569
+ "1": {
1570
+ "name": "keyword.operator.assignment.cs"
1571
+ }
1572
+ },
1573
+ "end": "(?=[,\\)\\];}])",
1574
+ "patterns": [
1575
+ {
1576
+ "include": "#ref-modifier"
1577
+ },
1578
+ {
1579
+ "include": "#expression"
1580
+ }
1581
+ ]
1582
+ },
1583
+ "expression-body": {
1584
+ "begin": "=>",
1585
+ "beginCaptures": {
1586
+ "0": {
1587
+ "name": "keyword.operator.arrow.cs"
1588
+ }
1589
+ },
1590
+ "end": "(?=[,\\);}])",
1591
+ "patterns": [
1592
+ {
1593
+ "include": "#ref-modifier"
1594
+ },
1595
+ {
1596
+ "include": "#expression"
1597
+ }
1598
+ ]
1599
+ },
1600
+ "goto-statement": {
1601
+ "begin": "(?<!\\.)\\b(goto)\\b",
1602
+ "beginCaptures": {
1603
+ "1": {
1604
+ "name": "keyword.control.goto.cs"
1605
+ }
1606
+ },
1607
+ "end": "(?=;)",
1608
+ "patterns": [
1609
+ {
1610
+ "begin": "\\b(case)\\b",
1611
+ "beginCaptures": {
1612
+ "1": {
1613
+ "name": "keyword.control.case.cs"
1614
+ }
1615
+ },
1616
+ "end": "(?=;)",
1617
+ "patterns": [
1618
+ {
1619
+ "include": "#expression"
1620
+ }
1621
+ ]
1622
+ },
1623
+ {
1624
+ "match": "\\b(default)\\b",
1625
+ "captures": {
1626
+ "1": {
1627
+ "name": "keyword.control.default.cs"
1628
+ }
1629
+ }
1630
+ },
1631
+ {
1632
+ "name": "entity.name.label.cs",
1633
+ "match": "@?[_[:alpha:]][_[:alnum:]]*"
1634
+ }
1635
+ ]
1636
+ },
1637
+ "return-statement": {
1638
+ "begin": "(?<!\\.)\\b(return)\\b",
1639
+ "beginCaptures": {
1640
+ "1": {
1641
+ "name": "keyword.control.flow.return.cs"
1642
+ }
1643
+ },
1644
+ "end": "(?=;)",
1645
+ "patterns": [
1646
+ {
1647
+ "include": "#ref-modifier"
1648
+ },
1649
+ {
1650
+ "include": "#expression"
1651
+ }
1652
+ ]
1653
+ },
1654
+ "break-or-continue-statement": {
1655
+ "match": "(?<!\\.)\\b(?:(break)|(continue))\\b",
1656
+ "captures": {
1657
+ "1": {
1658
+ "name": "keyword.control.flow.break.cs"
1659
+ },
1660
+ "2": {
1661
+ "name": "keyword.control.flow.continue.cs"
1662
+ }
1663
+ }
1664
+ },
1665
+ "throw-statement": {
1666
+ "begin": "(?<!\\.)\\b(throw)\\b",
1667
+ "beginCaptures": {
1668
+ "1": {
1669
+ "name": "keyword.control.flow.throw.cs"
1670
+ }
1671
+ },
1672
+ "end": "(?=;)",
1673
+ "patterns": [
1674
+ {
1675
+ "include": "#expression"
1676
+ }
1677
+ ]
1678
+ },
1679
+ "yield-statement": {
1680
+ "patterns": [
1681
+ {
1682
+ "include": "#yield-return-statement"
1683
+ },
1684
+ {
1685
+ "include": "#yield-break-statement"
1686
+ }
1687
+ ]
1688
+ },
1689
+ "yield-return-statement": {
1690
+ "begin": "(?<!\\.)\\b(yield)\\b\\s*\\b(return)\\b",
1691
+ "beginCaptures": {
1692
+ "1": {
1693
+ "name": "keyword.control.flow.yield.cs"
1694
+ },
1695
+ "2": {
1696
+ "name": "keyword.control.flow.return.cs"
1697
+ }
1698
+ },
1699
+ "end": "(?=;)",
1700
+ "patterns": [
1701
+ {
1702
+ "include": "#expression"
1703
+ }
1704
+ ]
1705
+ },
1706
+ "yield-break-statement": {
1707
+ "match": "(?<!\\.)\\b(yield)\\b\\s*\\b(break)\\b",
1708
+ "captures": {
1709
+ "1": {
1710
+ "name": "keyword.control.flow.yield.cs"
1711
+ },
1712
+ "2": {
1713
+ "name": "keyword.control.flow.break.cs"
1714
+ }
1715
+ }
1716
+ },
1717
+ "await-statement": {
1718
+ "begin": "(?<!\\.)\\b(await)\\b",
1719
+ "beginCaptures": {
1720
+ "1": {
1721
+ "name": "keyword.other.await.cs"
1722
+ }
1723
+ },
1724
+ "end": "(?=;)",
1725
+ "patterns": [
1726
+ {
1727
+ "include": "#statement"
1728
+ }
1729
+ ]
1730
+ },
1731
+ "if-statement": {
1732
+ "begin": "(?<!\\.)\\b(if)\\b\\s*(?=\\()",
1733
+ "beginCaptures": {
1734
+ "1": {
1735
+ "name": "keyword.control.conditional.if.cs"
1736
+ }
1737
+ },
1738
+ "end": "(?<=\\})|(?=;)",
1739
+ "patterns": [
1740
+ {
1741
+ "begin": "\\(",
1742
+ "beginCaptures": {
1743
+ "0": {
1744
+ "name": "punctuation.parenthesis.open.cs"
1745
+ }
1746
+ },
1747
+ "end": "\\)",
1748
+ "endCaptures": {
1749
+ "0": {
1750
+ "name": "punctuation.parenthesis.close.cs"
1751
+ }
1752
+ },
1753
+ "patterns": [
1754
+ {
1755
+ "include": "#expression"
1756
+ }
1757
+ ]
1758
+ },
1759
+ {
1760
+ "include": "#statement"
1761
+ }
1762
+ ]
1763
+ },
1764
+ "else-part": {
1765
+ "begin": "(?<!\\.)\\b(else)\\b",
1766
+ "beginCaptures": {
1767
+ "1": {
1768
+ "name": "keyword.control.conditional.else.cs"
1769
+ }
1770
+ },
1771
+ "end": "(?<=\\})|(?=;)",
1772
+ "patterns": [
1773
+ {
1774
+ "include": "#statement"
1775
+ }
1776
+ ]
1777
+ },
1778
+ "switch-statement": {
1779
+ "begin": "(?<!\\.)\\b(switch)\\b\\s*(?=\\()",
1780
+ "beginCaptures": {
1781
+ "1": {
1782
+ "name": "keyword.control.switch.cs"
1783
+ }
1784
+ },
1785
+ "end": "(?<=\\})",
1786
+ "patterns": [
1787
+ {
1788
+ "begin": "\\(",
1789
+ "beginCaptures": {
1790
+ "0": {
1791
+ "name": "punctuation.parenthesis.open.cs"
1792
+ }
1793
+ },
1794
+ "end": "\\)",
1795
+ "endCaptures": {
1796
+ "0": {
1797
+ "name": "punctuation.parenthesis.close.cs"
1798
+ }
1799
+ },
1800
+ "patterns": [
1801
+ {
1802
+ "include": "#expression"
1803
+ }
1804
+ ]
1805
+ },
1806
+ {
1807
+ "begin": "\\{",
1808
+ "beginCaptures": {
1809
+ "0": {
1810
+ "name": "punctuation.curlybrace.open.cs"
1811
+ }
1812
+ },
1813
+ "end": "\\}",
1814
+ "endCaptures": {
1815
+ "0": {
1816
+ "name": "punctuation.curlybrace.close.cs"
1817
+ }
1818
+ },
1819
+ "patterns": [
1820
+ {
1821
+ "include": "#switch-label"
1822
+ },
1823
+ {
1824
+ "include": "#statement"
1825
+ }
1826
+ ]
1827
+ }
1828
+ ]
1829
+ },
1830
+ "switch-expression": {
1831
+ "begin": "(?x) (?<!\\.)\\b(switch)\\b",
1832
+ "beginCaptures": {
1833
+ "1": {
1834
+ "name": "keyword.control.switch.cs"
1835
+ }
1836
+ },
1837
+ "end": "(?<=\\})",
1838
+ "endCaptures": {
1839
+ "0": {
1840
+ "name": "punctuation.curlybrace.close.cs"
1841
+ }
1842
+ },
1843
+ "patterns": [
1844
+ {
1845
+ "begin": "\\{",
1846
+ "beginCaptures": {
1847
+ "0": {
1848
+ "name": "punctuation.curlybrace.open.cs"
1849
+ }
1850
+ },
1851
+ "end": "\\}",
1852
+ "endCaptures": {
1853
+ "0": {
1854
+ "name": "punctuation.curlybrace.close.cs"
1855
+ }
1856
+ },
1857
+ "patterns": [
1858
+ {
1859
+ "include": "#comment"
1860
+ },
1861
+ {
1862
+ "include": "#literal"
1863
+ },
1864
+ {
1865
+ "include": "#switch-var-pattern"
1866
+ },
1867
+ {
1868
+ "include": "#switch-property-expression"
1869
+ },
1870
+ {
1871
+ "include": "#member-access-expression"
1872
+ },
1873
+ {
1874
+ "include": "#switch-pattern"
1875
+ },
1876
+ {
1877
+ "include": "#expression-body"
1878
+ },
1879
+ {
1880
+ "include": "#punctuation-comma"
1881
+ }
1882
+ ]
1883
+ }
1884
+ ]
1885
+ },
1886
+ "switch-pattern": {
1887
+ "begin": "(?x) # e.g. int x OR var x\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g<identifier>)\\b\\s*",
1888
+ "beginCaptures": {
1889
+ "1": {
1890
+ "patterns": [
1891
+ {
1892
+ "include": "#type"
1893
+ }
1894
+ ]
1895
+ },
1896
+ "2": {
1897
+ "name": "entity.name.variable.local.cs"
1898
+ }
1899
+ },
1900
+ "end": "(?==>)",
1901
+ "patterns": [
1902
+ {
1903
+ "include": "#comment"
1904
+ },
1905
+ {
1906
+ "include": "#switch-when-clause"
1907
+ }
1908
+ ]
1909
+ },
1910
+ "switch-property-expression": {
1911
+ "begin": "(?x) # e.g. int x OR var x\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?\\s*\n(\\{)",
1912
+ "beginCaptures": {
1913
+ "1": {
1914
+ "patterns": [
1915
+ {
1916
+ "include": "#type"
1917
+ }
1918
+ ]
1919
+ },
1920
+ "6": {
1921
+ "name": "punctuation.curlybrace.open.cs"
1922
+ }
1923
+ },
1924
+ "end": "\\}",
1925
+ "endCaptures": {
1926
+ "0": {
1927
+ "name": "punctuation.curlybrace.close.cs"
1928
+ }
1929
+ },
1930
+ "patterns": [
1931
+ {
1932
+ "include": "#expression"
1933
+ },
1934
+ {
1935
+ "include": "#punctuation-comma"
1936
+ }
1937
+ ]
1938
+ },
1939
+ "switch-var-pattern": {
1940
+ "begin": "(?x) # match foreach (var (x, y) in ...)\n(?:\\b(var)\\b\\s*)\n(?<tuple>\\((?:[^\\(\\)]|\\g<tuple>)+\\))\\s*",
1941
+ "beginCaptures": {
1942
+ "1": {
1943
+ "name": "keyword.other.var.cs"
1944
+ },
1945
+ "2": {
1946
+ "patterns": [
1947
+ {
1948
+ "include": "#tuple-declaration-deconstruction-element-list"
1949
+ }
1950
+ ]
1951
+ }
1952
+ },
1953
+ "end": "(?==>)",
1954
+ "patterns": [
1955
+ {
1956
+ "include": "#comment"
1957
+ },
1958
+ {
1959
+ "include": "#switch-when-clause"
1960
+ }
1961
+ ]
1962
+ },
1963
+ "switch-when-clause": {
1964
+ "begin": "(?<!\\.)\\b(when)\\b\\s*(\\()?",
1965
+ "beginCaptures": {
1966
+ "1": {
1967
+ "name": "keyword.control.try.when.cs"
1968
+ },
1969
+ "2": {
1970
+ "name": "punctuation.parenthesis.open.cs"
1971
+ }
1972
+ },
1973
+ "end": "(?==>)",
1974
+ "patterns": [
1975
+ {
1976
+ "include": "#comment"
1977
+ },
1978
+ {
1979
+ "include": "#expression"
1980
+ },
1981
+ {
1982
+ "include": "#punctuation-comma"
1983
+ },
1984
+ {
1985
+ "match": "\\(",
1986
+ "captures": {
1987
+ "0": {
1988
+ "name": "punctuation.parenthesis.open.cs"
1989
+ }
1990
+ }
1991
+ },
1992
+ {
1993
+ "match": "\\)",
1994
+ "captures": {
1995
+ "0": {
1996
+ "name": "punctuation.parenthesis.close.cs"
1997
+ }
1998
+ }
1999
+ }
2000
+ ]
2001
+ },
2002
+ "switch-label": {
2003
+ "patterns": [
2004
+ {
2005
+ "begin": "(?<!\\.)\\b(case)\\b\\s+",
2006
+ "beginCaptures": {
2007
+ "1": {
2008
+ "name": "keyword.control.case.cs"
2009
+ }
2010
+ },
2011
+ "end": ":",
2012
+ "endCaptures": {
2013
+ "0": {
2014
+ "name": "punctuation.separator.colon.cs"
2015
+ }
2016
+ },
2017
+ "patterns": [
2018
+ {
2019
+ "include": "#expression"
2020
+ }
2021
+ ]
2022
+ },
2023
+ {
2024
+ "match": "(?<!\\.)\\b(default)\\b\\s*(:)",
2025
+ "captures": {
2026
+ "1": {
2027
+ "name": "keyword.control.default.cs"
2028
+ },
2029
+ "2": {
2030
+ "name": "punctuation.separator.colon.cs"
2031
+ }
2032
+ }
2033
+ }
2034
+ ]
2035
+ },
2036
+ "do-statement": {
2037
+ "begin": "(?<!\\.)\\b(do)\\b",
2038
+ "beginCaptures": {
2039
+ "1": {
2040
+ "name": "keyword.control.loop.do.cs"
2041
+ }
2042
+ },
2043
+ "end": "(?=;|})",
2044
+ "patterns": [
2045
+ {
2046
+ "include": "#statement"
2047
+ }
2048
+ ]
2049
+ },
2050
+ "while-statement": {
2051
+ "begin": "(?<!\\.)\\b(while)\\b\\s*(?=\\()",
2052
+ "beginCaptures": {
2053
+ "1": {
2054
+ "name": "keyword.control.loop.while.cs"
2055
+ }
2056
+ },
2057
+ "end": "(?<=\\})|(?=;)",
2058
+ "patterns": [
2059
+ {
2060
+ "begin": "\\(",
2061
+ "beginCaptures": {
2062
+ "0": {
2063
+ "name": "punctuation.parenthesis.open.cs"
2064
+ }
2065
+ },
2066
+ "end": "\\)",
2067
+ "endCaptures": {
2068
+ "0": {
2069
+ "name": "punctuation.parenthesis.close.cs"
2070
+ }
2071
+ },
2072
+ "patterns": [
2073
+ {
2074
+ "include": "#expression"
2075
+ }
2076
+ ]
2077
+ },
2078
+ {
2079
+ "include": "#statement"
2080
+ }
2081
+ ]
2082
+ },
2083
+ "for-statement": {
2084
+ "begin": "(?<!\\.)\\b(for)\\b\\s*(?=\\()",
2085
+ "beginCaptures": {
2086
+ "1": {
2087
+ "name": "keyword.control.loop.for.cs"
2088
+ }
2089
+ },
2090
+ "end": "(?<=\\})|(?=;)",
2091
+ "patterns": [
2092
+ {
2093
+ "begin": "\\(",
2094
+ "beginCaptures": {
2095
+ "0": {
2096
+ "name": "punctuation.parenthesis.open.cs"
2097
+ }
2098
+ },
2099
+ "end": "\\)",
2100
+ "endCaptures": {
2101
+ "0": {
2102
+ "name": "punctuation.parenthesis.close.cs"
2103
+ }
2104
+ },
2105
+ "patterns": [
2106
+ {
2107
+ "include": "#local-variable-declaration"
2108
+ },
2109
+ {
2110
+ "include": "#expression"
2111
+ },
2112
+ {
2113
+ "include": "#punctuation-comma"
2114
+ },
2115
+ {
2116
+ "include": "#punctuation-semicolon"
2117
+ }
2118
+ ]
2119
+ },
2120
+ {
2121
+ "include": "#statement"
2122
+ }
2123
+ ]
2124
+ },
2125
+ "foreach-statement": {
2126
+ "begin": "(?<!\\.)\\b(foreach)\\b\\s*(?=\\()",
2127
+ "beginCaptures": {
2128
+ "1": {
2129
+ "name": "keyword.control.loop.foreach.cs"
2130
+ }
2131
+ },
2132
+ "end": "(?<=\\})|(?=;)",
2133
+ "patterns": [
2134
+ {
2135
+ "begin": "\\(",
2136
+ "beginCaptures": {
2137
+ "0": {
2138
+ "name": "punctuation.parenthesis.open.cs"
2139
+ }
2140
+ },
2141
+ "end": "\\)",
2142
+ "endCaptures": {
2143
+ "0": {
2144
+ "name": "punctuation.parenthesis.close.cs"
2145
+ }
2146
+ },
2147
+ "patterns": [
2148
+ {
2149
+ "match": "(?x)\n(?:\n (\\bvar\\b)|\n (?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\n)\\s+\n(\\g<identifier>)\\s+\n\\b(in)\\b",
2150
+ "captures": {
2151
+ "1": {
2152
+ "name": "keyword.other.var.cs"
2153
+ },
2154
+ "2": {
2155
+ "patterns": [
2156
+ {
2157
+ "include": "#type"
2158
+ }
2159
+ ]
2160
+ },
2161
+ "7": {
2162
+ "name": "entity.name.variable.local.cs"
2163
+ },
2164
+ "8": {
2165
+ "name": "keyword.control.loop.in.cs"
2166
+ }
2167
+ }
2168
+ },
2169
+ {
2170
+ "match": "(?x) # match foreach (var (x, y) in ...)\n(?:\\b(var)\\b\\s*)?\n(?<tuple>\\((?:[^\\(\\)]|\\g<tuple>)+\\))\\s+\n\\b(in)\\b",
2171
+ "captures": {
2172
+ "1": {
2173
+ "name": "keyword.other.var.cs"
2174
+ },
2175
+ "2": {
2176
+ "patterns": [
2177
+ {
2178
+ "include": "#tuple-declaration-deconstruction-element-list"
2179
+ }
2180
+ ]
2181
+ },
2182
+ "3": {
2183
+ "name": "keyword.control.loop.in.cs"
2184
+ }
2185
+ }
2186
+ },
2187
+ {
2188
+ "include": "#expression"
2189
+ }
2190
+ ]
2191
+ },
2192
+ {
2193
+ "include": "#statement"
2194
+ }
2195
+ ]
2196
+ },
2197
+ "try-statement": {
2198
+ "patterns": [
2199
+ {
2200
+ "include": "#try-block"
2201
+ },
2202
+ {
2203
+ "include": "#catch-clause"
2204
+ },
2205
+ {
2206
+ "include": "#finally-clause"
2207
+ }
2208
+ ]
2209
+ },
2210
+ "try-block": {
2211
+ "begin": "(?<!\\.)\\b(try)\\b",
2212
+ "beginCaptures": {
2213
+ "1": {
2214
+ "name": "keyword.control.try.cs"
2215
+ }
2216
+ },
2217
+ "end": "(?<=\\})",
2218
+ "patterns": [
2219
+ {
2220
+ "include": "#comment"
2221
+ },
2222
+ {
2223
+ "include": "#block"
2224
+ }
2225
+ ]
2226
+ },
2227
+ "finally-clause": {
2228
+ "begin": "(?<!\\.)\\b(finally)\\b",
2229
+ "beginCaptures": {
2230
+ "1": {
2231
+ "name": "keyword.control.try.finally.cs"
2232
+ }
2233
+ },
2234
+ "end": "(?<=\\})",
2235
+ "patterns": [
2236
+ {
2237
+ "include": "#comment"
2238
+ },
2239
+ {
2240
+ "include": "#block"
2241
+ }
2242
+ ]
2243
+ },
2244
+ "catch-clause": {
2245
+ "begin": "(?<!\\.)\\b(catch)\\b",
2246
+ "beginCaptures": {
2247
+ "1": {
2248
+ "name": "keyword.control.try.catch.cs"
2249
+ }
2250
+ },
2251
+ "end": "(?<=\\})",
2252
+ "patterns": [
2253
+ {
2254
+ "begin": "\\(",
2255
+ "beginCaptures": {
2256
+ "0": {
2257
+ "name": "punctuation.parenthesis.open.cs"
2258
+ }
2259
+ },
2260
+ "end": "\\)",
2261
+ "endCaptures": {
2262
+ "0": {
2263
+ "name": "punctuation.parenthesis.close.cs"
2264
+ }
2265
+ },
2266
+ "patterns": [
2267
+ {
2268
+ "match": "(?x)\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(?:(\\g<identifier>)\\b)?",
2269
+ "captures": {
2270
+ "1": {
2271
+ "patterns": [
2272
+ {
2273
+ "include": "#type"
2274
+ }
2275
+ ]
2276
+ },
2277
+ "6": {
2278
+ "name": "entity.name.variable.local.cs"
2279
+ }
2280
+ }
2281
+ }
2282
+ ]
2283
+ },
2284
+ {
2285
+ "include": "#when-clause"
2286
+ },
2287
+ {
2288
+ "include": "#comment"
2289
+ },
2290
+ {
2291
+ "include": "#block"
2292
+ }
2293
+ ]
2294
+ },
2295
+ "when-clause": {
2296
+ "begin": "(?<!\\.)\\b(when)\\b\\s*(\\()",
2297
+ "beginCaptures": {
2298
+ "1": {
2299
+ "name": "keyword.control.try.when.cs"
2300
+ },
2301
+ "2": {
2302
+ "name": "punctuation.parenthesis.open.cs"
2303
+ }
2304
+ },
2305
+ "end": "\\)",
2306
+ "endCaptures": {
2307
+ "0": {
2308
+ "name": "punctuation.parenthesis.close.cs"
2309
+ }
2310
+ },
2311
+ "patterns": [
2312
+ {
2313
+ "include": "#expression"
2314
+ },
2315
+ {
2316
+ "include": "#comment"
2317
+ }
2318
+ ]
2319
+ },
2320
+ "checked-unchecked-statement": {
2321
+ "begin": "(?<!\\.)\\b(?:(checked)|(unchecked))\\b\\s*(?!\\()",
2322
+ "beginCaptures": {
2323
+ "1": {
2324
+ "name": "keyword.other.checked.cs"
2325
+ },
2326
+ "2": {
2327
+ "name": "keyword.other.unchecked.cs"
2328
+ }
2329
+ },
2330
+ "end": "(?<=\\})",
2331
+ "patterns": [
2332
+ {
2333
+ "include": "#block"
2334
+ },
2335
+ {
2336
+ "include": "#comment"
2337
+ }
2338
+ ]
2339
+ },
2340
+ "lock-statement": {
2341
+ "begin": "(?<!\\.)\\b(lock)\\b\\s*(?=\\()",
2342
+ "beginCaptures": {
2343
+ "1": {
2344
+ "name": "keyword.other.lock.cs"
2345
+ }
2346
+ },
2347
+ "end": "(?<=\\})|(?=;)",
2348
+ "patterns": [
2349
+ {
2350
+ "begin": "\\(",
2351
+ "beginCaptures": {
2352
+ "0": {
2353
+ "name": "punctuation.parenthesis.open.cs"
2354
+ }
2355
+ },
2356
+ "end": "\\)",
2357
+ "endCaptures": {
2358
+ "0": {
2359
+ "name": "punctuation.parenthesis.close.cs"
2360
+ }
2361
+ },
2362
+ "patterns": [
2363
+ {
2364
+ "include": "#expression"
2365
+ }
2366
+ ]
2367
+ },
2368
+ {
2369
+ "include": "#statement"
2370
+ }
2371
+ ]
2372
+ },
2373
+ "using-statement": {
2374
+ "begin": "(?<!\\.)\\b(using)\\b\\s*(?=\\()",
2375
+ "beginCaptures": {
2376
+ "1": {
2377
+ "name": "keyword.other.using.cs"
2378
+ }
2379
+ },
2380
+ "end": "(?=\\;|})",
2381
+ "patterns": [
2382
+ {
2383
+ "begin": "\\(",
2384
+ "beginCaptures": {
2385
+ "0": {
2386
+ "name": "punctuation.parenthesis.open.cs"
2387
+ }
2388
+ },
2389
+ "end": "\\)",
2390
+ "endCaptures": {
2391
+ "0": {
2392
+ "name": "punctuation.parenthesis.close.cs"
2393
+ }
2394
+ },
2395
+ "patterns": [
2396
+ {
2397
+ "include": "#local-variable-declaration"
2398
+ },
2399
+ {
2400
+ "include": "#expression"
2401
+ }
2402
+ ]
2403
+ },
2404
+ {
2405
+ "include": "#statement"
2406
+ }
2407
+ ]
2408
+ },
2409
+ "labeled-statement": {
2410
+ "match": "(@?[_[:alpha:]][_[:alnum:]]*)\\s*(:)",
2411
+ "captures": {
2412
+ "1": {
2413
+ "name": "entity.name.label.cs"
2414
+ },
2415
+ "2": {
2416
+ "name": "punctuation.separator.colon.cs"
2417
+ }
2418
+ }
2419
+ },
2420
+ "local-declaration": {
2421
+ "patterns": [
2422
+ {
2423
+ "include": "#local-constant-declaration"
2424
+ },
2425
+ {
2426
+ "include": "#local-variable-declaration"
2427
+ },
2428
+ {
2429
+ "include": "#local-function-declaration"
2430
+ },
2431
+ {
2432
+ "include": "#local-tuple-var-deconstruction"
2433
+ }
2434
+ ]
2435
+ },
2436
+ "local-variable-declaration": {
2437
+ "begin": "(?x)\n(?:\n (?:(\\busing)\\s+)?\n (?:(\\bref)\\s+(?:(\\breadonly)\\s+)?)?(\\bvar\\b)| # ref local\n (?<type_name>\n (?:\n (?:ref\\s+(?:readonly\\s+)?)? # ref local\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\n)\\s+\n(\\g<identifier>)\\s*\n(?!=>)\n(?=,|;|=|\\))",
2438
+ "beginCaptures": {
2439
+ "1": {
2440
+ "name": "keyword.other.using.cs"
2441
+ },
2442
+ "2": {
2443
+ "name": "storage.modifier.cs"
2444
+ },
2445
+ "3": {
2446
+ "name": "storage.modifier.cs"
2447
+ },
2448
+ "4": {
2449
+ "name": "keyword.other.var.cs"
2450
+ },
2451
+ "5": {
2452
+ "patterns": [
2453
+ {
2454
+ "include": "#type"
2455
+ }
2456
+ ]
2457
+ },
2458
+ "10": {
2459
+ "name": "entity.name.variable.local.cs"
2460
+ }
2461
+ },
2462
+ "end": "(?=;|\\))",
2463
+ "patterns": [
2464
+ {
2465
+ "name": "entity.name.variable.local.cs",
2466
+ "match": "@?[_[:alpha:]][_[:alnum:]]*"
2467
+ },
2468
+ {
2469
+ "include": "#punctuation-comma"
2470
+ },
2471
+ {
2472
+ "include": "#comment"
2473
+ },
2474
+ {
2475
+ "include": "#variable-initializer"
2476
+ }
2477
+ ]
2478
+ },
2479
+ "local-constant-declaration": {
2480
+ "begin": "(?x)\n(?<const_keyword>\\b(?:const)\\b)\\s*\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g<identifier>)\\s*\n(?=,|;|=)",
2481
+ "beginCaptures": {
2482
+ "1": {
2483
+ "name": "storage.modifier.cs"
2484
+ },
2485
+ "2": {
2486
+ "patterns": [
2487
+ {
2488
+ "include": "#type"
2489
+ }
2490
+ ]
2491
+ },
2492
+ "7": {
2493
+ "name": "entity.name.variable.local.cs"
2494
+ }
2495
+ },
2496
+ "end": "(?=;)",
2497
+ "patterns": [
2498
+ {
2499
+ "name": "entity.name.variable.local.cs",
2500
+ "match": "@?[_[:alpha:]][_[:alnum:]]*"
2501
+ },
2502
+ {
2503
+ "include": "#punctuation-comma"
2504
+ },
2505
+ {
2506
+ "include": "#comment"
2507
+ },
2508
+ {
2509
+ "include": "#variable-initializer"
2510
+ }
2511
+ ]
2512
+ },
2513
+ "local-function-declaration": {
2514
+ "patterns": [
2515
+ {
2516
+ "include": "#method-declaration"
2517
+ }
2518
+ ]
2519
+ },
2520
+ "local-tuple-var-deconstruction": {
2521
+ "begin": "(?x) # e.g. var (x, y) = GetPoint();\n(?:\\b(var)\\b\\s*)\n(?<tuple>\\((?:[^\\(\\)]|\\g<tuple>)+\\))\\s*\n(?=;|=|\\))",
2522
+ "beginCaptures": {
2523
+ "1": {
2524
+ "name": "keyword.other.var.cs"
2525
+ },
2526
+ "2": {
2527
+ "patterns": [
2528
+ {
2529
+ "include": "#tuple-declaration-deconstruction-element-list"
2530
+ }
2531
+ ]
2532
+ }
2533
+ },
2534
+ "end": "(?=;|\\))",
2535
+ "patterns": [
2536
+ {
2537
+ "include": "#comment"
2538
+ },
2539
+ {
2540
+ "include": "#variable-initializer"
2541
+ }
2542
+ ]
2543
+ },
2544
+ "tuple-deconstruction-assignment": {
2545
+ "match": "(?x)\n(?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\\s*\n(?!=>|==)(?==)",
2546
+ "captures": {
2547
+ "1": {
2548
+ "patterns": [
2549
+ {
2550
+ "include": "#tuple-deconstruction-element-list"
2551
+ }
2552
+ ]
2553
+ }
2554
+ }
2555
+ },
2556
+ "tuple-declaration-deconstruction-element-list": {
2557
+ "begin": "\\(",
2558
+ "beginCaptures": {
2559
+ "0": {
2560
+ "name": "punctuation.parenthesis.open.cs"
2561
+ }
2562
+ },
2563
+ "end": "\\)",
2564
+ "endCaptures": {
2565
+ "0": {
2566
+ "name": "punctuation.parenthesis.close.cs"
2567
+ }
2568
+ },
2569
+ "patterns": [
2570
+ {
2571
+ "include": "#comment"
2572
+ },
2573
+ {
2574
+ "include": "#tuple-declaration-deconstruction-element-list"
2575
+ },
2576
+ {
2577
+ "include": "#declaration-expression-tuple"
2578
+ },
2579
+ {
2580
+ "include": "#punctuation-comma"
2581
+ },
2582
+ {
2583
+ "match": "(?x) # e.g. x\n(@?[_[:alpha:]][_[:alnum:]]*)\\b\\s*\n(?=[,)])",
2584
+ "captures": {
2585
+ "1": {
2586
+ "name": "entity.name.variable.tuple-element.cs"
2587
+ }
2588
+ }
2589
+ }
2590
+ ]
2591
+ },
2592
+ "tuple-deconstruction-element-list": {
2593
+ "begin": "\\(",
2594
+ "beginCaptures": {
2595
+ "0": {
2596
+ "name": "punctuation.parenthesis.open.cs"
2597
+ }
2598
+ },
2599
+ "end": "\\)",
2600
+ "endCaptures": {
2601
+ "0": {
2602
+ "name": "punctuation.parenthesis.close.cs"
2603
+ }
2604
+ },
2605
+ "patterns": [
2606
+ {
2607
+ "include": "#comment"
2608
+ },
2609
+ {
2610
+ "include": "#tuple-deconstruction-element-list"
2611
+ },
2612
+ {
2613
+ "include": "#declaration-expression-tuple"
2614
+ },
2615
+ {
2616
+ "include": "#punctuation-comma"
2617
+ },
2618
+ {
2619
+ "match": "(?x) # e.g. x\n(@?[_[:alpha:]][_[:alnum:]]*)\\b\\s*\n(?=[,)])",
2620
+ "captures": {
2621
+ "1": {
2622
+ "name": "variable.other.readwrite.cs"
2623
+ }
2624
+ }
2625
+ }
2626
+ ]
2627
+ },
2628
+ "declaration-expression-local": {
2629
+ "match": "(?x) # e.g. int x OR var x\n(?:\n \\b(var)\\b|\n (?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\n)\\s+\n(\\g<identifier>)\\b\\s*\n(?=[,)\\]])",
2630
+ "captures": {
2631
+ "1": {
2632
+ "name": "keyword.other.var.cs"
2633
+ },
2634
+ "2": {
2635
+ "patterns": [
2636
+ {
2637
+ "include": "#type"
2638
+ }
2639
+ ]
2640
+ },
2641
+ "7": {
2642
+ "name": "entity.name.variable.local.cs"
2643
+ }
2644
+ }
2645
+ },
2646
+ "declaration-expression-tuple": {
2647
+ "match": "(?x) # e.g. int x OR var x\n(?:\n \\b(var)\\b|\n (?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n )\n)\\s+\n(\\g<identifier>)\\b\\s*\n(?=[,)])",
2648
+ "captures": {
2649
+ "1": {
2650
+ "name": "keyword.other.var.cs"
2651
+ },
2652
+ "2": {
2653
+ "patterns": [
2654
+ {
2655
+ "include": "#type"
2656
+ }
2657
+ ]
2658
+ },
2659
+ "7": {
2660
+ "name": "entity.name.variable.tuple-element.cs"
2661
+ }
2662
+ }
2663
+ },
2664
+ "checked-unchecked-expression": {
2665
+ "begin": "(?<!\\.)\\b(?:(checked)|(unchecked))\\b\\s*(\\()",
2666
+ "beginCaptures": {
2667
+ "1": {
2668
+ "name": "keyword.other.checked.cs"
2669
+ },
2670
+ "2": {
2671
+ "name": "keyword.other.unchecked.cs"
2672
+ },
2673
+ "3": {
2674
+ "name": "punctuation.parenthesis.open.cs"
2675
+ }
2676
+ },
2677
+ "end": "\\)",
2678
+ "endCaptures": {
2679
+ "0": {
2680
+ "name": "punctuation.parenthesis.close.cs"
2681
+ }
2682
+ },
2683
+ "patterns": [
2684
+ {
2685
+ "include": "#expression"
2686
+ }
2687
+ ]
2688
+ },
2689
+ "typeof-or-default-expression": {
2690
+ "begin": "(?<!\\.)\\b(?:(typeof)|(default))\\b\\s*(\\()",
2691
+ "beginCaptures": {
2692
+ "1": {
2693
+ "name": "keyword.other.typeof.cs"
2694
+ },
2695
+ "2": {
2696
+ "name": "keyword.other.default.cs"
2697
+ },
2698
+ "3": {
2699
+ "name": "punctuation.parenthesis.open.cs"
2700
+ }
2701
+ },
2702
+ "end": "\\)",
2703
+ "endCaptures": {
2704
+ "0": {
2705
+ "name": "punctuation.parenthesis.close.cs"
2706
+ }
2707
+ },
2708
+ "patterns": [
2709
+ {
2710
+ "include": "#type"
2711
+ }
2712
+ ]
2713
+ },
2714
+ "nameof-expression": {
2715
+ "begin": "(?<!\\.)\\b(nameof)\\b\\s*(\\()",
2716
+ "beginCaptures": {
2717
+ "1": {
2718
+ "name": "keyword.other.nameof.cs"
2719
+ },
2720
+ "2": {
2721
+ "name": "punctuation.parenthesis.open.cs"
2722
+ }
2723
+ },
2724
+ "end": "\\)",
2725
+ "endCaptures": {
2726
+ "0": {
2727
+ "name": "punctuation.parenthesis.close.cs"
2728
+ }
2729
+ },
2730
+ "patterns": [
2731
+ {
2732
+ "include": "#expression"
2733
+ }
2734
+ ]
2735
+ },
2736
+ "throw-expression": {
2737
+ "match": "(?<!\\.)\\b(throw)\\b",
2738
+ "captures": {
2739
+ "1": {
2740
+ "name": "keyword.control.flow.throw.cs"
2741
+ }
2742
+ }
2743
+ },
2744
+ "interpolated-string": {
2745
+ "name": "string.quoted.double.cs",
2746
+ "begin": "\\$\"",
2747
+ "beginCaptures": {
2748
+ "0": {
2749
+ "name": "punctuation.definition.string.begin.cs"
2750
+ }
2751
+ },
2752
+ "end": "(\")|((?:[^\\\\\\n])$)",
2753
+ "endCaptures": {
2754
+ "1": {
2755
+ "name": "punctuation.definition.string.end.cs"
2756
+ },
2757
+ "2": {
2758
+ "name": "invalid.illegal.newline.cs"
2759
+ }
2760
+ },
2761
+ "patterns": [
2762
+ {
2763
+ "include": "#string-character-escape"
2764
+ },
2765
+ {
2766
+ "include": "#interpolation"
2767
+ }
2768
+ ]
2769
+ },
2770
+ "verbatim-interpolated-string": {
2771
+ "name": "string.quoted.double.cs",
2772
+ "begin": "(?:\\$@|@\\$)\"",
2773
+ "beginCaptures": {
2774
+ "0": {
2775
+ "name": "punctuation.definition.string.begin.cs"
2776
+ }
2777
+ },
2778
+ "end": "\"(?=[^\"])",
2779
+ "endCaptures": {
2780
+ "0": {
2781
+ "name": "punctuation.definition.string.end.cs"
2782
+ }
2783
+ },
2784
+ "patterns": [
2785
+ {
2786
+ "include": "#verbatim-string-character-escape"
2787
+ },
2788
+ {
2789
+ "include": "#interpolation"
2790
+ }
2791
+ ]
2792
+ },
2793
+ "interpolation": {
2794
+ "name": "meta.interpolation.cs",
2795
+ "begin": "(?<=[^\\{]|^)((?:\\{\\{)*)(\\{)(?=[^\\{])",
2796
+ "beginCaptures": {
2797
+ "1": {
2798
+ "name": "string.quoted.double.cs"
2799
+ },
2800
+ "2": {
2801
+ "name": "punctuation.definition.interpolation.begin.cs"
2802
+ }
2803
+ },
2804
+ "end": "\\}",
2805
+ "endCaptures": {
2806
+ "0": {
2807
+ "name": "punctuation.definition.interpolation.end.cs"
2808
+ }
2809
+ },
2810
+ "patterns": [
2811
+ {
2812
+ "include": "#expression"
2813
+ }
2814
+ ]
2815
+ },
2816
+ "raw-interpolated-string": {
2817
+ "patterns": [
2818
+ {
2819
+ "include": "#raw-interpolated-string-five-or-more-quote-one-or-more-interpolation"
2820
+ },
2821
+ {
2822
+ "include": "#raw-interpolated-string-three-or-more-quote-three-or-more-interpolation"
2823
+ },
2824
+ {
2825
+ "include": "#raw-interpolated-string-quadruple-quote-double-interpolation"
2826
+ },
2827
+ {
2828
+ "include": "#raw-interpolated-string-quadruple-quote-single-interpolation"
2829
+ },
2830
+ {
2831
+ "include": "#raw-interpolated-string-triple-quote-double-interpolation"
2832
+ },
2833
+ {
2834
+ "include": "#raw-interpolated-string-triple-quote-single-interpolation"
2835
+ }
2836
+ ]
2837
+ },
2838
+ "raw-interpolated-string-triple-quote-single-interpolation": {
2839
+ "name": "string.quoted.double.cs",
2840
+ "begin": "\\$\"\"\"",
2841
+ "beginCaptures": {
2842
+ "0": {
2843
+ "name": "punctuation.definition.string.begin.cs"
2844
+ }
2845
+ },
2846
+ "end": "\"\"\"",
2847
+ "endCaptures": {
2848
+ "0": {
2849
+ "name": "punctuation.definition.string.end.cs"
2850
+ }
2851
+ },
2852
+ "patterns": [
2853
+ {
2854
+ "include": "#raw-interpolation"
2855
+ }
2856
+ ]
2857
+ },
2858
+ "raw-interpolated-string-triple-quote-double-interpolation": {
2859
+ "name": "string.quoted.double.cs",
2860
+ "begin": "\\$\\$\"\"\"",
2861
+ "beginCaptures": {
2862
+ "0": {
2863
+ "name": "punctuation.definition.string.begin.cs"
2864
+ }
2865
+ },
2866
+ "end": "\"\"\"",
2867
+ "endCaptures": {
2868
+ "0": {
2869
+ "name": "punctuation.definition.string.end.cs"
2870
+ }
2871
+ },
2872
+ "patterns": [
2873
+ {
2874
+ "include": "#double-raw-interpolation"
2875
+ }
2876
+ ]
2877
+ },
2878
+ "raw-interpolated-string-quadruple-quote-single-interpolation": {
2879
+ "name": "string.quoted.double.cs",
2880
+ "begin": "\\$\"\"\"\"",
2881
+ "beginCaptures": {
2882
+ "0": {
2883
+ "name": "punctuation.definition.string.begin.cs"
2884
+ }
2885
+ },
2886
+ "end": "\"\"\"\"",
2887
+ "endCaptures": {
2888
+ "0": {
2889
+ "name": "punctuation.definition.string.end.cs"
2890
+ }
2891
+ },
2892
+ "patterns": [
2893
+ {
2894
+ "include": "#raw-interpolation"
2895
+ }
2896
+ ]
2897
+ },
2898
+ "raw-interpolated-string-quadruple-quote-double-interpolation": {
2899
+ "name": "string.quoted.double.cs",
2900
+ "begin": "\\$\\$\"\"\"\"",
2901
+ "beginCaptures": {
2902
+ "0": {
2903
+ "name": "punctuation.definition.string.begin.cs"
2904
+ }
2905
+ },
2906
+ "end": "\"\"\"\"",
2907
+ "endCaptures": {
2908
+ "0": {
2909
+ "name": "punctuation.definition.string.end.cs"
2910
+ }
2911
+ },
2912
+ "patterns": [
2913
+ {
2914
+ "include": "#double-raw-interpolation"
2915
+ }
2916
+ ]
2917
+ },
2918
+ "raw-interpolated-string-three-or-more-quote-three-or-more-interpolation": {
2919
+ "name": "string.quoted.double.cs",
2920
+ "begin": "\\$\\$\\$+\"\"\"+",
2921
+ "beginCaptures": {
2922
+ "0": {
2923
+ "name": "punctuation.definition.string.begin.cs"
2924
+ }
2925
+ },
2926
+ "end": "\"\"\"+",
2927
+ "endCaptures": {
2928
+ "0": {
2929
+ "name": "punctuation.definition.string.end.cs"
2930
+ }
2931
+ }
2932
+ },
2933
+ "raw-interpolated-string-five-or-more-quote-one-or-more-interpolation": {
2934
+ "name": "string.quoted.double.cs",
2935
+ "begin": "\\$+\"\"\"\"\"+",
2936
+ "beginCaptures": {
2937
+ "0": {
2938
+ "name": "punctuation.definition.string.begin.cs"
2939
+ }
2940
+ },
2941
+ "end": "\"\"\"\"\"+",
2942
+ "endCaptures": {
2943
+ "0": {
2944
+ "name": "punctuation.definition.string.end.cs"
2945
+ }
2946
+ }
2947
+ },
2948
+ "raw-interpolation": {
2949
+ "name": "meta.interpolation.cs",
2950
+ "begin": "(?<=[^\\{]|^)((?:\\{)*)(\\{)(?=[^\\{])",
2951
+ "beginCaptures": {
2952
+ "1": {
2953
+ "name": "string.quoted.double.cs"
2954
+ },
2955
+ "2": {
2956
+ "name": "punctuation.definition.interpolation.begin.cs"
2957
+ }
2958
+ },
2959
+ "end": "\\}",
2960
+ "endCaptures": {
2961
+ "0": {
2962
+ "name": "punctuation.definition.interpolation.end.cs"
2963
+ }
2964
+ },
2965
+ "patterns": [
2966
+ {
2967
+ "include": "#expression"
2968
+ }
2969
+ ]
2970
+ },
2971
+ "double-raw-interpolation": {
2972
+ "name": "meta.interpolation.cs",
2973
+ "begin": "(?<=[^\\{][^\\{]|^)((?:\\{)*)(\\{\\{)(?=[^\\{])",
2974
+ "beginCaptures": {
2975
+ "1": {
2976
+ "name": "string.quoted.double.cs"
2977
+ },
2978
+ "2": {
2979
+ "name": "punctuation.definition.interpolation.begin.cs"
2980
+ }
2981
+ },
2982
+ "end": "\\}\\}",
2983
+ "endCaptures": {
2984
+ "0": {
2985
+ "name": "punctuation.definition.interpolation.end.cs"
2986
+ }
2987
+ },
2988
+ "patterns": [
2989
+ {
2990
+ "include": "#expression"
2991
+ }
2992
+ ]
2993
+ },
2994
+ "literal": {
2995
+ "patterns": [
2996
+ {
2997
+ "include": "#boolean-literal"
2998
+ },
2999
+ {
3000
+ "include": "#null-literal"
3001
+ },
3002
+ {
3003
+ "include": "#numeric-literal"
3004
+ },
3005
+ {
3006
+ "include": "#char-literal"
3007
+ },
3008
+ {
3009
+ "include": "#raw-string-literal"
3010
+ },
3011
+ {
3012
+ "include": "#string-literal"
3013
+ },
3014
+ {
3015
+ "include": "#verbatim-string-literal"
3016
+ },
3017
+ {
3018
+ "include": "#tuple-literal"
3019
+ }
3020
+ ]
3021
+ },
3022
+ "boolean-literal": {
3023
+ "patterns": [
3024
+ {
3025
+ "name": "constant.language.boolean.true.cs",
3026
+ "match": "(?<!\\.)\\btrue\\b"
3027
+ },
3028
+ {
3029
+ "name": "constant.language.boolean.false.cs",
3030
+ "match": "(?<!\\.)\\bfalse\\b"
3031
+ }
3032
+ ]
3033
+ },
3034
+ "null-literal": {
3035
+ "name": "constant.language.null.cs",
3036
+ "match": "(?<!\\.)\\bnull\\b"
3037
+ },
3038
+ "numeric-literal": {
3039
+ "match": "(?<!\\w)\\.?\\d(?:(?:[0-9a-zA-Z_]|_)|(?<=[eE])[+-]|\\.\\d)*",
3040
+ "captures": {
3041
+ "0": {
3042
+ "patterns": [
3043
+ {
3044
+ "begin": "(?=.)",
3045
+ "end": "$",
3046
+ "patterns": [
3047
+ {
3048
+ "match": "(\\G(?=[0-9.])(?!0[xXbB]))([0-9](?:[0-9]|((?<=[0-9a-fA-F])_(?=[0-9a-fA-F])))*)?((?:(?<=[0-9])|\\.(?=[0-9])))([0-9](?:[0-9]|((?<=[0-9a-fA-F])_(?=[0-9a-fA-F])))*)?((?<!_)([eE])(\\+?)(\\-?)((?:[0-9](?:[0-9]|(?:(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])))*)))?([fFdDmM](?!\\w))?$",
3049
+ "captures": {
3050
+ "2": {
3051
+ "name": "constant.numeric.decimal.cs",
3052
+ "patterns": [
3053
+ {
3054
+ "match": "(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])",
3055
+ "name": "constant.numeric.other.separator.thousands.cs"
3056
+ }
3057
+ ]
3058
+ },
3059
+ "3": {
3060
+ "name": "constant.numeric.other.separator.thousands.cs"
3061
+ },
3062
+ "4": {
3063
+ "name": "constant.numeric.other.separator.decimals.cs"
3064
+ },
3065
+ "5": {
3066
+ "name": "constant.numeric.decimal.cs",
3067
+ "patterns": [
3068
+ {
3069
+ "match": "(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])",
3070
+ "name": "constant.numeric.other.separator.thousands.cs"
3071
+ }
3072
+ ]
3073
+ },
3074
+ "6": {
3075
+ "name": "constant.numeric.other.separator.thousands.cs"
3076
+ },
3077
+ "8": {
3078
+ "name": "constant.numeric.other.exponent.cs"
3079
+ },
3080
+ "9": {
3081
+ "name": "keyword.operator.arithmetic.cs"
3082
+ },
3083
+ "10": {
3084
+ "name": "keyword.operator.arithmetic.cs"
3085
+ },
3086
+ "11": {
3087
+ "name": "constant.numeric.decimal.cs",
3088
+ "patterns": [
3089
+ {
3090
+ "match": "(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])",
3091
+ "name": "constant.numeric.other.separator.thousands.cs"
3092
+ }
3093
+ ]
3094
+ },
3095
+ "12": {
3096
+ "name": "constant.numeric.other.suffix.cs"
3097
+ }
3098
+ }
3099
+ },
3100
+ {
3101
+ "match": "(\\G0[bB])([01_](?:[01_]|((?<=[0-9a-fA-F])_(?=[0-9a-fA-F])))*)((?:(?:(?:(?:(?:[uU]|[uU]l)|[uU]L)|l[uU]?)|L[uU]?)|[fFdDmM])(?!\\w))?$",
3102
+ "captures": {
3103
+ "1": {
3104
+ "name": "constant.numeric.other.preffix.binary.cs"
3105
+ },
3106
+ "2": {
3107
+ "name": "constant.numeric.binary.cs",
3108
+ "patterns": [
3109
+ {
3110
+ "match": "(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])",
3111
+ "name": "constant.numeric.other.separator.thousands.cs"
3112
+ }
3113
+ ]
3114
+ },
3115
+ "3": {
3116
+ "name": "constant.numeric.other.separator.thousands.cs"
3117
+ },
3118
+ "4": {
3119
+ "name": "constant.numeric.other.suffix.cs"
3120
+ }
3121
+ }
3122
+ },
3123
+ {
3124
+ "match": "(\\G0[xX])([0-9a-fA-F](?:[0-9a-fA-F]|((?<=[0-9a-fA-F])_(?=[0-9a-fA-F])))*)((?:(?:(?:(?:(?:[uU]|[uU]l)|[uU]L)|l[uU]?)|L[uU]?)|[fFdDmM])(?!\\w))?$",
3125
+ "captures": {
3126
+ "1": {
3127
+ "name": "constant.numeric.other.preffix.hex.cs"
3128
+ },
3129
+ "2": {
3130
+ "name": "constant.numeric.hex.cs",
3131
+ "patterns": [
3132
+ {
3133
+ "match": "(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])",
3134
+ "name": "constant.numeric.other.separator.thousands.cs"
3135
+ }
3136
+ ]
3137
+ },
3138
+ "3": {
3139
+ "name": "constant.numeric.other.separator.thousands.cs"
3140
+ },
3141
+ "4": {
3142
+ "name": "constant.numeric.other.suffix.cs"
3143
+ }
3144
+ }
3145
+ },
3146
+ {
3147
+ "match": "(\\G(?=[0-9.])(?!0[xXbB]))([0-9](?:[0-9]|((?<=[0-9a-fA-F])_(?=[0-9a-fA-F])))*)((?<!_)([eE])(\\+?)(\\-?)((?:[0-9](?:[0-9]|(?:(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])))*)))?((?:(?:(?:(?:(?:[uU]|[uU]l)|[uU]L)|l[uU]?)|L[uU]?)|[fFdDmM])(?!\\w))?$",
3148
+ "captures": {
3149
+ "2": {
3150
+ "name": "constant.numeric.decimal.cs",
3151
+ "patterns": [
3152
+ {
3153
+ "match": "(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])",
3154
+ "name": "constant.numeric.other.separator.thousands.cs"
3155
+ }
3156
+ ]
3157
+ },
3158
+ "3": {
3159
+ "name": "constant.numeric.other.separator.thousands.cs"
3160
+ },
3161
+ "5": {
3162
+ "name": "constant.numeric.other.exponent.cs"
3163
+ },
3164
+ "6": {
3165
+ "name": "keyword.operator.arithmetic.cs"
3166
+ },
3167
+ "7": {
3168
+ "name": "keyword.operator.arithmetic.cs"
3169
+ },
3170
+ "8": {
3171
+ "name": "constant.numeric.decimal.cs",
3172
+ "patterns": [
3173
+ {
3174
+ "match": "(?<=[0-9a-fA-F])_(?=[0-9a-fA-F])",
3175
+ "name": "constant.numeric.other.separator.thousands.cs"
3176
+ }
3177
+ ]
3178
+ },
3179
+ "9": {
3180
+ "name": "constant.numeric.other.suffix.cs"
3181
+ }
3182
+ }
3183
+ },
3184
+ {
3185
+ "match": "(?:(?:[0-9a-zA-Z_]|_)|(?<=[eE])[+-]|\\.\\d)+",
3186
+ "name": "invalid.illegal.constant.numeric.cs"
3187
+ }
3188
+ ]
3189
+ }
3190
+ ]
3191
+ }
3192
+ }
3193
+ },
3194
+ "char-literal": {
3195
+ "name": "string.quoted.single.cs",
3196
+ "begin": "'",
3197
+ "beginCaptures": {
3198
+ "0": {
3199
+ "name": "punctuation.definition.char.begin.cs"
3200
+ }
3201
+ },
3202
+ "end": "(\\')|((?:[^\\\\\\n])$)",
3203
+ "endCaptures": {
3204
+ "1": {
3205
+ "name": "punctuation.definition.char.end.cs"
3206
+ },
3207
+ "2": {
3208
+ "name": "invalid.illegal.newline.cs"
3209
+ }
3210
+ },
3211
+ "patterns": [
3212
+ {
3213
+ "include": "#char-character-escape"
3214
+ }
3215
+ ]
3216
+ },
3217
+ "char-character-escape": {
3218
+ "name": "constant.character.escape.cs",
3219
+ "match": "\\\\(['\"\\\\0abfnrtv]|x[0-9a-fA-F]{1,4}|u[0-9a-fA-F]{4})"
3220
+ },
3221
+ "string-literal": {
3222
+ "name": "string.quoted.double.cs",
3223
+ "begin": "(?<!@)\"",
3224
+ "beginCaptures": {
3225
+ "0": {
3226
+ "name": "punctuation.definition.string.begin.cs"
3227
+ }
3228
+ },
3229
+ "end": "(\")|((?:[^\\\\\\n])$)",
3230
+ "endCaptures": {
3231
+ "1": {
3232
+ "name": "punctuation.definition.string.end.cs"
3233
+ },
3234
+ "2": {
3235
+ "name": "invalid.illegal.newline.cs"
3236
+ }
3237
+ },
3238
+ "patterns": [
3239
+ {
3240
+ "include": "#string-character-escape"
3241
+ }
3242
+ ]
3243
+ },
3244
+ "string-character-escape": {
3245
+ "name": "constant.character.escape.cs",
3246
+ "match": "\\\\(['\"\\\\0abfnrtv]|x[0-9a-fA-F]{1,4}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4})"
3247
+ },
3248
+ "verbatim-string-literal": {
3249
+ "name": "string.quoted.double.cs",
3250
+ "begin": "@\"",
3251
+ "beginCaptures": {
3252
+ "0": {
3253
+ "name": "punctuation.definition.string.begin.cs"
3254
+ }
3255
+ },
3256
+ "end": "\"(?=[^\"])",
3257
+ "endCaptures": {
3258
+ "0": {
3259
+ "name": "punctuation.definition.string.end.cs"
3260
+ }
3261
+ },
3262
+ "patterns": [
3263
+ {
3264
+ "include": "#verbatim-string-character-escape"
3265
+ }
3266
+ ]
3267
+ },
3268
+ "verbatim-string-character-escape": {
3269
+ "name": "constant.character.escape.cs",
3270
+ "match": "\"\""
3271
+ },
3272
+ "raw-string-literal": {
3273
+ "patterns": [
3274
+ {
3275
+ "include": "#raw-string-literal-more"
3276
+ },
3277
+ {
3278
+ "include": "#raw-string-literal-quadruple"
3279
+ },
3280
+ {
3281
+ "include": "#raw-string-literal-triple"
3282
+ }
3283
+ ]
3284
+ },
3285
+ "raw-string-literal-triple": {
3286
+ "name": "string.quoted.double.cs",
3287
+ "begin": "\"\"\"",
3288
+ "beginCaptures": {
3289
+ "0": {
3290
+ "name": "punctuation.definition.string.begin.cs"
3291
+ }
3292
+ },
3293
+ "end": "\"\"\"",
3294
+ "endCaptures": {
3295
+ "0": {
3296
+ "name": "punctuation.definition.string.end.cs"
3297
+ }
3298
+ }
3299
+ },
3300
+ "raw-string-literal-quadruple": {
3301
+ "name": "string.quoted.double.cs",
3302
+ "begin": "\"\"\"\"",
3303
+ "beginCaptures": {
3304
+ "0": {
3305
+ "name": "punctuation.definition.string.begin.cs"
3306
+ }
3307
+ },
3308
+ "end": "\"\"\"\"",
3309
+ "endCaptures": {
3310
+ "0": {
3311
+ "name": "punctuation.definition.string.end.cs"
3312
+ }
3313
+ }
3314
+ },
3315
+ "raw-string-literal-more": {
3316
+ "name": "string.quoted.double.cs",
3317
+ "begin": "\"\"\"\"\"+",
3318
+ "beginCaptures": {
3319
+ "0": {
3320
+ "name": "punctuation.definition.string.begin.cs"
3321
+ }
3322
+ },
3323
+ "end": "\"\"\"\"\"+",
3324
+ "endCaptures": {
3325
+ "0": {
3326
+ "name": "punctuation.definition.string.end.cs"
3327
+ }
3328
+ }
3329
+ },
3330
+ "tuple-literal": {
3331
+ "begin": "(\\()(?=.*[:,])",
3332
+ "beginCaptures": {
3333
+ "1": {
3334
+ "name": "punctuation.parenthesis.open.cs"
3335
+ }
3336
+ },
3337
+ "end": "\\)",
3338
+ "endCaptures": {
3339
+ "0": {
3340
+ "name": "punctuation.parenthesis.close.cs"
3341
+ }
3342
+ },
3343
+ "patterns": [
3344
+ {
3345
+ "include": "#comment"
3346
+ },
3347
+ {
3348
+ "include": "#tuple-literal-element"
3349
+ },
3350
+ {
3351
+ "include": "#expression"
3352
+ },
3353
+ {
3354
+ "include": "#punctuation-comma"
3355
+ }
3356
+ ]
3357
+ },
3358
+ "tuple-literal-element": {
3359
+ "begin": "(?x)\n(@?[_[:alpha:]][_[:alnum:]]*)\\s*\n(?=:)",
3360
+ "beginCaptures": {
3361
+ "1": {
3362
+ "name": "entity.name.variable.tuple-element.cs"
3363
+ }
3364
+ },
3365
+ "end": "(:)",
3366
+ "endCaptures": {
3367
+ "0": {
3368
+ "name": "punctuation.separator.colon.cs"
3369
+ }
3370
+ }
3371
+ },
3372
+ "expression-operators": {
3373
+ "patterns": [
3374
+ {
3375
+ "name": "keyword.operator.assignment.compound.cs",
3376
+ "match": "\\*=|/=|%=|\\+=|-=|\\?\\?="
3377
+ },
3378
+ {
3379
+ "name": "keyword.operator.assignment.compound.bitwise.cs",
3380
+ "match": "\\&=|\\^=|<<=|>>=|\\|="
3381
+ },
3382
+ {
3383
+ "name": "keyword.operator.bitwise.shift.cs",
3384
+ "match": "<<|>>"
3385
+ },
3386
+ {
3387
+ "name": "keyword.operator.comparison.cs",
3388
+ "match": "==|!="
3389
+ },
3390
+ {
3391
+ "name": "keyword.operator.relational.cs",
3392
+ "match": "<=|>=|<|>"
3393
+ },
3394
+ {
3395
+ "name": "keyword.operator.logical.cs",
3396
+ "match": "\\!|&&|\\|\\|"
3397
+ },
3398
+ {
3399
+ "name": "keyword.operator.bitwise.cs",
3400
+ "match": "\\&|~|\\^|\\|"
3401
+ },
3402
+ {
3403
+ "name": "keyword.operator.assignment.cs",
3404
+ "match": "\\="
3405
+ },
3406
+ {
3407
+ "name": "keyword.operator.decrement.cs",
3408
+ "match": "--"
3409
+ },
3410
+ {
3411
+ "name": "keyword.operator.increment.cs",
3412
+ "match": "\\+\\+"
3413
+ },
3414
+ {
3415
+ "name": "keyword.operator.arithmetic.cs",
3416
+ "match": "%|\\*|/|-|\\+"
3417
+ },
3418
+ {
3419
+ "name": "keyword.operator.null-coalescing.cs",
3420
+ "match": "\\?\\?"
3421
+ }
3422
+ ]
3423
+ },
3424
+ "switch-literal": {
3425
+ "name": "constant.language.null.cs",
3426
+ "match": "(?<!\\.)\\bnull\\b",
3427
+ "beginCaptures": {
3428
+ "1": {
3429
+ "name": "constant.language.null.cs"
3430
+ }
3431
+ },
3432
+ "patterns": [
3433
+ {
3434
+ "include": "#comment"
3435
+ },
3436
+ {
3437
+ "include": "#punctuation-comma"
3438
+ },
3439
+ {
3440
+ "include": "#expression-body"
3441
+ }
3442
+ ]
3443
+ },
3444
+ "conditional-operator": {
3445
+ "begin": "\\?(?!\\s*[?.\\[]|\\s*$)",
3446
+ "beginCaptures": {
3447
+ "0": {
3448
+ "name": "keyword.operator.conditional.question-mark.cs"
3449
+ }
3450
+ },
3451
+ "end": ":",
3452
+ "endCaptures": {
3453
+ "0": {
3454
+ "name": "keyword.operator.conditional.colon.cs"
3455
+ }
3456
+ },
3457
+ "patterns": [
3458
+ {
3459
+ "include": "#expression"
3460
+ }
3461
+ ]
3462
+ },
3463
+ "await-expression": {
3464
+ "name": "keyword.other.await.cs",
3465
+ "match": "(?!\\.)\\b(await)\\b"
3466
+ },
3467
+ "parenthesized-expression": {
3468
+ "begin": "\\(",
3469
+ "beginCaptures": {
3470
+ "0": {
3471
+ "name": "punctuation.parenthesis.open.cs"
3472
+ }
3473
+ },
3474
+ "end": "\\)",
3475
+ "endCaptures": {
3476
+ "0": {
3477
+ "name": "punctuation.parenthesis.close.cs"
3478
+ }
3479
+ },
3480
+ "patterns": [
3481
+ {
3482
+ "include": "#expression"
3483
+ }
3484
+ ]
3485
+ },
3486
+ "initializer-expression": {
3487
+ "begin": "\\{",
3488
+ "beginCaptures": {
3489
+ "0": {
3490
+ "name": "punctuation.curlybrace.open.cs"
3491
+ }
3492
+ },
3493
+ "end": "\\}",
3494
+ "endCaptures": {
3495
+ "0": {
3496
+ "name": "punctuation.curlybrace.close.cs"
3497
+ }
3498
+ },
3499
+ "patterns": [
3500
+ {
3501
+ "include": "#expression"
3502
+ },
3503
+ {
3504
+ "include": "#punctuation-comma"
3505
+ }
3506
+ ]
3507
+ },
3508
+ "identifier": {
3509
+ "name": "variable.other.readwrite.cs",
3510
+ "match": "@?[_[:alpha:]][_[:alnum:]]*"
3511
+ },
3512
+ "cast-expression": {
3513
+ "match": "(?x)\n(\\()\\s*\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(\\))(?=\\s*-*!*@?[_[:alnum:]\\(])",
3514
+ "captures": {
3515
+ "1": {
3516
+ "name": "punctuation.parenthesis.open.cs"
3517
+ },
3518
+ "2": {
3519
+ "patterns": [
3520
+ {
3521
+ "include": "#type"
3522
+ }
3523
+ ]
3524
+ },
3525
+ "7": {
3526
+ "name": "punctuation.parenthesis.close.cs"
3527
+ }
3528
+ }
3529
+ },
3530
+ "as-expression": {
3531
+ "match": "(?x)\n(?<!\\.)\\b(as)\\b\\s*\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?",
3532
+ "captures": {
3533
+ "1": {
3534
+ "name": "keyword.other.as.cs"
3535
+ },
3536
+ "2": {
3537
+ "patterns": [
3538
+ {
3539
+ "include": "#type"
3540
+ }
3541
+ ]
3542
+ }
3543
+ }
3544
+ },
3545
+ "is-expression": {
3546
+ "match": "(?x)\n(?<!\\.)\\b(is)\\b\\s*\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?",
3547
+ "captures": {
3548
+ "1": {
3549
+ "name": "keyword.other.is.cs"
3550
+ },
3551
+ "2": {
3552
+ "patterns": [
3553
+ {
3554
+ "include": "#type"
3555
+ }
3556
+ ]
3557
+ }
3558
+ }
3559
+ },
3560
+ "this-or-base-expression": {
3561
+ "match": "\\b(?:(base)|(this))\\b",
3562
+ "captures": {
3563
+ "1": {
3564
+ "name": "keyword.other.base.cs"
3565
+ },
3566
+ "2": {
3567
+ "name": "keyword.other.this.cs"
3568
+ }
3569
+ }
3570
+ },
3571
+ "invocation-expression": {
3572
+ "begin": "(?x)\n(?:(\\?)\\s*)? # preceding null-conditional operator?\n(?:(\\.)\\s*)? # preceding dot?\n(@?[_[:alpha:]][_[:alnum:]]*)\\s* # method name\n(?<type_args>\\s*<([^<>]|\\g<type_args>)+>\\s*)?\\s* # type arguments\n(?=\\() # open paren of argument list",
3573
+ "beginCaptures": {
3574
+ "1": {
3575
+ "name": "keyword.operator.null-conditional.cs"
3576
+ },
3577
+ "2": {
3578
+ "name": "punctuation.accessor.cs"
3579
+ },
3580
+ "3": {
3581
+ "name": "entity.name.function.cs"
3582
+ },
3583
+ "4": {
3584
+ "patterns": [
3585
+ {
3586
+ "include": "#type-arguments"
3587
+ }
3588
+ ]
3589
+ }
3590
+ },
3591
+ "end": "(?<=\\))",
3592
+ "patterns": [
3593
+ {
3594
+ "include": "#argument-list"
3595
+ }
3596
+ ]
3597
+ },
3598
+ "element-access-expression": {
3599
+ "begin": "(?x)\n(?:(\\?)\\s*)? # preceding null-conditional operator?\n(?:(\\.)\\s*)? # preceding dot?\n(?:(@?[_[:alpha:]][_[:alnum:]]*)\\s*)? # property name\n(?:(\\?)\\s*)? # null-conditional operator?\n(?=\\[) # open bracket of argument list",
3600
+ "beginCaptures": {
3601
+ "1": {
3602
+ "name": "keyword.operator.null-conditional.cs"
3603
+ },
3604
+ "2": {
3605
+ "name": "punctuation.accessor.cs"
3606
+ },
3607
+ "3": {
3608
+ "name": "variable.other.object.property.cs"
3609
+ },
3610
+ "4": {
3611
+ "name": "keyword.operator.null-conditional.cs"
3612
+ }
3613
+ },
3614
+ "end": "(?<=\\])(?!\\s*\\[)",
3615
+ "patterns": [
3616
+ {
3617
+ "include": "#bracketed-argument-list"
3618
+ }
3619
+ ]
3620
+ },
3621
+ "member-access-expression": {
3622
+ "patterns": [
3623
+ {
3624
+ "match": "(?x)\n(?:(\\?)\\s*)? # preceding null-conditional operator?\n(\\.)\\s* # preceding dot\n(@?[_[:alpha:]][_[:alnum:]]*)\\s* # property name\n(?![_[:alnum:]]|\\(|(\\?)?\\[|<) # next character is not alpha-numeric, nor a (, [, or <. Also, test for ?[",
3625
+ "captures": {
3626
+ "1": {
3627
+ "name": "keyword.operator.null-conditional.cs"
3628
+ },
3629
+ "2": {
3630
+ "name": "punctuation.accessor.cs"
3631
+ },
3632
+ "3": {
3633
+ "name": "variable.other.object.property.cs"
3634
+ }
3635
+ }
3636
+ },
3637
+ {
3638
+ "match": "(?x)\n(\\.)?\\s*\n(@?[_[:alpha:]][_[:alnum:]]*)\n(?<type_params>\\s*<([^<>]|\\g<type_params>)+>\\s*)\n(?=\n (\\s*\\?)?\n \\s*\\.\\s*@?[_[:alpha:]][_[:alnum:]]*\n)",
3639
+ "captures": {
3640
+ "1": {
3641
+ "name": "punctuation.accessor.cs"
3642
+ },
3643
+ "2": {
3644
+ "name": "variable.other.object.cs"
3645
+ },
3646
+ "3": {
3647
+ "patterns": [
3648
+ {
3649
+ "include": "#type-arguments"
3650
+ }
3651
+ ]
3652
+ }
3653
+ }
3654
+ },
3655
+ {
3656
+ "match": "(?x)\n(@?[_[:alpha:]][_[:alnum:]]*)\n(?=\n (\\s*\\?)?\n \\s*\\.\\s*@?[_[:alpha:]][_[:alnum:]]*\n)",
3657
+ "captures": {
3658
+ "1": {
3659
+ "name": "variable.other.object.cs"
3660
+ }
3661
+ }
3662
+ }
3663
+ ]
3664
+ },
3665
+ "object-creation-expression": {
3666
+ "patterns": [
3667
+ {
3668
+ "include": "#object-creation-expression-with-parameters"
3669
+ },
3670
+ {
3671
+ "include": "#object-creation-expression-with-no-parameters"
3672
+ }
3673
+ ]
3674
+ },
3675
+ "object-creation-expression-with-parameters": {
3676
+ "begin": "(?x)\n(new)\\s+\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(?=\\()",
3677
+ "beginCaptures": {
3678
+ "1": {
3679
+ "name": "keyword.other.new.cs"
3680
+ },
3681
+ "2": {
3682
+ "patterns": [
3683
+ {
3684
+ "include": "#type"
3685
+ }
3686
+ ]
3687
+ }
3688
+ },
3689
+ "end": "(?<=\\))",
3690
+ "patterns": [
3691
+ {
3692
+ "include": "#argument-list"
3693
+ }
3694
+ ]
3695
+ },
3696
+ "object-creation-expression-with-no-parameters": {
3697
+ "match": "(?x)\n(new)\\s+\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s*\n(?=\\{|$)",
3698
+ "captures": {
3699
+ "1": {
3700
+ "name": "keyword.other.new.cs"
3701
+ },
3702
+ "2": {
3703
+ "patterns": [
3704
+ {
3705
+ "include": "#type"
3706
+ }
3707
+ ]
3708
+ }
3709
+ }
3710
+ },
3711
+ "array-creation-expression": {
3712
+ "begin": "(?x)\n\\b(new|stackalloc)\\b\\s*\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?\\s*\n(?=\\[)",
3713
+ "beginCaptures": {
3714
+ "1": {
3715
+ "name": "keyword.other.new.cs"
3716
+ },
3717
+ "2": {
3718
+ "patterns": [
3719
+ {
3720
+ "include": "#type"
3721
+ }
3722
+ ]
3723
+ }
3724
+ },
3725
+ "end": "(?<=\\])",
3726
+ "patterns": [
3727
+ {
3728
+ "include": "#bracketed-argument-list"
3729
+ }
3730
+ ]
3731
+ },
3732
+ "anonymous-object-creation-expression": {
3733
+ "begin": "\\b(new)\\b\\s*(?=\\{|$)",
3734
+ "beginCaptures": {
3735
+ "1": {
3736
+ "name": "keyword.other.new.cs"
3737
+ }
3738
+ },
3739
+ "end": "(?<=\\})",
3740
+ "patterns": [
3741
+ {
3742
+ "include": "#initializer-expression"
3743
+ }
3744
+ ]
3745
+ },
3746
+ "bracketed-parameter-list": {
3747
+ "begin": "(?=(\\[))",
3748
+ "beginCaptures": {
3749
+ "1": {
3750
+ "name": "punctuation.squarebracket.open.cs"
3751
+ }
3752
+ },
3753
+ "end": "(?=(\\]))",
3754
+ "endCaptures": {
3755
+ "1": {
3756
+ "name": "punctuation.squarebracket.close.cs"
3757
+ }
3758
+ },
3759
+ "patterns": [
3760
+ {
3761
+ "begin": "(?<=\\[)",
3762
+ "end": "(?=\\])",
3763
+ "patterns": [
3764
+ {
3765
+ "include": "#comment"
3766
+ },
3767
+ {
3768
+ "include": "#attribute-section"
3769
+ },
3770
+ {
3771
+ "include": "#parameter"
3772
+ },
3773
+ {
3774
+ "include": "#punctuation-comma"
3775
+ },
3776
+ {
3777
+ "include": "#variable-initializer"
3778
+ }
3779
+ ]
3780
+ }
3781
+ ]
3782
+ },
3783
+ "parenthesized-parameter-list": {
3784
+ "begin": "(\\()",
3785
+ "beginCaptures": {
3786
+ "0": {
3787
+ "name": "punctuation.parenthesis.open.cs"
3788
+ }
3789
+ },
3790
+ "end": "(\\))",
3791
+ "endCaptures": {
3792
+ "0": {
3793
+ "name": "punctuation.parenthesis.close.cs"
3794
+ }
3795
+ },
3796
+ "patterns": [
3797
+ {
3798
+ "include": "#comment"
3799
+ },
3800
+ {
3801
+ "include": "#attribute-section"
3802
+ },
3803
+ {
3804
+ "include": "#parameter"
3805
+ },
3806
+ {
3807
+ "include": "#punctuation-comma"
3808
+ },
3809
+ {
3810
+ "include": "#variable-initializer"
3811
+ }
3812
+ ]
3813
+ },
3814
+ "parameter": {
3815
+ "match": "(?x)\n(?:(?:\\b(ref|params|out|in|this)\\b)\\s+)?\n(?<type_name>\n (?:\n (?:ref\\s+)? # ref return\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+\n(\\g<identifier>)",
3816
+ "captures": {
3817
+ "1": {
3818
+ "name": "storage.modifier.cs"
3819
+ },
3820
+ "2": {
3821
+ "patterns": [
3822
+ {
3823
+ "include": "#type"
3824
+ }
3825
+ ]
3826
+ },
3827
+ "7": {
3828
+ "name": "entity.name.variable.parameter.cs"
3829
+ }
3830
+ }
3831
+ },
3832
+ "argument-list": {
3833
+ "begin": "\\(",
3834
+ "beginCaptures": {
3835
+ "0": {
3836
+ "name": "punctuation.parenthesis.open.cs"
3837
+ }
3838
+ },
3839
+ "end": "\\)",
3840
+ "endCaptures": {
3841
+ "0": {
3842
+ "name": "punctuation.parenthesis.close.cs"
3843
+ }
3844
+ },
3845
+ "patterns": [
3846
+ {
3847
+ "include": "#named-argument"
3848
+ },
3849
+ {
3850
+ "include": "#argument"
3851
+ },
3852
+ {
3853
+ "include": "#punctuation-comma"
3854
+ }
3855
+ ]
3856
+ },
3857
+ "bracketed-argument-list": {
3858
+ "begin": "\\[",
3859
+ "beginCaptures": {
3860
+ "0": {
3861
+ "name": "punctuation.squarebracket.open.cs"
3862
+ }
3863
+ },
3864
+ "end": "\\]",
3865
+ "endCaptures": {
3866
+ "0": {
3867
+ "name": "punctuation.squarebracket.close.cs"
3868
+ }
3869
+ },
3870
+ "patterns": [
3871
+ {
3872
+ "include": "#named-argument"
3873
+ },
3874
+ {
3875
+ "include": "#argument"
3876
+ },
3877
+ {
3878
+ "include": "#punctuation-comma"
3879
+ }
3880
+ ]
3881
+ },
3882
+ "named-argument": {
3883
+ "begin": "(@?[_[:alpha:]][_[:alnum:]]*)\\s*(:)",
3884
+ "beginCaptures": {
3885
+ "1": {
3886
+ "name": "entity.name.variable.parameter.cs"
3887
+ },
3888
+ "2": {
3889
+ "name": "punctuation.separator.colon.cs"
3890
+ }
3891
+ },
3892
+ "end": "(?=(,|\\)|\\]))",
3893
+ "patterns": [
3894
+ {
3895
+ "include": "#argument"
3896
+ }
3897
+ ]
3898
+ },
3899
+ "argument": {
3900
+ "patterns": [
3901
+ {
3902
+ "name": "storage.modifier.cs",
3903
+ "match": "\\b(ref|out|in)\\b"
3904
+ },
3905
+ {
3906
+ "include": "#declaration-expression-local"
3907
+ },
3908
+ {
3909
+ "include": "#expression"
3910
+ }
3911
+ ]
3912
+ },
3913
+ "query-expression": {
3914
+ "begin": "(?x)\n\\b(from)\\b\\s*\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?\n\\s+(\\g<identifier>)\\b\\s*\n\\b(in)\\b\\s*",
3915
+ "beginCaptures": {
3916
+ "1": {
3917
+ "name": "keyword.query.from.cs"
3918
+ },
3919
+ "2": {
3920
+ "patterns": [
3921
+ {
3922
+ "include": "#type"
3923
+ }
3924
+ ]
3925
+ },
3926
+ "7": {
3927
+ "name": "entity.name.variable.range-variable.cs"
3928
+ },
3929
+ "8": {
3930
+ "name": "keyword.query.in.cs"
3931
+ }
3932
+ },
3933
+ "end": "(?=;|\\))",
3934
+ "patterns": [
3935
+ {
3936
+ "include": "#query-body"
3937
+ },
3938
+ {
3939
+ "include": "#expression"
3940
+ }
3941
+ ]
3942
+ },
3943
+ "query-body": {
3944
+ "patterns": [
3945
+ {
3946
+ "include": "#let-clause"
3947
+ },
3948
+ {
3949
+ "include": "#where-clause"
3950
+ },
3951
+ {
3952
+ "include": "#join-clause"
3953
+ },
3954
+ {
3955
+ "include": "#orderby-clause"
3956
+ },
3957
+ {
3958
+ "include": "#select-clause"
3959
+ },
3960
+ {
3961
+ "include": "#group-clause"
3962
+ }
3963
+ ]
3964
+ },
3965
+ "let-clause": {
3966
+ "begin": "(?x)\n\\b(let)\\b\\s*\n(@?[_[:alpha:]][_[:alnum:]]*)\\b\\s*\n(=)\\s*",
3967
+ "beginCaptures": {
3968
+ "1": {
3969
+ "name": "keyword.query.let.cs"
3970
+ },
3971
+ "2": {
3972
+ "name": "entity.name.variable.range-variable.cs"
3973
+ },
3974
+ "3": {
3975
+ "name": "keyword.operator.assignment.cs"
3976
+ }
3977
+ },
3978
+ "end": "(?=;|\\))",
3979
+ "patterns": [
3980
+ {
3981
+ "include": "#query-body"
3982
+ },
3983
+ {
3984
+ "include": "#expression"
3985
+ }
3986
+ ]
3987
+ },
3988
+ "where-clause": {
3989
+ "begin": "(?x)\n\\b(where)\\b\\s*",
3990
+ "beginCaptures": {
3991
+ "1": {
3992
+ "name": "keyword.query.where.cs"
3993
+ }
3994
+ },
3995
+ "end": "(?=;|\\))",
3996
+ "patterns": [
3997
+ {
3998
+ "include": "#query-body"
3999
+ },
4000
+ {
4001
+ "include": "#expression"
4002
+ }
4003
+ ]
4004
+ },
4005
+ "join-clause": {
4006
+ "begin": "(?x)\n\\b(join)\\b\\s*\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)?\n\\s+(\\g<identifier>)\\b\\s*\n\\b(in)\\b\\s*",
4007
+ "beginCaptures": {
4008
+ "1": {
4009
+ "name": "keyword.query.join.cs"
4010
+ },
4011
+ "2": {
4012
+ "patterns": [
4013
+ {
4014
+ "include": "#type"
4015
+ }
4016
+ ]
4017
+ },
4018
+ "7": {
4019
+ "name": "entity.name.variable.range-variable.cs"
4020
+ },
4021
+ "8": {
4022
+ "name": "keyword.query.in.cs"
4023
+ }
4024
+ },
4025
+ "end": "(?=;|\\))",
4026
+ "patterns": [
4027
+ {
4028
+ "include": "#join-on"
4029
+ },
4030
+ {
4031
+ "include": "#join-equals"
4032
+ },
4033
+ {
4034
+ "include": "#join-into"
4035
+ },
4036
+ {
4037
+ "include": "#query-body"
4038
+ },
4039
+ {
4040
+ "include": "#expression"
4041
+ }
4042
+ ]
4043
+ },
4044
+ "join-on": {
4045
+ "match": "\\b(on)\\b\\s*",
4046
+ "captures": {
4047
+ "1": {
4048
+ "name": "keyword.query.on.cs"
4049
+ }
4050
+ }
4051
+ },
4052
+ "join-equals": {
4053
+ "match": "\\b(equals)\\b\\s*",
4054
+ "captures": {
4055
+ "1": {
4056
+ "name": "keyword.query.equals.cs"
4057
+ }
4058
+ }
4059
+ },
4060
+ "join-into": {
4061
+ "match": "(?x)\n\\b(into)\\b\\s*\n(@?[_[:alpha:]][_[:alnum:]]*)\\b\\s*",
4062
+ "captures": {
4063
+ "1": {
4064
+ "name": "keyword.query.into.cs"
4065
+ },
4066
+ "2": {
4067
+ "name": "entity.name.variable.range-variable.cs"
4068
+ }
4069
+ }
4070
+ },
4071
+ "orderby-clause": {
4072
+ "begin": "\\b(orderby)\\b\\s*",
4073
+ "beginCaptures": {
4074
+ "1": {
4075
+ "name": "keyword.query.orderby.cs"
4076
+ }
4077
+ },
4078
+ "end": "(?=;|\\))",
4079
+ "patterns": [
4080
+ {
4081
+ "include": "#ordering-direction"
4082
+ },
4083
+ {
4084
+ "include": "#query-body"
4085
+ },
4086
+ {
4087
+ "include": "#expression"
4088
+ },
4089
+ {
4090
+ "include": "#punctuation-comma"
4091
+ }
4092
+ ]
4093
+ },
4094
+ "ordering-direction": {
4095
+ "match": "\\b(?:(ascending)|(descending))\\b",
4096
+ "captures": {
4097
+ "1": {
4098
+ "name": "keyword.query.ascending.cs"
4099
+ },
4100
+ "2": {
4101
+ "name": "keyword.query.descending.cs"
4102
+ }
4103
+ }
4104
+ },
4105
+ "select-clause": {
4106
+ "begin": "\\b(select)\\b\\s*",
4107
+ "beginCaptures": {
4108
+ "1": {
4109
+ "name": "keyword.query.select.cs"
4110
+ }
4111
+ },
4112
+ "end": "(?=;|\\))",
4113
+ "patterns": [
4114
+ {
4115
+ "include": "#query-body"
4116
+ },
4117
+ {
4118
+ "include": "#expression"
4119
+ }
4120
+ ]
4121
+ },
4122
+ "group-clause": {
4123
+ "begin": "\\b(group)\\b\\s*",
4124
+ "beginCaptures": {
4125
+ "1": {
4126
+ "name": "keyword.query.group.cs"
4127
+ }
4128
+ },
4129
+ "end": "(?=;|\\))",
4130
+ "patterns": [
4131
+ {
4132
+ "include": "#group-by"
4133
+ },
4134
+ {
4135
+ "include": "#group-into"
4136
+ },
4137
+ {
4138
+ "include": "#query-body"
4139
+ },
4140
+ {
4141
+ "include": "#expression"
4142
+ }
4143
+ ]
4144
+ },
4145
+ "group-by": {
4146
+ "match": "\\b(by)\\b\\s*",
4147
+ "captures": {
4148
+ "1": {
4149
+ "name": "keyword.query.by.cs"
4150
+ }
4151
+ }
4152
+ },
4153
+ "group-into": {
4154
+ "match": "(?x)\n\\b(into)\\b\\s*\n(@?[_[:alpha:]][_[:alnum:]]*)\\b\\s*",
4155
+ "captures": {
4156
+ "1": {
4157
+ "name": "keyword.query.into.cs"
4158
+ },
4159
+ "2": {
4160
+ "name": "entity.name.variable.range-variable.cs"
4161
+ }
4162
+ }
4163
+ },
4164
+ "anonymous-method-expression": {
4165
+ "patterns": [
4166
+ {
4167
+ "begin": "(?x)\n(?:\\b(async)\\b\\s*)?\n(@?[_[:alpha:]][_[:alnum:]]*)\\b\\s*\n(=>)",
4168
+ "beginCaptures": {
4169
+ "1": {
4170
+ "name": "storage.modifier.cs"
4171
+ },
4172
+ "2": {
4173
+ "name": "entity.name.variable.parameter.cs"
4174
+ },
4175
+ "3": {
4176
+ "name": "keyword.operator.arrow.cs"
4177
+ }
4178
+ },
4179
+ "end": "(?=\\)|;|}|,)",
4180
+ "patterns": [
4181
+ {
4182
+ "include": "#block"
4183
+ },
4184
+ {
4185
+ "include": "#ref-modifier"
4186
+ },
4187
+ {
4188
+ "include": "#expression"
4189
+ }
4190
+ ]
4191
+ },
4192
+ {
4193
+ "begin": "(?x)\n(?:\\b(async)\\b\\s*)?\n(\\(.*?\\))\\s*\n(=>)",
4194
+ "beginCaptures": {
4195
+ "1": {
4196
+ "name": "storage.modifier.cs"
4197
+ },
4198
+ "2": {
4199
+ "patterns": [
4200
+ {
4201
+ "include": "#lambda-parameter-list"
4202
+ }
4203
+ ]
4204
+ },
4205
+ "3": {
4206
+ "name": "keyword.operator.arrow.cs"
4207
+ }
4208
+ },
4209
+ "end": "(?=\\)|;|}|,)",
4210
+ "patterns": [
4211
+ {
4212
+ "include": "#block"
4213
+ },
4214
+ {
4215
+ "include": "#ref-modifier"
4216
+ },
4217
+ {
4218
+ "include": "#expression"
4219
+ }
4220
+ ]
4221
+ },
4222
+ {
4223
+ "begin": "(?x)\n(?:\\b(async)\\b\\s*)?\n(?:\\b(delegate)\\b\\s*)",
4224
+ "beginCaptures": {
4225
+ "1": {
4226
+ "name": "storage.modifier.cs"
4227
+ },
4228
+ "2": {
4229
+ "name": "keyword.other.delegate.cs"
4230
+ }
4231
+ },
4232
+ "end": "(?=\\)|;|}|,)",
4233
+ "patterns": [
4234
+ {
4235
+ "include": "#parenthesized-parameter-list"
4236
+ },
4237
+ {
4238
+ "include": "#block"
4239
+ },
4240
+ {
4241
+ "include": "#expression"
4242
+ }
4243
+ ]
4244
+ }
4245
+ ]
4246
+ },
4247
+ "lambda-parameter-list": {
4248
+ "begin": "\\(",
4249
+ "beginCaptures": {
4250
+ "0": {
4251
+ "name": "punctuation.parenthesis.open.cs"
4252
+ }
4253
+ },
4254
+ "end": "\\)",
4255
+ "endCaptures": {
4256
+ "0": {
4257
+ "name": "punctuation.parenthesis.close.cs"
4258
+ }
4259
+ },
4260
+ "patterns": [
4261
+ {
4262
+ "include": "#comment"
4263
+ },
4264
+ {
4265
+ "include": "#attribute-section"
4266
+ },
4267
+ {
4268
+ "include": "#lambda-parameter"
4269
+ },
4270
+ {
4271
+ "include": "#punctuation-comma"
4272
+ }
4273
+ ]
4274
+ },
4275
+ "lambda-parameter": {
4276
+ "match": "(?x)\n(?:\\b(ref|out|in)\\b)?\\s*\n(?:(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\\s+)?\n(\\g<identifier>)\\b\\s*\n(?=[,)])",
4277
+ "captures": {
4278
+ "1": {
4279
+ "name": "storage.modifier.cs"
4280
+ },
4281
+ "2": {
4282
+ "patterns": [
4283
+ {
4284
+ "include": "#type"
4285
+ }
4286
+ ]
4287
+ },
4288
+ "7": {
4289
+ "name": "entity.name.variable.parameter.cs"
4290
+ }
4291
+ }
4292
+ },
4293
+ "type": {
4294
+ "name": "meta.type.cs",
4295
+ "patterns": [
4296
+ {
4297
+ "include": "#comment"
4298
+ },
4299
+ {
4300
+ "include": "#ref-modifier"
4301
+ },
4302
+ {
4303
+ "include": "#readonly-modifier"
4304
+ },
4305
+ {
4306
+ "include": "#tuple-type"
4307
+ },
4308
+ {
4309
+ "include": "#type-builtin"
4310
+ },
4311
+ {
4312
+ "include": "#type-name"
4313
+ },
4314
+ {
4315
+ "include": "#type-arguments"
4316
+ },
4317
+ {
4318
+ "include": "#type-array-suffix"
4319
+ },
4320
+ {
4321
+ "include": "#type-nullable-suffix"
4322
+ }
4323
+ ]
4324
+ },
4325
+ "ref-modifier": {
4326
+ "name": "storage.modifier.cs",
4327
+ "match": "\\b(ref)\\b"
4328
+ },
4329
+ "readonly-modifier": {
4330
+ "name": "storage.modifier.cs",
4331
+ "match": "\\b(readonly)\\b"
4332
+ },
4333
+ "tuple-type": {
4334
+ "begin": "\\(",
4335
+ "beginCaptures": {
4336
+ "0": {
4337
+ "name": "punctuation.parenthesis.open.cs"
4338
+ }
4339
+ },
4340
+ "end": "\\)",
4341
+ "endCaptures": {
4342
+ "0": {
4343
+ "name": "punctuation.parenthesis.close.cs"
4344
+ }
4345
+ },
4346
+ "patterns": [
4347
+ {
4348
+ "include": "#tuple-element"
4349
+ },
4350
+ {
4351
+ "include": "#punctuation-comma"
4352
+ }
4353
+ ]
4354
+ },
4355
+ "tuple-element": {
4356
+ "match": "(?x)\n(?<type_name>\n (?:\n (?:\n (?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? # alias-qualification\n (?<name_and_type_args> # identifier + type arguments (if any)\n \\g<identifier>\\s*\n (?<type_args>\\s*<(?:[^<>]|\\g<type_args>)+>\\s*)?\n )\n (?:\\s*\\.\\s*\\g<name_and_type_args>)* | # Are there any more names being dotted into?\n (?<tuple>\\s*\\((?:[^\\(\\)]|\\g<tuple>)+\\))\n )\n (?:\\s*\\?\\s*)? # nullable suffix?\n (?:\\s* # array suffix?\n \\[\n (?:\\s*,\\s*)* # commata for multi-dimensional arrays\n \\]\n \\s*\n (?:\\?)? # arrays can be nullable reference types\n \\s*\n )*\n )\n)\n(?:(?<tuple_name>\\g<identifier>)\\b)?",
4357
+ "captures": {
4358
+ "1": {
4359
+ "patterns": [
4360
+ {
4361
+ "include": "#type"
4362
+ }
4363
+ ]
4364
+ },
4365
+ "6": {
4366
+ "name": "entity.name.variable.tuple-element.cs"
4367
+ }
4368
+ }
4369
+ },
4370
+ "type-builtin": {
4371
+ "match": "\\b(bool|byte|char|decimal|double|float|int|long|object|sbyte|short|string|uint|ulong|ushort|void|dynamic)\\b",
4372
+ "captures": {
4373
+ "1": {
4374
+ "name": "keyword.type.cs"
4375
+ }
4376
+ }
4377
+ },
4378
+ "type-name": {
4379
+ "patterns": [
4380
+ {
4381
+ "match": "(@?[_[:alpha:]][_[:alnum:]]*)\\s*(\\:\\:)",
4382
+ "captures": {
4383
+ "1": {
4384
+ "name": "entity.name.type.alias.cs"
4385
+ },
4386
+ "2": {
4387
+ "name": "punctuation.separator.coloncolon.cs"
4388
+ }
4389
+ }
4390
+ },
4391
+ {
4392
+ "match": "(@?[_[:alpha:]][_[:alnum:]]*)\\s*(\\.)",
4393
+ "captures": {
4394
+ "1": {
4395
+ "name": "entity.name.type.cs"
4396
+ },
4397
+ "2": {
4398
+ "name": "punctuation.accessor.cs"
4399
+ }
4400
+ }
4401
+ },
4402
+ {
4403
+ "match": "(\\.)\\s*(@?[_[:alpha:]][_[:alnum:]]*)",
4404
+ "captures": {
4405
+ "1": {
4406
+ "name": "punctuation.accessor.cs"
4407
+ },
4408
+ "2": {
4409
+ "name": "entity.name.type.cs"
4410
+ }
4411
+ }
4412
+ },
4413
+ {
4414
+ "name": "entity.name.type.cs",
4415
+ "match": "@?[_[:alpha:]][_[:alnum:]]*"
4416
+ }
4417
+ ]
4418
+ },
4419
+ "type-arguments": {
4420
+ "begin": "<",
4421
+ "beginCaptures": {
4422
+ "0": {
4423
+ "name": "punctuation.definition.typeparameters.begin.cs"
4424
+ }
4425
+ },
4426
+ "end": ">",
4427
+ "endCaptures": {
4428
+ "0": {
4429
+ "name": "punctuation.definition.typeparameters.end.cs"
4430
+ }
4431
+ },
4432
+ "patterns": [
4433
+ {
4434
+ "include": "#comment"
4435
+ },
4436
+ {
4437
+ "include": "#type"
4438
+ },
4439
+ {
4440
+ "include": "#punctuation-comma"
4441
+ }
4442
+ ]
4443
+ },
4444
+ "type-array-suffix": {
4445
+ "begin": "\\[",
4446
+ "beginCaptures": {
4447
+ "0": {
4448
+ "name": "punctuation.squarebracket.open.cs"
4449
+ }
4450
+ },
4451
+ "end": "\\]",
4452
+ "endCaptures": {
4453
+ "0": {
4454
+ "name": "punctuation.squarebracket.close.cs"
4455
+ }
4456
+ },
4457
+ "patterns": [
4458
+ {
4459
+ "include": "#punctuation-comma"
4460
+ }
4461
+ ]
4462
+ },
4463
+ "type-nullable-suffix": {
4464
+ "match": "\\?",
4465
+ "captures": {
4466
+ "0": {
4467
+ "name": "punctuation.separator.question-mark.cs"
4468
+ }
4469
+ }
4470
+ },
4471
+ "operator-assignment": {
4472
+ "name": "keyword.operator.assignment.cs",
4473
+ "match": "(?<!=|!)(=)(?!=)"
4474
+ },
4475
+ "punctuation-comma": {
4476
+ "name": "punctuation.separator.comma.cs",
4477
+ "match": ","
4478
+ },
4479
+ "punctuation-semicolon": {
4480
+ "name": "punctuation.terminator.statement.cs",
4481
+ "match": ";"
4482
+ },
4483
+ "punctuation-accessor": {
4484
+ "name": "punctuation.accessor.cs",
4485
+ "match": "\\."
4486
+ },
4487
+ "preprocessor": {
4488
+ "name": "meta.preprocessor.cs",
4489
+ "begin": "^\\s*(\\#)\\s*",
4490
+ "beginCaptures": {
4491
+ "1": {
4492
+ "name": "punctuation.separator.hash.cs"
4493
+ }
4494
+ },
4495
+ "end": "(?<=$)",
4496
+ "patterns": [
4497
+ {
4498
+ "include": "#comment"
4499
+ },
4500
+ {
4501
+ "include": "#preprocessor-define-or-undef"
4502
+ },
4503
+ {
4504
+ "include": "#preprocessor-if-or-elif"
4505
+ },
4506
+ {
4507
+ "include": "#preprocessor-else-or-endif"
4508
+ },
4509
+ {
4510
+ "include": "#preprocessor-warning-or-error"
4511
+ },
4512
+ {
4513
+ "include": "#preprocessor-region"
4514
+ },
4515
+ {
4516
+ "include": "#preprocessor-endregion"
4517
+ },
4518
+ {
4519
+ "include": "#preprocessor-load"
4520
+ },
4521
+ {
4522
+ "include": "#preprocessor-r"
4523
+ },
4524
+ {
4525
+ "include": "#preprocessor-line"
4526
+ },
4527
+ {
4528
+ "include": "#preprocessor-pragma-warning"
4529
+ },
4530
+ {
4531
+ "include": "#preprocessor-pragma-checksum"
4532
+ }
4533
+ ]
4534
+ },
4535
+ "preprocessor-define-or-undef": {
4536
+ "match": "\\b(?:(define)|(undef))\\b\\s*\\b([_[:alpha:]][_[:alnum:]]*)\\b",
4537
+ "captures": {
4538
+ "1": {
4539
+ "name": "keyword.preprocessor.define.cs"
4540
+ },
4541
+ "2": {
4542
+ "name": "keyword.preprocessor.undef.cs"
4543
+ },
4544
+ "3": {
4545
+ "name": "entity.name.variable.preprocessor.symbol.cs"
4546
+ }
4547
+ }
4548
+ },
4549
+ "preprocessor-if-or-elif": {
4550
+ "begin": "\\b(?:(if)|(elif))\\b",
4551
+ "beginCaptures": {
4552
+ "1": {
4553
+ "name": "keyword.preprocessor.if.cs"
4554
+ },
4555
+ "2": {
4556
+ "name": "keyword.preprocessor.elif.cs"
4557
+ }
4558
+ },
4559
+ "end": "(?=$)",
4560
+ "patterns": [
4561
+ {
4562
+ "include": "#comment"
4563
+ },
4564
+ {
4565
+ "include": "#preprocessor-expression"
4566
+ }
4567
+ ]
4568
+ },
4569
+ "preprocessor-else-or-endif": {
4570
+ "match": "\\b(?:(else)|(endif))\\b",
4571
+ "captures": {
4572
+ "1": {
4573
+ "name": "keyword.preprocessor.else.cs"
4574
+ },
4575
+ "2": {
4576
+ "name": "keyword.preprocessor.endif.cs"
4577
+ }
4578
+ }
4579
+ },
4580
+ "preprocessor-warning-or-error": {
4581
+ "match": "\\b(?:(warning)|(error))\\b\\s*(.*)(?=$)",
4582
+ "captures": {
4583
+ "1": {
4584
+ "name": "keyword.preprocessor.warning.cs"
4585
+ },
4586
+ "2": {
4587
+ "name": "keyword.preprocessor.error.cs"
4588
+ },
4589
+ "3": {
4590
+ "name": "string.unquoted.preprocessor.message.cs"
4591
+ }
4592
+ }
4593
+ },
4594
+ "preprocessor-load": {
4595
+ "begin": "\\b(load)\\b",
4596
+ "beginCaptures": {
4597
+ "1": {
4598
+ "name": "keyword.preprocessor.load.cs"
4599
+ }
4600
+ },
4601
+ "end": "(?=$)",
4602
+ "patterns": [
4603
+ {
4604
+ "match": "\\\"[^\"]*\\\"",
4605
+ "captures": {
4606
+ "0": {
4607
+ "name": "string.quoted.double.cs"
4608
+ }
4609
+ }
4610
+ }
4611
+ ]
4612
+ },
4613
+ "preprocessor-r": {
4614
+ "begin": "\\b(r)\\b",
4615
+ "beginCaptures": {
4616
+ "1": {
4617
+ "name": "keyword.preprocessor.r.cs"
4618
+ }
4619
+ },
4620
+ "end": "(?=$)",
4621
+ "patterns": [
4622
+ {
4623
+ "match": "\\\"[^\"]*\\\"",
4624
+ "captures": {
4625
+ "0": {
4626
+ "name": "string.quoted.double.cs"
4627
+ }
4628
+ }
4629
+ }
4630
+ ]
4631
+ },
4632
+ "preprocessor-region": {
4633
+ "match": "\\b(region)\\b\\s*(.*)(?=$)",
4634
+ "captures": {
4635
+ "1": {
4636
+ "name": "keyword.preprocessor.region.cs"
4637
+ },
4638
+ "2": {
4639
+ "name": "string.unquoted.preprocessor.message.cs"
4640
+ }
4641
+ }
4642
+ },
4643
+ "preprocessor-endregion": {
4644
+ "match": "\\b(endregion)\\b",
4645
+ "captures": {
4646
+ "1": {
4647
+ "name": "keyword.preprocessor.endregion.cs"
4648
+ }
4649
+ }
4650
+ },
4651
+ "preprocessor-line": {
4652
+ "begin": "\\b(line)\\b",
4653
+ "beginCaptures": {
4654
+ "1": {
4655
+ "name": "keyword.preprocessor.line.cs"
4656
+ }
4657
+ },
4658
+ "end": "(?=$)",
4659
+ "patterns": [
4660
+ {
4661
+ "match": "\\b(?:(default|hidden))",
4662
+ "captures": {
4663
+ "1": {
4664
+ "name": "keyword.preprocessor.default.cs"
4665
+ },
4666
+ "2": {
4667
+ "name": "keyword.preprocessor.hidden.cs"
4668
+ }
4669
+ }
4670
+ },
4671
+ {
4672
+ "match": "[0-9]+",
4673
+ "captures": {
4674
+ "0": {
4675
+ "name": "constant.numeric.decimal.cs"
4676
+ }
4677
+ }
4678
+ },
4679
+ {
4680
+ "match": "\\\"[^\"]*\\\"",
4681
+ "captures": {
4682
+ "0": {
4683
+ "name": "string.quoted.double.cs"
4684
+ }
4685
+ }
4686
+ }
4687
+ ]
4688
+ },
4689
+ "preprocessor-pragma-warning": {
4690
+ "match": "\\b(pragma)\\b\\s*\\b(warning)\\b\\s*\\b(?:(disable)|(restore))\\b(\\s*[0-9]+(?:\\s*,\\s*[0-9]+)?)?",
4691
+ "captures": {
4692
+ "1": {
4693
+ "name": "keyword.preprocessor.pragma.cs"
4694
+ },
4695
+ "2": {
4696
+ "name": "keyword.preprocessor.warning.cs"
4697
+ },
4698
+ "3": {
4699
+ "name": "keyword.preprocessor.disable.cs"
4700
+ },
4701
+ "4": {
4702
+ "name": "keyword.preprocessor.restore.cs"
4703
+ },
4704
+ "5": {
4705
+ "patterns": [
4706
+ {
4707
+ "match": "[0-9]+",
4708
+ "captures": {
4709
+ "0": {
4710
+ "name": "constant.numeric.decimal.cs"
4711
+ }
4712
+ }
4713
+ },
4714
+ {
4715
+ "include": "#punctuation-comma"
4716
+ }
4717
+ ]
4718
+ }
4719
+ }
4720
+ },
4721
+ "preprocessor-pragma-checksum": {
4722
+ "match": "\\b(pragma)\\b\\s*\\b(checksum)\\b\\s*(\\\"[^\"]*\\\")\\s*(\\\"[^\"]*\\\")\\s*(\\\"[^\"]*\\\")",
4723
+ "captures": {
4724
+ "1": {
4725
+ "name": "keyword.preprocessor.pragma.cs"
4726
+ },
4727
+ "2": {
4728
+ "name": "keyword.preprocessor.checksum.cs"
4729
+ },
4730
+ "3": {
4731
+ "name": "string.quoted.double.cs"
4732
+ },
4733
+ "4": {
4734
+ "name": "string.quoted.double.cs"
4735
+ },
4736
+ "5": {
4737
+ "name": "string.quoted.double.cs"
4738
+ }
4739
+ }
4740
+ },
4741
+ "preprocessor-expression": {
4742
+ "patterns": [
4743
+ {
4744
+ "begin": "\\(",
4745
+ "beginCaptures": {
4746
+ "0": {
4747
+ "name": "punctuation.parenthesis.open.cs"
4748
+ }
4749
+ },
4750
+ "end": "\\)",
4751
+ "endCaptures": {
4752
+ "0": {
4753
+ "name": "punctuation.parenthesis.close.cs"
4754
+ }
4755
+ },
4756
+ "patterns": [
4757
+ {
4758
+ "include": "#preprocessor-expression"
4759
+ }
4760
+ ]
4761
+ },
4762
+ {
4763
+ "match": "\\b(?:(true)|(false)|([_[:alpha:]][_[:alnum:]]*))\\b",
4764
+ "captures": {
4765
+ "1": {
4766
+ "name": "constant.language.boolean.true.cs"
4767
+ },
4768
+ "2": {
4769
+ "name": "constant.language.boolean.false.cs"
4770
+ },
4771
+ "3": {
4772
+ "name": "entity.name.variable.preprocessor.symbol.cs"
4773
+ }
4774
+ }
4775
+ },
4776
+ {
4777
+ "match": "(==|!=)|(\\!|&&|\\|\\|)",
4778
+ "captures": {
4779
+ "1": {
4780
+ "name": "keyword.operator.comparison.cs"
4781
+ },
4782
+ "2": {
4783
+ "name": "keyword.operator.logical.cs"
4784
+ }
4785
+ }
4786
+ }
4787
+ ]
4788
+ },
4789
+ "comment": {
4790
+ "patterns": [
4791
+ {
4792
+ "name": "comment.block.cs",
4793
+ "begin": "/\\*",
4794
+ "beginCaptures": {
4795
+ "0": {
4796
+ "name": "punctuation.definition.comment.cs"
4797
+ }
4798
+ },
4799
+ "end": "\\*/",
4800
+ "endCaptures": {
4801
+ "0": {
4802
+ "name": "punctuation.definition.comment.cs"
4803
+ }
4804
+ }
4805
+ },
4806
+ {
4807
+ "begin": "(^\\s+)?(?=//)",
4808
+ "beginCaptures": {
4809
+ "1": {
4810
+ "name": "punctuation.whitespace.comment.leading.cs"
4811
+ }
4812
+ },
4813
+ "end": "(?=$)",
4814
+ "patterns": [
4815
+ {
4816
+ "name": "comment.block.documentation.cs",
4817
+ "begin": "(?<!/)///(?!/)",
4818
+ "beginCaptures": {
4819
+ "0": {
4820
+ "name": "punctuation.definition.comment.cs"
4821
+ }
4822
+ },
4823
+ "end": "(?=$)",
4824
+ "patterns": [
4825
+ {
4826
+ "include": "#xml-doc-comment"
4827
+ }
4828
+ ]
4829
+ },
4830
+ {
4831
+ "name": "comment.line.double-slash.cs",
4832
+ "begin": "(?<!/)//(?:(?!/)|(?=//))",
4833
+ "beginCaptures": {
4834
+ "0": {
4835
+ "name": "punctuation.definition.comment.cs"
4836
+ }
4837
+ },
4838
+ "end": "(?=$)"
4839
+ }
4840
+ ]
4841
+ }
4842
+ ]
4843
+ },
4844
+ "xml-doc-comment": {
4845
+ "patterns": [
4846
+ {
4847
+ "include": "#xml-comment"
4848
+ },
4849
+ {
4850
+ "include": "#xml-character-entity"
4851
+ },
4852
+ {
4853
+ "include": "#xml-cdata"
4854
+ },
4855
+ {
4856
+ "include": "#xml-tag"
4857
+ }
4858
+ ]
4859
+ },
4860
+ "xml-tag": {
4861
+ "name": "meta.tag.cs",
4862
+ "begin": "(?x)\n(</?)\n(\n (?:\n ([-_[:alnum:]]+)\n (:)\n )?\n ([-_[:alnum:]]+)\n)",
4863
+ "beginCaptures": {
4864
+ "1": {
4865
+ "name": "punctuation.definition.tag.cs"
4866
+ },
4867
+ "2": {
4868
+ "name": "entity.name.tag.cs"
4869
+ },
4870
+ "3": {
4871
+ "name": "entity.name.tag.namespace.cs"
4872
+ },
4873
+ "4": {
4874
+ "name": "punctuation.separator.colon.cs"
4875
+ },
4876
+ "5": {
4877
+ "name": "entity.name.tag.localname.cs"
4878
+ }
4879
+ },
4880
+ "end": "(/?>)",
4881
+ "endCaptures": {
4882
+ "1": {
4883
+ "name": "punctuation.definition.tag.cs"
4884
+ }
4885
+ },
4886
+ "patterns": [
4887
+ {
4888
+ "include": "#xml-attribute"
4889
+ }
4890
+ ]
4891
+ },
4892
+ "xml-attribute": {
4893
+ "patterns": [
4894
+ {
4895
+ "match": "(?x)\n(?:^|\\s+)\n(\n (?:\n ([-_[:alnum:]]+)\n (:)\n )?\n ([-_[:alnum:]]+)\n)\n(=)",
4896
+ "captures": {
4897
+ "1": {
4898
+ "name": "entity.other.attribute-name.cs"
4899
+ },
4900
+ "2": {
4901
+ "name": "entity.other.attribute-name.namespace.cs"
4902
+ },
4903
+ "3": {
4904
+ "name": "punctuation.separator.colon.cs"
4905
+ },
4906
+ "4": {
4907
+ "name": "entity.other.attribute-name.localname.cs"
4908
+ },
4909
+ "5": {
4910
+ "name": "punctuation.separator.equals.cs"
4911
+ }
4912
+ }
4913
+ },
4914
+ {
4915
+ "include": "#xml-string"
4916
+ }
4917
+ ]
4918
+ },
4919
+ "xml-cdata": {
4920
+ "name": "string.unquoted.cdata.cs",
4921
+ "begin": "<!\\[CDATA\\[",
4922
+ "beginCaptures": {
4923
+ "0": {
4924
+ "name": "punctuation.definition.string.begin.cs"
4925
+ }
4926
+ },
4927
+ "end": "\\]\\]>",
4928
+ "endCaptures": {
4929
+ "0": {
4930
+ "name": "punctuation.definition.string.end.cs"
4931
+ }
4932
+ }
4933
+ },
4934
+ "xml-string": {
4935
+ "patterns": [
4936
+ {
4937
+ "name": "string.quoted.single.cs",
4938
+ "begin": "\\'",
4939
+ "beginCaptures": {
4940
+ "0": {
4941
+ "name": "punctuation.definition.string.begin.cs"
4942
+ }
4943
+ },
4944
+ "end": "\\'",
4945
+ "endCaptures": {
4946
+ "0": {
4947
+ "name": "punctuation.definition.string.end.cs"
4948
+ }
4949
+ },
4950
+ "patterns": [
4951
+ {
4952
+ "include": "#xml-character-entity"
4953
+ }
4954
+ ]
4955
+ },
4956
+ {
4957
+ "name": "string.quoted.double.cs",
4958
+ "begin": "\\\"",
4959
+ "beginCaptures": {
4960
+ "0": {
4961
+ "name": "punctuation.definition.string.begin.cs"
4962
+ }
4963
+ },
4964
+ "end": "\\\"",
4965
+ "endCaptures": {
4966
+ "0": {
4967
+ "name": "punctuation.definition.string.end.cs"
4968
+ }
4969
+ },
4970
+ "patterns": [
4971
+ {
4972
+ "include": "#xml-character-entity"
4973
+ }
4974
+ ]
4975
+ }
4976
+ ]
4977
+ },
4978
+ "xml-character-entity": {
4979
+ "patterns": [
4980
+ {
4981
+ "name": "constant.character.entity.cs",
4982
+ "match": "(?x)\n(&)\n(\n (?:[[:alpha:]:_][[:alnum:]:_.-]*)|\n (?:\\#[[:digit:]]+)|\n (?:\\#x[[:xdigit:]]+)\n)\n(;)",
4983
+ "captures": {
4984
+ "1": {
4985
+ "name": "punctuation.definition.constant.cs"
4986
+ },
4987
+ "3": {
4988
+ "name": "punctuation.definition.constant.cs"
4989
+ }
4990
+ }
4991
+ },
4992
+ {
4993
+ "name": "invalid.illegal.bad-ampersand.cs",
4994
+ "match": "&"
4995
+ }
4996
+ ]
4997
+ },
4998
+ "xml-comment": {
4999
+ "name": "comment.block.cs",
5000
+ "begin": "<!--",
5001
+ "beginCaptures": {
5002
+ "0": {
5003
+ "name": "punctuation.definition.comment.cs"
5004
+ }
5005
+ },
5006
+ "end": "-->",
5007
+ "endCaptures": {
5008
+ "0": {
5009
+ "name": "punctuation.definition.comment.cs"
5010
+ }
5011
+ }
5012
+ }
5013
+ }
5014
+ }