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

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

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