@codingame/monaco-languageclient-wrapper 1.4.2 → 1.7.1

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