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

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