PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.25.0
Code Block Pro – Beautiful Syntax Highlighting v1.25.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.25.0, at build/shiki/languages/csharp.tmLanguage.json

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