PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.13.0
Code Block Pro – Beautiful Syntax Highlighting v1.13.0
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
code-block-pro / build / shiki / languages / csharp.tmLanguage.json

csharp.tmLanguage.json in Code Block Pro – Beautiful Syntax Highlighting 1.13.0, at build/shiki/languages/csharp.tmLanguage.json

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