tm-grammars 0.0.0

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 (181) hide show
  1. package/LICENSE +22 -0
  2. package/NOTICE +6565 -0
  3. package/README.md +211 -0
  4. package/grammars/abap.json +380 -0
  5. package/grammars/actionscript-3.json +951 -0
  6. package/grammars/ada.json +3874 -0
  7. package/grammars/apache.json +562 -0
  8. package/grammars/apex.json +3203 -0
  9. package/grammars/apl.json +1479 -0
  10. package/grammars/applescript.json +1406 -0
  11. package/grammars/ara.json +428 -0
  12. package/grammars/asm.json +1741 -0
  13. package/grammars/astro.json +776 -0
  14. package/grammars/awk.json +388 -0
  15. package/grammars/ballerina.json +3768 -0
  16. package/grammars/bat.json +783 -0
  17. package/grammars/beancount.json +831 -0
  18. package/grammars/berry.json +172 -0
  19. package/grammars/bibtex.json +315 -0
  20. package/grammars/bicep.json +239 -0
  21. package/grammars/blade.json +3870 -0
  22. package/grammars/c.json +3552 -0
  23. package/grammars/cadence.json +738 -0
  24. package/grammars/clarity.json +877 -0
  25. package/grammars/clojure.json +426 -0
  26. package/grammars/cmake.json +143 -0
  27. package/grammars/cobol.json +1124 -0
  28. package/grammars/codeql.json +1540 -0
  29. package/grammars/coffee.json +1311 -0
  30. package/grammars/cpp-macro.json +9498 -0
  31. package/grammars/cpp.json +16635 -0
  32. package/grammars/crystal.json +1866 -0
  33. package/grammars/csharp.json +5722 -0
  34. package/grammars/css.json +1860 -0
  35. package/grammars/csv.json +46 -0
  36. package/grammars/cue.json +1128 -0
  37. package/grammars/cypher.json +353 -0
  38. package/grammars/d.json +3185 -0
  39. package/grammars/dart.json +522 -0
  40. package/grammars/dax.json +185 -0
  41. package/grammars/diff.json +155 -0
  42. package/grammars/docker.json +97 -0
  43. package/grammars/dream-maker.json +640 -0
  44. package/grammars/elixir.json +1014 -0
  45. package/grammars/elm.json +751 -0
  46. package/grammars/erb.json +156 -0
  47. package/grammars/erlang.json +1757 -0
  48. package/grammars/fish.json +189 -0
  49. package/grammars/fsharp.json +1831 -0
  50. package/grammars/gdresource.json +290 -0
  51. package/grammars/gdscript.json +969 -0
  52. package/grammars/gdshader.json +405 -0
  53. package/grammars/gherkin.json +133 -0
  54. package/grammars/git-commit.json +85 -0
  55. package/grammars/git-rebase.json +56 -0
  56. package/grammars/glimmer-js.json +98 -0
  57. package/grammars/glimmer-ts.json +98 -0
  58. package/grammars/glsl.json +57 -0
  59. package/grammars/gnuplot.json +892 -0
  60. package/grammars/go.json +1012 -0
  61. package/grammars/graphql.json +1295 -0
  62. package/grammars/groovy.json +1378 -0
  63. package/grammars/hack.json +2650 -0
  64. package/grammars/haml.json +598 -0
  65. package/grammars/handlebars.json +848 -0
  66. package/grammars/haskell.json +2431 -0
  67. package/grammars/hcl.json +787 -0
  68. package/grammars/hjson.json +821 -0
  69. package/grammars/hlsl.json +212 -0
  70. package/grammars/html.json +93 -0
  71. package/grammars/imba.json +2696 -0
  72. package/grammars/ini.json +108 -0
  73. package/grammars/java.json +1885 -0
  74. package/grammars/javascript.json +5984 -0
  75. package/grammars/jinja-html.json +16 -0
  76. package/grammars/jinja.json +345 -0
  77. package/grammars/jison.json +715 -0
  78. package/grammars/jsdoc.json +21 -0
  79. package/grammars/json.json +208 -0
  80. package/grammars/json5.json +244 -0
  81. package/grammars/jsonc.json +208 -0
  82. package/grammars/jsonl.json +208 -0
  83. package/grammars/jsonnet.json +211 -0
  84. package/grammars/jssm.json +159 -0
  85. package/grammars/jsx.json +5984 -0
  86. package/grammars/julia.json +1061 -0
  87. package/grammars/kotlin.json +580 -0
  88. package/grammars/kusto.json +687 -0
  89. package/grammars/latex.json +2395 -0
  90. package/grammars/less.json +5012 -0
  91. package/grammars/liquid.json +990 -0
  92. package/grammars/lisp.json +121 -0
  93. package/grammars/logo.json +55 -0
  94. package/grammars/lua.json +956 -0
  95. package/grammars/make.json +629 -0
  96. package/grammars/markdown.json +3066 -0
  97. package/grammars/marko.json +1344 -0
  98. package/grammars/matlab.json +1131 -0
  99. package/grammars/mdc.json +571 -0
  100. package/grammars/mdx.json +5629 -0
  101. package/grammars/mermaid.json +1382 -0
  102. package/grammars/mojo.json +4153 -0
  103. package/grammars/narrat.json +227 -0
  104. package/grammars/nextflow.json +298 -0
  105. package/grammars/nginx.json +2121 -0
  106. package/grammars/nim.json +1522 -0
  107. package/grammars/nix.json +1200 -0
  108. package/grammars/nushell.json +1047 -0
  109. package/grammars/objective-c.json +3750 -0
  110. package/grammars/objective-cpp.json +7242 -0
  111. package/grammars/ocaml.json +2967 -0
  112. package/grammars/pascal.json +154 -0
  113. package/grammars/perl.json +2971 -0
  114. package/grammars/php.json +4024 -0
  115. package/grammars/plsql.json +241 -0
  116. package/grammars/postcss.json +377 -0
  117. package/grammars/powerquery.json +349 -0
  118. package/grammars/powershell.json +1024 -0
  119. package/grammars/prisma.json +443 -0
  120. package/grammars/prolog.json +298 -0
  121. package/grammars/proto.json +507 -0
  122. package/grammars/pug.json +1033 -0
  123. package/grammars/puppet.json +777 -0
  124. package/grammars/purescript.json +871 -0
  125. package/grammars/python.json +4208 -0
  126. package/grammars/r.json +637 -0
  127. package/grammars/raku.json +310 -0
  128. package/grammars/razor.json +1813 -0
  129. package/grammars/reg.json +136 -0
  130. package/grammars/rel.json +200 -0
  131. package/grammars/riscv.json +298 -0
  132. package/grammars/rst.json +734 -0
  133. package/grammars/ruby.json +2769 -0
  134. package/grammars/rust.json +1171 -0
  135. package/grammars/sas.json +302 -0
  136. package/grammars/sass.json +618 -0
  137. package/grammars/scala.json +1313 -0
  138. package/grammars/scheme.json +384 -0
  139. package/grammars/scss.json +1874 -0
  140. package/grammars/shaderlab.json +199 -0
  141. package/grammars/shellscript.json +2025 -0
  142. package/grammars/shellsession.json +33 -0
  143. package/grammars/smalltalk.json +235 -0
  144. package/grammars/solidity.json +1210 -0
  145. package/grammars/sparql.json +45 -0
  146. package/grammars/splunk.json +91 -0
  147. package/grammars/sql.json +631 -0
  148. package/grammars/ssh-config.json +88 -0
  149. package/grammars/stata.json +3050 -0
  150. package/grammars/stylus.json +1208 -0
  151. package/grammars/svelte.json +1171 -0
  152. package/grammars/swift.json +4203 -0
  153. package/grammars/system-verilog.json +1063 -0
  154. package/grammars/tasl.json +292 -0
  155. package/grammars/tcl.json +291 -0
  156. package/grammars/tex.json +281 -0
  157. package/grammars/toml.json +431 -0
  158. package/grammars/tsx.json +5984 -0
  159. package/grammars/turtle.json +261 -0
  160. package/grammars/twig.json +1394 -0
  161. package/grammars/typescript.json +5735 -0
  162. package/grammars/v.json +1001 -0
  163. package/grammars/vb.json +232 -0
  164. package/grammars/verilog.json +305 -0
  165. package/grammars/vhdl.json +1484 -0
  166. package/grammars/viml.json +445 -0
  167. package/grammars/vue-html.json +559 -0
  168. package/grammars/vue.json +1237 -0
  169. package/grammars/vyper.json +5415 -0
  170. package/grammars/wasm.json +831 -0
  171. package/grammars/wenyan.json +129 -0
  172. package/grammars/wgsl.json +391 -0
  173. package/grammars/wolfram.json +2370 -0
  174. package/grammars/xml.json +382 -0
  175. package/grammars/xsl.json +89 -0
  176. package/grammars/yaml.json +616 -0
  177. package/grammars/zenscript.json +257 -0
  178. package/grammars/zig.json +312 -0
  179. package/index.d.ts +18 -0
  180. package/index.js +2165 -0
  181. package/package.json +46 -0
@@ -0,0 +1,3185 @@
1
+ {
2
+ "displayName": "D",
3
+ "fileTypes": [
4
+ "d",
5
+ "di",
6
+ "dpp"
7
+ ],
8
+ "name": "d",
9
+ "patterns": [
10
+ {
11
+ "include": "#comment"
12
+ },
13
+ {
14
+ "include": "#type"
15
+ },
16
+ {
17
+ "include": "#statement"
18
+ },
19
+ {
20
+ "include": "#expression"
21
+ }
22
+ ],
23
+ "repository": {
24
+ "aggregate-declaration": {
25
+ "patterns": [
26
+ {
27
+ "include": "#class-declaration"
28
+ },
29
+ {
30
+ "include": "#interface-declaration"
31
+ },
32
+ {
33
+ "include": "#struct-declaration"
34
+ },
35
+ {
36
+ "include": "#union-declaration"
37
+ },
38
+ {
39
+ "include": "#mixin-template-declaration"
40
+ },
41
+ {
42
+ "include": "#template-declaration"
43
+ }
44
+ ]
45
+ },
46
+ "alias-declaration": {
47
+ "patterns": [
48
+ {
49
+ "begin": "\\b(alias)\\b\\s*",
50
+ "beginCaptures": {
51
+ "1": {
52
+ "name": "keyword.other.alias.d"
53
+ }
54
+ },
55
+ "end": ";",
56
+ "endCaptures": {
57
+ "0": {
58
+ "name": "meta.alias.end.d"
59
+ }
60
+ },
61
+ "patterns": [
62
+ {
63
+ "include": "#type"
64
+ },
65
+ {
66
+ "match": "=(?![=>])",
67
+ "name": "keyword.operator.equal.alias.d"
68
+ },
69
+ {
70
+ "include": "#expression"
71
+ }
72
+ ]
73
+ }
74
+ ]
75
+ },
76
+ "align-attribute": {
77
+ "patterns": [
78
+ {
79
+ "begin": "\\balign\\s*\\(",
80
+ "end": "\\)",
81
+ "name": "storage.modifier.align-attribute.d",
82
+ "patterns": [
83
+ {
84
+ "include": "#integer-literal"
85
+ }
86
+ ]
87
+ },
88
+ {
89
+ "match": "\\balign\\b\\s*(?!\\()",
90
+ "name": "storage.modifier.align-attribute.d"
91
+ }
92
+ ]
93
+ },
94
+ "alternate-wysiwyg-string": {
95
+ "patterns": [
96
+ {
97
+ "begin": "`",
98
+ "end": "`[cwd]?",
99
+ "name": "string.alternate-wysiwyg-string.d",
100
+ "patterns": [
101
+ {
102
+ "include": "#wysiwyg-characters"
103
+ }
104
+ ]
105
+ }
106
+ ]
107
+ },
108
+ "arbitrary-delimited-string": {
109
+ "begin": "q\"(\\w+)",
110
+ "end": "\\1\"",
111
+ "name": "string.delimited.d",
112
+ "patterns": [
113
+ {
114
+ "match": ".",
115
+ "name": "string.delimited.d"
116
+ }
117
+ ]
118
+ },
119
+ "arithmetic-expression": {
120
+ "patterns": [
121
+ {
122
+ "match": "\\^\\^|\\+\\+|--|(?<!/)\\+(?!/)|-|~|(?<!/)\\*(?!/)|(?<![+*/])/(?![+*/])|%",
123
+ "name": "keyword.operator.numeric.d"
124
+ }
125
+ ]
126
+ },
127
+ "asm-instruction": {
128
+ "patterns": [
129
+ {
130
+ "include": "#comment"
131
+ },
132
+ {
133
+ "match": "\\b(align|even|naked|db|ds|di|dl|df|dd|de)\\b|:",
134
+ "name": "keyword.asm-instruction.d"
135
+ },
136
+ {
137
+ "match": "\\b__LOCAL_SIZE\\b",
138
+ "name": "constant.language.assembly.d"
139
+ },
140
+ {
141
+ "match": "\\b(offsetof|seg)\\b",
142
+ "name": "support.type.assembly.d"
143
+ },
144
+ {
145
+ "include": "#asm-type-prefix"
146
+ },
147
+ {
148
+ "include": "#asm-primary-expression"
149
+ },
150
+ {
151
+ "include": "#operands"
152
+ },
153
+ {
154
+ "include": "#register"
155
+ },
156
+ {
157
+ "include": "#register-64"
158
+ },
159
+ {
160
+ "include": "#float-literal"
161
+ },
162
+ {
163
+ "include": "#integer-literal"
164
+ },
165
+ {
166
+ "include": "#identifier"
167
+ }
168
+ ]
169
+ },
170
+ "asm-statement": {
171
+ "patterns": [
172
+ {
173
+ "begin": "\\b(asm)\\b\\s*(?=\\{)",
174
+ "captures": {
175
+ "1": {
176
+ "name": "keyword.control.switch.d"
177
+ }
178
+ },
179
+ "end": "(?<=\\})",
180
+ "patterns": [
181
+ {
182
+ "begin": "\\{",
183
+ "beginCaptures": {
184
+ "0": {
185
+ "name": "keyword.control.asm.begin.d"
186
+ }
187
+ },
188
+ "contentName": "gfm.markup.raw.assembly.d",
189
+ "end": "\\}",
190
+ "endCaptures": {
191
+ "0": {
192
+ "name": "keyword.control.asm.end.d"
193
+ }
194
+ },
195
+ "patterns": [
196
+ {
197
+ "include": "#asm-instruction"
198
+ }
199
+ ]
200
+ }
201
+ ]
202
+ }
203
+ ]
204
+ },
205
+ "asm-type-prefix": {
206
+ "patterns": [
207
+ {
208
+ "match": "\\b((near\\s+ptr)|(far\\s+ptr)|(byte\\s+ptr)|(short\\s+ptr)|(int\\s+ptr)|(word\\s+ptr)|(dword\\s+ptr)|(qword\\s+ptr)|(float\\s+ptr)|(double\\s+ptr)|(real\\s+ptr))\\b",
209
+ "name": "support.type.asm-type-prefix.d"
210
+ }
211
+ ]
212
+ },
213
+ "assert-expression": {
214
+ "patterns": [
215
+ {
216
+ "begin": "\\bassert\\s*\\(",
217
+ "beginCaptures": {
218
+ "0": {
219
+ "name": "keyword.other.assert.begin.d"
220
+ }
221
+ },
222
+ "end": "\\)",
223
+ "endCaptures": {
224
+ "0": {
225
+ "name": "keyword.other.assert.end.d"
226
+ }
227
+ },
228
+ "patterns": [
229
+ {
230
+ "include": "#comment"
231
+ },
232
+ {
233
+ "include": "#expression"
234
+ },
235
+ {
236
+ "include": "#comma"
237
+ }
238
+ ]
239
+ }
240
+ ]
241
+ },
242
+ "assign-expression": {
243
+ "patterns": [
244
+ {
245
+ "match": ">>>=|\\^\\^=|>>=|<<=|~=|\\^=|\\|=|&=|%=|/=|\\*=|-=|\\+=|=(?!>)",
246
+ "name": "keyword.operator.assign.d"
247
+ }
248
+ ]
249
+ },
250
+ "attribute": {
251
+ "patterns": [
252
+ {
253
+ "include": "#linkage-attribute"
254
+ },
255
+ {
256
+ "include": "#align-attribute"
257
+ },
258
+ {
259
+ "include": "#deprecated-attribute"
260
+ },
261
+ {
262
+ "include": "#protection-attribute"
263
+ },
264
+ {
265
+ "include": "#pragma"
266
+ },
267
+ {
268
+ "match": "\\b(static|extern|abstract|final|override|synchronized|auto|scope|const|immutable|inout|shared|__gshared|nothrow|pure|ref)\\b",
269
+ "name": "entity.other.attribute-name.d"
270
+ },
271
+ {
272
+ "include": "#property"
273
+ }
274
+ ]
275
+ },
276
+ "base-type": {
277
+ "patterns": [
278
+ {
279
+ "match": "\\b(auto|bool|byte|ubyte|short|ushort|int|uint|long|ulong|char|wchar|dchar|float|double|real|ifloat|idouble|ireal|cfloat|cdouble|creal|void|noreturn)\\b",
280
+ "name": "storage.type.basic-type.d"
281
+ },
282
+ {
283
+ "match": "\\b(string|wstring|dstring|size_t|ptrdiff_t)\\b(?!\\s*=)",
284
+ "name": "storage.type.basic-type.d"
285
+ }
286
+ ]
287
+ },
288
+ "binary-integer": {
289
+ "patterns": [
290
+ {
291
+ "match": "\\b(0b|0B)[0-1_]+(Lu|LU|uL|UL|L|u|U)?\\b",
292
+ "name": "constant.numeric.integer.binary.d"
293
+ }
294
+ ]
295
+ },
296
+ "bitwise-expression": {
297
+ "patterns": [
298
+ {
299
+ "match": "\\||\\^|&",
300
+ "name": "keyword.operator.bitwise.d"
301
+ }
302
+ ]
303
+ },
304
+ "block-comment": {
305
+ "patterns": [
306
+ {
307
+ "begin": "/((?!\\*/)\\*)+",
308
+ "beginCaptures": {
309
+ "0": {
310
+ "name": "comment.block.begin.d"
311
+ }
312
+ },
313
+ "end": "\\*+/",
314
+ "endCaptures": {
315
+ "0": {
316
+ "name": "comment.block.end.d"
317
+ }
318
+ },
319
+ "name": "comment.block.content.d"
320
+ }
321
+ ]
322
+ },
323
+ "break-statement": {
324
+ "patterns": [
325
+ {
326
+ "match": "\\bbreak\\b",
327
+ "name": "keyword.control.break.d"
328
+ }
329
+ ]
330
+ },
331
+ "case-statement": {
332
+ "patterns": [
333
+ {
334
+ "begin": "\\b(case)\\b\\s*",
335
+ "beginCaptures": {
336
+ "1": {
337
+ "name": "keyword.control.case.range.d"
338
+ }
339
+ },
340
+ "end": ":",
341
+ "endCaptures": {
342
+ "0": {
343
+ "name": "meta.case.end.d"
344
+ }
345
+ },
346
+ "patterns": [
347
+ {
348
+ "include": "#comment"
349
+ },
350
+ {
351
+ "include": "#expression"
352
+ },
353
+ {
354
+ "include": "#comma"
355
+ }
356
+ ]
357
+ }
358
+ ]
359
+ },
360
+ "cast-expression": {
361
+ "patterns": [
362
+ {
363
+ "begin": "\\b(cast)\\s*(\\()",
364
+ "beginCaptures": {
365
+ "1": {
366
+ "name": "keyword.operator.cast.d"
367
+ },
368
+ "2": {
369
+ "name": "keyword.operator.cast.begin.d"
370
+ }
371
+ },
372
+ "end": "\\)",
373
+ "endCaptures": {
374
+ "0": {
375
+ "name": "keyword.operator.cast.end.d"
376
+ }
377
+ },
378
+ "patterns": [
379
+ {
380
+ "include": "#type"
381
+ },
382
+ {
383
+ "include": "#extended-type"
384
+ }
385
+ ]
386
+ }
387
+ ]
388
+ },
389
+ "catch": {
390
+ "patterns": [
391
+ {
392
+ "begin": "\\b(catch)\\b\\s*(?=\\()",
393
+ "captures": {
394
+ "1": {
395
+ "name": "keyword.control.catch.d"
396
+ }
397
+ },
398
+ "end": "(?<=\\))",
399
+ "patterns": [
400
+ {
401
+ "begin": "\\(",
402
+ "end": "\\)",
403
+ "patterns": [
404
+ {
405
+ "include": "source.d"
406
+ }
407
+ ]
408
+ }
409
+ ]
410
+ }
411
+ ]
412
+ },
413
+ "catches": {
414
+ "patterns": [
415
+ {
416
+ "include": "#catch"
417
+ }
418
+ ]
419
+ },
420
+ "character": {
421
+ "patterns": [
422
+ {
423
+ "match": "[\\w\\s]+",
424
+ "name": "string.character.d"
425
+ }
426
+ ]
427
+ },
428
+ "character-literal": {
429
+ "patterns": [
430
+ {
431
+ "begin": "'",
432
+ "end": "'",
433
+ "name": "string.character-literal.d",
434
+ "patterns": [
435
+ {
436
+ "include": "#character"
437
+ },
438
+ {
439
+ "include": "#escape-sequence"
440
+ }
441
+ ]
442
+ }
443
+ ]
444
+ },
445
+ "class-declaration": {
446
+ "patterns": [
447
+ {
448
+ "captures": {
449
+ "1": {
450
+ "name": "storage.type.class.d"
451
+ },
452
+ "2": {
453
+ "name": "entity.name.class.d"
454
+ }
455
+ },
456
+ "match": "\\b(class)(?:\\s+([A-Za-z_][\\w_\\d]*))?\\b"
457
+ },
458
+ {
459
+ "include": "#protection-attribute"
460
+ },
461
+ {
462
+ "include": "#class-members"
463
+ }
464
+ ]
465
+ },
466
+ "class-members": {
467
+ "patterns": [
468
+ {
469
+ "include": "#shared-static-constructor"
470
+ },
471
+ {
472
+ "include": "#shared-static-destructor"
473
+ },
474
+ {
475
+ "include": "#constructor"
476
+ },
477
+ {
478
+ "include": "#destructor"
479
+ },
480
+ {
481
+ "include": "#postblit"
482
+ },
483
+ {
484
+ "include": "#invariant"
485
+ },
486
+ {
487
+ "include": "#member-function-attribute"
488
+ }
489
+ ]
490
+ },
491
+ "colon": {
492
+ "patterns": [
493
+ {
494
+ "match": ":",
495
+ "name": "support.type.colon.d"
496
+ }
497
+ ]
498
+ },
499
+ "comma": {
500
+ "patterns": [
501
+ {
502
+ "match": ",",
503
+ "name": "keyword.operator.comma.d"
504
+ }
505
+ ]
506
+ },
507
+ "comment": {
508
+ "patterns": [
509
+ {
510
+ "include": "#block-comment"
511
+ },
512
+ {
513
+ "include": "#line-comment"
514
+ },
515
+ {
516
+ "include": "#nesting-block-comment"
517
+ }
518
+ ]
519
+ },
520
+ "condition": {
521
+ "patterns": [
522
+ {
523
+ "include": "#version-condition"
524
+ },
525
+ {
526
+ "include": "#debug-condition"
527
+ },
528
+ {
529
+ "include": "#static-if-condition"
530
+ }
531
+ ]
532
+ },
533
+ "conditional-declaration": {
534
+ "patterns": [
535
+ {
536
+ "include": "#condition"
537
+ },
538
+ {
539
+ "match": "\\belse\\b",
540
+ "name": "keyword.control.else.d"
541
+ },
542
+ {
543
+ "include": "#colon"
544
+ },
545
+ {
546
+ "include": "#decl-defs"
547
+ }
548
+ ]
549
+ },
550
+ "conditional-expression": {
551
+ "patterns": [
552
+ {
553
+ "match": "\\s(\\?|:)\\s",
554
+ "name": "keyword.operator.ternary.d"
555
+ }
556
+ ]
557
+ },
558
+ "conditional-statement": {
559
+ "patterns": [
560
+ {
561
+ "include": "#condition"
562
+ },
563
+ {
564
+ "include": "#no-scope-non-empty-statement"
565
+ },
566
+ {
567
+ "match": "\\belse\\b",
568
+ "name": "keyword.control.else.d"
569
+ }
570
+ ]
571
+ },
572
+ "constructor": {
573
+ "patterns": [
574
+ {
575
+ "match": "\\bthis\\b",
576
+ "name": "entity.name.function.constructor.d"
577
+ }
578
+ ]
579
+ },
580
+ "continue-statement": {
581
+ "patterns": [
582
+ {
583
+ "match": "\\bcontinue\\b",
584
+ "name": "keyword.control.continue.d"
585
+ }
586
+ ]
587
+ },
588
+ "debug-condition": {
589
+ "patterns": [
590
+ {
591
+ "begin": "\\bdebug\\s*\\(",
592
+ "beginCaptures": {
593
+ "0": {
594
+ "name": "keyword.other.debug.identifier.begin.d"
595
+ }
596
+ },
597
+ "end": "\\)",
598
+ "endCaptures": {
599
+ "0": {
600
+ "name": "keyword.other.debug.identifier.end.d"
601
+ }
602
+ },
603
+ "patterns": [
604
+ {
605
+ "include": "#integer-literal"
606
+ },
607
+ {
608
+ "include": "#identifier"
609
+ }
610
+ ]
611
+ },
612
+ {
613
+ "match": "\\bdebug\\b\\s*(?!\\()",
614
+ "name": "keyword.other.debug.plain.d"
615
+ }
616
+ ]
617
+ },
618
+ "debug-specification": {
619
+ "patterns": [
620
+ {
621
+ "match": "\\bdebug\\b\\s*(?==)",
622
+ "name": "keyword.other.debug-specification.d"
623
+ }
624
+ ]
625
+ },
626
+ "decimal-float": {
627
+ "patterns": [
628
+ {
629
+ "match": "\\b((\\.[0-9])|(0\\.)|(([1-9]|(0[1-9_]))[0-9_]*\\.))[0-9_]*((e-|E-|e\\+|E\\+|e|E)[0-9][0-9_]*)?[LfF]?i?\\b",
630
+ "name": "constant.numeric.float.decimal.d"
631
+ }
632
+ ]
633
+ },
634
+ "decimal-integer": {
635
+ "patterns": [
636
+ {
637
+ "match": "\\b(0(?=[^\\dxXbB]))|([1-9][0-9_]*)(Lu|LU|uL|UL|L|u|U)?\\b",
638
+ "name": "constant.numeric.integer.decimal.d"
639
+ }
640
+ ]
641
+ },
642
+ "declaration": {
643
+ "patterns": [
644
+ {
645
+ "include": "#alias-declaration"
646
+ },
647
+ {
648
+ "include": "#aggregate-declaration"
649
+ },
650
+ {
651
+ "include": "#enum-declaration"
652
+ },
653
+ {
654
+ "include": "#import-declaration"
655
+ },
656
+ {
657
+ "include": "#storage-class"
658
+ },
659
+ {
660
+ "include": "#void-initializer"
661
+ },
662
+ {
663
+ "include": "#mixin-declaration"
664
+ }
665
+ ]
666
+ },
667
+ "declaration-statement": {
668
+ "patterns": [
669
+ {
670
+ "include": "#declaration"
671
+ }
672
+ ]
673
+ },
674
+ "default-statement": {
675
+ "patterns": [
676
+ {
677
+ "captures": {
678
+ "1": {
679
+ "name": "keyword.control.case.default.d"
680
+ },
681
+ "2": {
682
+ "name": "meta.default.colon.d"
683
+ }
684
+ },
685
+ "match": "\\b(default)\\s*(:)"
686
+ }
687
+ ]
688
+ },
689
+ "delete-expression": {
690
+ "patterns": [
691
+ {
692
+ "match": "\\bdelete\\s+",
693
+ "name": "keyword.other.delete.d"
694
+ }
695
+ ]
696
+ },
697
+ "delimited-string": {
698
+ "begin": "q\"",
699
+ "end": "\"",
700
+ "name": "string.delimited.d",
701
+ "patterns": [
702
+ {
703
+ "include": "#delimited-string-bracket"
704
+ },
705
+ {
706
+ "include": "#delimited-string-parens"
707
+ },
708
+ {
709
+ "include": "#delimited-string-angle-brackets"
710
+ },
711
+ {
712
+ "include": "#delimited-string-braces"
713
+ }
714
+ ]
715
+ },
716
+ "delimited-string-angle-brackets": {
717
+ "patterns": [
718
+ {
719
+ "begin": "<",
720
+ "end": ">",
721
+ "name": "constant.character.angle-brackets.d",
722
+ "patterns": [
723
+ {
724
+ "include": "#wysiwyg-characters"
725
+ }
726
+ ]
727
+ }
728
+ ]
729
+ },
730
+ "delimited-string-braces": {
731
+ "patterns": [
732
+ {
733
+ "begin": "\\{",
734
+ "end": "\\}",
735
+ "name": "constant.character.delimited.braces.d",
736
+ "patterns": [
737
+ {
738
+ "include": "#wysiwyg-characters"
739
+ }
740
+ ]
741
+ }
742
+ ]
743
+ },
744
+ "delimited-string-bracket": {
745
+ "patterns": [
746
+ {
747
+ "begin": "\\[",
748
+ "end": "\\]",
749
+ "name": "constant.characters.delimited.brackets.d",
750
+ "patterns": [
751
+ {
752
+ "include": "#wysiwyg-characters"
753
+ }
754
+ ]
755
+ }
756
+ ]
757
+ },
758
+ "delimited-string-parens": {
759
+ "patterns": [
760
+ {
761
+ "begin": "\\(",
762
+ "end": "\\)",
763
+ "name": "constant.character.delimited.parens.d",
764
+ "patterns": [
765
+ {
766
+ "include": "#wysiwyg-characters"
767
+ }
768
+ ]
769
+ }
770
+ ]
771
+ },
772
+ "deprecated-statement": {
773
+ "patterns": [
774
+ {
775
+ "begin": "\\bdeprecated\\s*\\(",
776
+ "beginCaptures": {
777
+ "0": {
778
+ "name": "keyword.other.deprecated.begin.d"
779
+ }
780
+ },
781
+ "end": "\\)",
782
+ "endCaptures": {
783
+ "0": {
784
+ "name": "keyword.other.deprecated.end.d"
785
+ }
786
+ },
787
+ "patterns": [
788
+ {
789
+ "include": "#comment"
790
+ },
791
+ {
792
+ "include": "#expression"
793
+ },
794
+ {
795
+ "include": "#comma"
796
+ }
797
+ ]
798
+ },
799
+ {
800
+ "match": "\\bdeprecated\\b\\s*(?!\\()",
801
+ "name": "keyword.other.deprecated.plain.d"
802
+ }
803
+ ]
804
+ },
805
+ "destructor": {
806
+ "patterns": [
807
+ {
808
+ "match": "\\b~this\\s*\\(\\s*\\)",
809
+ "name": "entity.name.class.destructor.d"
810
+ }
811
+ ]
812
+ },
813
+ "do-statement": {
814
+ "patterns": [
815
+ {
816
+ "match": "\\bdo\\b",
817
+ "name": "keyword.control.do.d"
818
+ }
819
+ ]
820
+ },
821
+ "double-quoted-characters": {
822
+ "patterns": [
823
+ {
824
+ "include": "#character"
825
+ },
826
+ {
827
+ "include": "#end-of-line"
828
+ },
829
+ {
830
+ "include": "#escape-sequence"
831
+ }
832
+ ]
833
+ },
834
+ "double-quoted-string": {
835
+ "patterns": [
836
+ {
837
+ "begin": "\"",
838
+ "end": "\"[cwd]?",
839
+ "name": "string.double-quoted-string.d",
840
+ "patterns": [
841
+ {
842
+ "include": "#double-quoted-characters"
843
+ }
844
+ ]
845
+ }
846
+ ]
847
+ },
848
+ "end-of-line": {
849
+ "patterns": [
850
+ {
851
+ "match": "\\n+",
852
+ "name": "string.character.end-of-line.d"
853
+ }
854
+ ]
855
+ },
856
+ "enum-declaration": {
857
+ "patterns": [
858
+ {
859
+ "begin": "\\b(enum)\\b\\s+(?=.*[=;])",
860
+ "beginCaptures": {
861
+ "1": {
862
+ "name": "storage.type.enum.d"
863
+ }
864
+ },
865
+ "end": "([A-Za-z_][\\w_\\d]*)\\s*(?=;|=|\\()(;)?",
866
+ "endCaptures": {
867
+ "1": {
868
+ "name": "entity.name.type.enum.d"
869
+ },
870
+ "2": {
871
+ "name": "meta.enum.end.d"
872
+ }
873
+ },
874
+ "patterns": [
875
+ {
876
+ "include": "#type"
877
+ },
878
+ {
879
+ "include": "#extended-type"
880
+ },
881
+ {
882
+ "match": "=(?![=>])",
883
+ "name": "keyword.operator.equal.alias.d"
884
+ }
885
+ ]
886
+ }
887
+ ]
888
+ },
889
+ "eof": {
890
+ "patterns": [
891
+ {
892
+ "begin": "__EOF__",
893
+ "beginCaptures": {
894
+ "0": {
895
+ "name": "comment.block.documentation.eof.start.d"
896
+ }
897
+ },
898
+ "end": "(?!__NEVER_MATCH__)__NEVER_MATCH__",
899
+ "name": "text.eof.d"
900
+ }
901
+ ]
902
+ },
903
+ "equal": {
904
+ "patterns": [
905
+ {
906
+ "match": "=(?![=>])",
907
+ "name": "keyword.operator.equal.d"
908
+ }
909
+ ]
910
+ },
911
+ "escape-sequence": {
912
+ "patterns": [
913
+ {
914
+ "match": "(\\\\(?:quot|amp|lt|gt|OElig|oelig|Scaron|scaron|Yuml|circ|tilde|ensp|emsp|thinsp|zwnj|zwj|lrm|rlm|ndash|mdash|lsquo|rsquo|sbquo|ldquo|rdquo|bdquo|dagger|Dagger|permil|lsaquo|rsaquo|euro|nbsp|iexcl|cent|pound|curren|yen|brvbar|sect|uml|copy|ordf|laquo|not|shy|reg|macr|deg|plusmn|sup2|sup3|acute|micro|para|middot|cedil|sup1|ordm|raquo|frac14|frac12|frac34|iquest|Agrave|Aacute|Acirc|Atilde|Auml|Aring|Aelig|Ccedil|egrave|eacute|ecirc|iuml|eth|ntilde|ograve|oacute|ocirc|otilde|ouml|divide|oslash|ugrave|uacute|ucirc|uuml|yacute|thorn|yuml|fnof|Alpha|Beta|Gamma|Delta|Epsilon|Zeta|Eta|Theta|Iota|Kappa|Lambda|Mu|Nu|Xi|Omicron|Pi|Rho|Sigma|Tau|Upsilon|Phi|Chi|Psi|Omega|alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigmaf|sigma|tau|upsilon|phi|chi|psi|omega|thetasym|upsih|piv|bull|hellip|prime|Prime|oline|frasl|weierp|image|real|trade|alefsym|larr|uarr|rarr|darr|harr|crarr|lArr|uArr|rArr|dArr|hArr|forall|part|exist|empty|nabla|isin|notin|ni|prod|sum|minux|lowast|radic|prop|infin|ang|and|or|cap|cup|int|there4|sim|cong|asymp|ne|equiv|le|ge|sub|sup|nsub|sube|supe|oplus|otimes|perp|sdot|lceil|rceil|lfloor|rfloor|loz|spades|clubs|hearts|diams|lang|rang))",
915
+ "name": "constant.character.escape-sequence.entity.d"
916
+ },
917
+ {
918
+ "match": "(\\\\x[0-9a-fA-F_]{2}|\\\\u[0-9a-fA-F_]{4}|\\\\U[0-9a-fA-F_]{8}|\\\\[0-7]{1,3})",
919
+ "name": "constant.character.escape-sequence.number.d"
920
+ },
921
+ {
922
+ "match": "(\\\\t|\\\\'|\\\\\"|\\\\\\?|\\\\0|\\\\a|\\\\b|\\\\f|\\\\n|\\\\r|\\\\v|\\\\\\\\)",
923
+ "name": "constant.character.escape-sequence.d"
924
+ }
925
+ ]
926
+ },
927
+ "expression": {
928
+ "patterns": [
929
+ {
930
+ "include": "#index-expression"
931
+ },
932
+ {
933
+ "include": "#expression-no-index"
934
+ }
935
+ ]
936
+ },
937
+ "expression-no-index": {
938
+ "patterns": [
939
+ {
940
+ "include": "#function-literal"
941
+ },
942
+ {
943
+ "include": "#assert-expression"
944
+ },
945
+ {
946
+ "include": "#assign-expression"
947
+ },
948
+ {
949
+ "include": "#mixin-expression"
950
+ },
951
+ {
952
+ "include": "#import-expression"
953
+ },
954
+ {
955
+ "include": "#traits-expression"
956
+ },
957
+ {
958
+ "include": "#is-expression"
959
+ },
960
+ {
961
+ "include": "#typeid-expression"
962
+ },
963
+ {
964
+ "include": "#shift-expression"
965
+ },
966
+ {
967
+ "include": "#logical-expression"
968
+ },
969
+ {
970
+ "include": "#rel-expression"
971
+ },
972
+ {
973
+ "include": "#bitwise-expression"
974
+ },
975
+ {
976
+ "include": "#identity-expression"
977
+ },
978
+ {
979
+ "include": "#in-expression"
980
+ },
981
+ {
982
+ "include": "#conditional-expression"
983
+ },
984
+ {
985
+ "include": "#arithmetic-expression"
986
+ },
987
+ {
988
+ "include": "#new-expression"
989
+ },
990
+ {
991
+ "include": "#delete-expression"
992
+ },
993
+ {
994
+ "include": "#cast-expression"
995
+ },
996
+ {
997
+ "include": "#type-specialization"
998
+ },
999
+ {
1000
+ "include": "#comma"
1001
+ },
1002
+ {
1003
+ "include": "#special-keyword"
1004
+ },
1005
+ {
1006
+ "include": "#functions"
1007
+ },
1008
+ {
1009
+ "include": "#type"
1010
+ },
1011
+ {
1012
+ "include": "#parentheses-expression"
1013
+ },
1014
+ {
1015
+ "include": "#lexical"
1016
+ }
1017
+ ]
1018
+ },
1019
+ "extended-type": {
1020
+ "patterns": [
1021
+ {
1022
+ "match": "\\b((\\.\\s*)?[_\\w][_\\d\\w]*)(\\s*\\.\\s*[_\\w][_\\d\\w]*)*\\b",
1023
+ "name": "entity.name.type.d"
1024
+ },
1025
+ {
1026
+ "begin": "\\[",
1027
+ "beginCaptures": {
1028
+ "0": {
1029
+ "name": "storage.type.array.expression.begin.d"
1030
+ }
1031
+ },
1032
+ "end": "\\]",
1033
+ "endCaptures": {
1034
+ "0": {
1035
+ "name": "storage.type.array.expression.end.d"
1036
+ }
1037
+ },
1038
+ "patterns": [
1039
+ {
1040
+ "match": "\\.\\.|\\$",
1041
+ "name": "keyword.operator.slice.d"
1042
+ },
1043
+ {
1044
+ "include": "#type"
1045
+ },
1046
+ {
1047
+ "include": "#expression"
1048
+ }
1049
+ ]
1050
+ }
1051
+ ]
1052
+ },
1053
+ "final-switch-statement": {
1054
+ "patterns": [
1055
+ {
1056
+ "begin": "\\b(final\\s+switch)\\b\\s*",
1057
+ "captures": {
1058
+ "1": {
1059
+ "name": "keyword.control.final.switch.d"
1060
+ }
1061
+ },
1062
+ "end": "(?<=\\))",
1063
+ "patterns": [
1064
+ {
1065
+ "begin": "\\(",
1066
+ "end": "\\)",
1067
+ "patterns": [
1068
+ {
1069
+ "include": "source.d"
1070
+ }
1071
+ ]
1072
+ }
1073
+ ]
1074
+ }
1075
+ ]
1076
+ },
1077
+ "finally-statement": {
1078
+ "patterns": [
1079
+ {
1080
+ "match": "\\bfinally\\b",
1081
+ "name": "keyword.control.throw.d"
1082
+ }
1083
+ ]
1084
+ },
1085
+ "float-literal": {
1086
+ "patterns": [
1087
+ {
1088
+ "include": "#decimal-float"
1089
+ },
1090
+ {
1091
+ "include": "#hexadecimal-float"
1092
+ }
1093
+ ]
1094
+ },
1095
+ "for-statement": {
1096
+ "patterns": [
1097
+ {
1098
+ "begin": "\\b(for)\\b\\s*",
1099
+ "captures": {
1100
+ "1": {
1101
+ "name": "keyword.control.for.d"
1102
+ }
1103
+ },
1104
+ "end": "(?<=\\))",
1105
+ "patterns": [
1106
+ {
1107
+ "begin": "\\(",
1108
+ "end": "\\)",
1109
+ "patterns": [
1110
+ {
1111
+ "include": "source.d"
1112
+ }
1113
+ ]
1114
+ }
1115
+ ]
1116
+ }
1117
+ ]
1118
+ },
1119
+ "foreach-reverse-statement": {
1120
+ "patterns": [
1121
+ {
1122
+ "begin": "\\b(foreach_reverse)\\b\\s*",
1123
+ "captures": {
1124
+ "1": {
1125
+ "name": "keyword.control.foreach_reverse.d"
1126
+ }
1127
+ },
1128
+ "end": "(?<=\\))",
1129
+ "patterns": [
1130
+ {
1131
+ "begin": "\\(",
1132
+ "end": "\\)",
1133
+ "patterns": [
1134
+ {
1135
+ "match": ";",
1136
+ "name": "keyword.operator.semi-colon.d"
1137
+ },
1138
+ {
1139
+ "include": "source.d"
1140
+ }
1141
+ ]
1142
+ }
1143
+ ]
1144
+ }
1145
+ ]
1146
+ },
1147
+ "foreach-statement": {
1148
+ "patterns": [
1149
+ {
1150
+ "begin": "\\b(foreach)\\b\\s*",
1151
+ "captures": {
1152
+ "1": {
1153
+ "name": "keyword.control.foreach.d"
1154
+ }
1155
+ },
1156
+ "end": "(?<=\\))",
1157
+ "patterns": [
1158
+ {
1159
+ "begin": "\\(",
1160
+ "end": "\\)",
1161
+ "patterns": [
1162
+ {
1163
+ "match": ";",
1164
+ "name": "keyword.operator.semi-colon.d"
1165
+ },
1166
+ {
1167
+ "include": "source.d"
1168
+ }
1169
+ ]
1170
+ }
1171
+ ]
1172
+ }
1173
+ ]
1174
+ },
1175
+ "function-attribute": {
1176
+ "patterns": [
1177
+ {
1178
+ "match": "\\b(nothrow|pure)\\b",
1179
+ "name": "storage.type.modifier.function-attribute.d"
1180
+ },
1181
+ {
1182
+ "include": "#property"
1183
+ }
1184
+ ]
1185
+ },
1186
+ "function-body": {
1187
+ "patterns": [
1188
+ {
1189
+ "include": "#in-statement"
1190
+ },
1191
+ {
1192
+ "include": "#out-statement"
1193
+ },
1194
+ {
1195
+ "include": "#block-statement"
1196
+ }
1197
+ ]
1198
+ },
1199
+ "function-literal": {
1200
+ "patterns": [
1201
+ {
1202
+ "match": "=>",
1203
+ "name": "keyword.operator.lambda.d"
1204
+ },
1205
+ {
1206
+ "match": "\\b(function|delegate)\\b",
1207
+ "name": "keyword.other.function-literal.d"
1208
+ },
1209
+ {
1210
+ "begin": "\\b([_\\w][_\\d\\w]*)\\s*(=>)",
1211
+ "beginCaptures": {
1212
+ "1": {
1213
+ "name": "variable.parameter.d"
1214
+ },
1215
+ "2": {
1216
+ "name": "meta.lexical.token.symbolic.d"
1217
+ }
1218
+ },
1219
+ "end": "(?=[\\);,\\]}])",
1220
+ "patterns": [
1221
+ {
1222
+ "include": "source.d"
1223
+ }
1224
+ ]
1225
+ },
1226
+ {
1227
+ "begin": "(?<=\\)|\\()(\\s*)({)",
1228
+ "beginCaptures": {
1229
+ "1": {
1230
+ "name": "source.d"
1231
+ },
1232
+ "2": {
1233
+ "name": "source.d"
1234
+ }
1235
+ },
1236
+ "end": "}",
1237
+ "patterns": [
1238
+ {
1239
+ "include": "source.d"
1240
+ }
1241
+ ]
1242
+ }
1243
+ ]
1244
+ },
1245
+ "function-prelude": {
1246
+ "patterns": [
1247
+ {
1248
+ "match": "(?!typeof|typeid)((\\.\\s*)?[_\\w][_\\d\\w]*)(\\s*\\.\\s*[_\\w][_\\d\\w]*)*\\s*(?=\\()",
1249
+ "name": "entity.name.function.d"
1250
+ }
1251
+ ]
1252
+ },
1253
+ "functions": {
1254
+ "patterns": [
1255
+ {
1256
+ "include": "#function-attribute"
1257
+ },
1258
+ {
1259
+ "include": "#function-prelude"
1260
+ }
1261
+ ]
1262
+ },
1263
+ "goto-statement": {
1264
+ "patterns": [
1265
+ {
1266
+ "match": "\\bgoto\\s+default\\b",
1267
+ "name": "keyword.control.goto.d"
1268
+ },
1269
+ {
1270
+ "match": "\\bgoto\\s+case\\b",
1271
+ "name": "keyword.control.goto.d"
1272
+ },
1273
+ {
1274
+ "match": "\\bgoto\\b",
1275
+ "name": "keyword.control.goto.d"
1276
+ }
1277
+ ]
1278
+ },
1279
+ "hex-string": {
1280
+ "patterns": [
1281
+ {
1282
+ "begin": "x\"",
1283
+ "end": "\"[cwd]?",
1284
+ "name": "string.hex-string.d",
1285
+ "patterns": [
1286
+ {
1287
+ "match": "[a-fA-F0-9_s]+",
1288
+ "name": "constant.character.hex-string.d"
1289
+ }
1290
+ ]
1291
+ }
1292
+ ]
1293
+ },
1294
+ "hexadecimal-float": {
1295
+ "patterns": [
1296
+ {
1297
+ "match": "\\b0[xX][0-9a-fA-F_]*(\\.[0-9a-fA-F_]*)?(p-|P-|p\\+|P\\+|p|P)[0-9][0-9_]*[LfF]?i?\\b",
1298
+ "name": "constant.numeric.float.hexadecimal.d"
1299
+ }
1300
+ ]
1301
+ },
1302
+ "hexadecimal-integer": {
1303
+ "patterns": [
1304
+ {
1305
+ "match": "\\b(0x|0X)([0-9a-fA-F][0-9a-fA-F_]*)(Lu|LU|uL|UL|L|u|U)?\\b",
1306
+ "name": "constant.numeric.integer.hexadecimal.d"
1307
+ }
1308
+ ]
1309
+ },
1310
+ "identifier": {
1311
+ "patterns": [
1312
+ {
1313
+ "match": "\\b((\\.\\s*)?[_\\w][_\\d\\w]*)(\\s*\\.\\s*[_\\w][_\\d\\w]*)*\\b",
1314
+ "name": "variable.d"
1315
+ }
1316
+ ]
1317
+ },
1318
+ "identifier-list": {
1319
+ "patterns": [
1320
+ {
1321
+ "match": ",",
1322
+ "name": "keyword.other.comma.d"
1323
+ },
1324
+ {
1325
+ "include": "#identifier"
1326
+ }
1327
+ ]
1328
+ },
1329
+ "identity-expression": {
1330
+ "patterns": [
1331
+ {
1332
+ "match": "\\b(is|!is)\\b",
1333
+ "name": "keyword.operator.identity.d"
1334
+ }
1335
+ ]
1336
+ },
1337
+ "if-statement": {
1338
+ "patterns": [
1339
+ {
1340
+ "begin": "\\b(if)\\b\\s*",
1341
+ "captures": {
1342
+ "1": {
1343
+ "name": "keyword.control.if.d"
1344
+ }
1345
+ },
1346
+ "end": "(?<=\\))",
1347
+ "patterns": [
1348
+ {
1349
+ "begin": "\\(",
1350
+ "end": "\\)",
1351
+ "patterns": [
1352
+ {
1353
+ "include": "source.d"
1354
+ }
1355
+ ]
1356
+ }
1357
+ ]
1358
+ },
1359
+ {
1360
+ "match": "\\belse\\b\\s*",
1361
+ "name": "keyword.control.else.d"
1362
+ }
1363
+ ]
1364
+ },
1365
+ "import-declaration": {
1366
+ "patterns": [
1367
+ {
1368
+ "begin": "\\b(static\\s+)?(import)\\s+(?!\\()",
1369
+ "beginCaptures": {
1370
+ "1": {
1371
+ "name": "keyword.package.import.d"
1372
+ },
1373
+ "2": {
1374
+ "name": "keyword.package.import.d"
1375
+ }
1376
+ },
1377
+ "end": ";",
1378
+ "endCaptures": {
1379
+ "0": {
1380
+ "name": "meta.import.end.d"
1381
+ }
1382
+ },
1383
+ "patterns": [
1384
+ {
1385
+ "include": "#import-identifier"
1386
+ },
1387
+ {
1388
+ "include": "#comma"
1389
+ },
1390
+ {
1391
+ "include": "#comment"
1392
+ }
1393
+ ]
1394
+ }
1395
+ ]
1396
+ },
1397
+ "import-expression": {
1398
+ "patterns": [
1399
+ {
1400
+ "begin": "\\b(import)\\s*(\\()",
1401
+ "beginCaptures": {
1402
+ "1": {
1403
+ "name": "keyword.other.import.d"
1404
+ },
1405
+ "2": {
1406
+ "name": "keyword.other.import.begin.d"
1407
+ }
1408
+ },
1409
+ "end": "\\)",
1410
+ "endCaptures": {
1411
+ "0": {
1412
+ "name": "keyword.other.import.end.d"
1413
+ }
1414
+ },
1415
+ "patterns": [
1416
+ {
1417
+ "include": "#comment"
1418
+ },
1419
+ {
1420
+ "include": "#expression"
1421
+ },
1422
+ {
1423
+ "include": "#comma"
1424
+ }
1425
+ ]
1426
+ }
1427
+ ]
1428
+ },
1429
+ "import-identifier": {
1430
+ "patterns": [
1431
+ {
1432
+ "match": "([_a-zA-Z][_\\d\\w]*)(\\s*\\.\\s*[_a-zA-Z][_\\d\\w]*)*",
1433
+ "name": "variable.parameter.import.d"
1434
+ }
1435
+ ]
1436
+ },
1437
+ "in-expression": {
1438
+ "patterns": [
1439
+ {
1440
+ "match": "\\b(in|!in)\\b",
1441
+ "name": "keyword.operator.in.d"
1442
+ }
1443
+ ]
1444
+ },
1445
+ "in-statement": {
1446
+ "patterns": [
1447
+ {
1448
+ "match": "\\bin\\b",
1449
+ "name": "keyword.control.in.d"
1450
+ }
1451
+ ]
1452
+ },
1453
+ "index-expression": {
1454
+ "patterns": [
1455
+ {
1456
+ "begin": "\\[",
1457
+ "end": "\\]",
1458
+ "patterns": [
1459
+ {
1460
+ "match": "\\.\\.|\\$",
1461
+ "name": "keyword.operator.slice.d"
1462
+ },
1463
+ {
1464
+ "include": "#expression-no-index"
1465
+ }
1466
+ ]
1467
+ }
1468
+ ]
1469
+ },
1470
+ "integer-literal": {
1471
+ "patterns": [
1472
+ {
1473
+ "include": "#decimal-integer"
1474
+ },
1475
+ {
1476
+ "include": "#binary-integer"
1477
+ },
1478
+ {
1479
+ "include": "#hexadecimal-integer"
1480
+ }
1481
+ ]
1482
+ },
1483
+ "interface-declaration": {
1484
+ "patterns": [
1485
+ {
1486
+ "captures": {
1487
+ "1": {
1488
+ "name": "storage.type.interface.d"
1489
+ },
1490
+ "2": {
1491
+ "name": "entity.name.type.interface.d"
1492
+ }
1493
+ },
1494
+ "match": "\\b(interface)(?:\\s+([A-Za-z_][\\w_\\d]*))?\\b"
1495
+ }
1496
+ ]
1497
+ },
1498
+ "invariant": {
1499
+ "patterns": [
1500
+ {
1501
+ "match": "\\binvariant\\s*\\(\\s*\\)",
1502
+ "name": "entity.name.class.invariant.d"
1503
+ }
1504
+ ]
1505
+ },
1506
+ "is-expression": {
1507
+ "patterns": [
1508
+ {
1509
+ "begin": "\\bis\\s*\\(",
1510
+ "beginCaptures": {
1511
+ "0": {
1512
+ "name": "keyword.token.is.begin.d"
1513
+ }
1514
+ },
1515
+ "end": "\\)",
1516
+ "endCaptures": {
1517
+ "0": {
1518
+ "name": "keyword.token.is.end.d"
1519
+ }
1520
+ },
1521
+ "patterns": [
1522
+ {
1523
+ "include": "#comment"
1524
+ },
1525
+ {
1526
+ "include": "#expression"
1527
+ },
1528
+ {
1529
+ "include": "#comma"
1530
+ }
1531
+ ]
1532
+ }
1533
+ ]
1534
+ },
1535
+ "keyword": {
1536
+ "patterns": [
1537
+ {
1538
+ "match": "\\babstract\\b",
1539
+ "name": "keyword.token.abstract.d"
1540
+ },
1541
+ {
1542
+ "match": "\\balias\\b",
1543
+ "name": "keyword.token.alias.d"
1544
+ },
1545
+ {
1546
+ "match": "\\balign\\b",
1547
+ "name": "keyword.token.align.d"
1548
+ },
1549
+ {
1550
+ "match": "\\basm\\b",
1551
+ "name": "keyword.token.asm.d"
1552
+ },
1553
+ {
1554
+ "match": "\\bassert\\b",
1555
+ "name": "keyword.token.assert.d"
1556
+ },
1557
+ {
1558
+ "match": "\\bauto\\b",
1559
+ "name": "keyword.token.auto.d"
1560
+ },
1561
+ {
1562
+ "match": "\\bbool\\b",
1563
+ "name": "keyword.token.bool.d"
1564
+ },
1565
+ {
1566
+ "match": "\\bbreak\\b",
1567
+ "name": "keyword.token.break.d"
1568
+ },
1569
+ {
1570
+ "match": "\\bbyte\\b",
1571
+ "name": "keyword.token.byte.d"
1572
+ },
1573
+ {
1574
+ "match": "\\bcase\\b",
1575
+ "name": "keyword.token.case.d"
1576
+ },
1577
+ {
1578
+ "match": "\\bcast\\b",
1579
+ "name": "keyword.token.cast.d"
1580
+ },
1581
+ {
1582
+ "match": "\\bcatch\\b",
1583
+ "name": "keyword.token.catch.d"
1584
+ },
1585
+ {
1586
+ "match": "\\bcdouble\\b",
1587
+ "name": "keyword.token.cdouble.d"
1588
+ },
1589
+ {
1590
+ "match": "\\bcent\\b",
1591
+ "name": "keyword.token.cent.d"
1592
+ },
1593
+ {
1594
+ "match": "\\bcfloat\\b",
1595
+ "name": "keyword.token.cfloat.d"
1596
+ },
1597
+ {
1598
+ "match": "\\bchar\\b",
1599
+ "name": "keyword.token.char.d"
1600
+ },
1601
+ {
1602
+ "match": "\\bclass\\b",
1603
+ "name": "keyword.token.class.d"
1604
+ },
1605
+ {
1606
+ "match": "\\bconst\\b",
1607
+ "name": "keyword.token.const.d"
1608
+ },
1609
+ {
1610
+ "match": "\\bcontinue\\b",
1611
+ "name": "keyword.token.continue.d"
1612
+ },
1613
+ {
1614
+ "match": "\\bcreal\\b",
1615
+ "name": "keyword.token.creal.d"
1616
+ },
1617
+ {
1618
+ "match": "\\bdchar\\b",
1619
+ "name": "keyword.token.dchar.d"
1620
+ },
1621
+ {
1622
+ "match": "\\bdebug\\b",
1623
+ "name": "keyword.token.debug.d"
1624
+ },
1625
+ {
1626
+ "match": "\\bdefault\\b",
1627
+ "name": "keyword.token.default.d"
1628
+ },
1629
+ {
1630
+ "match": "\\bdelegate\\b",
1631
+ "name": "keyword.token.delegate.d"
1632
+ },
1633
+ {
1634
+ "match": "\\bdelete\\b",
1635
+ "name": "keyword.token.delete.d"
1636
+ },
1637
+ {
1638
+ "match": "\\bdeprecated\\b",
1639
+ "name": "keyword.token.deprecated.d"
1640
+ },
1641
+ {
1642
+ "match": "\\bdo\\b",
1643
+ "name": "keyword.token.do.d"
1644
+ },
1645
+ {
1646
+ "match": "\\bdouble\\b",
1647
+ "name": "keyword.token.double.d"
1648
+ },
1649
+ {
1650
+ "match": "\\belse\\b",
1651
+ "name": "keyword.token.else.d"
1652
+ },
1653
+ {
1654
+ "match": "\\benum\\b",
1655
+ "name": "keyword.token.enum.d"
1656
+ },
1657
+ {
1658
+ "match": "\\bexport\\b",
1659
+ "name": "keyword.token.export.d"
1660
+ },
1661
+ {
1662
+ "match": "\\bextern\\b",
1663
+ "name": "keyword.token.extern.d"
1664
+ },
1665
+ {
1666
+ "match": "\\bfalse\\b",
1667
+ "name": "constant.language.boolean.false.d"
1668
+ },
1669
+ {
1670
+ "match": "\\bfinal\\b",
1671
+ "name": "keyword.token.final.d"
1672
+ },
1673
+ {
1674
+ "match": "\\bfinally\\b",
1675
+ "name": "keyword.token.finally.d"
1676
+ },
1677
+ {
1678
+ "match": "\\bfloat\\b",
1679
+ "name": "keyword.token.float.d"
1680
+ },
1681
+ {
1682
+ "match": "\\bfor\\b",
1683
+ "name": "keyword.token.for.d"
1684
+ },
1685
+ {
1686
+ "match": "\\bforeach\\b",
1687
+ "name": "keyword.token.foreach.d"
1688
+ },
1689
+ {
1690
+ "match": "\\bforeach_reverse\\b",
1691
+ "name": "keyword.token.foreach_reverse.d"
1692
+ },
1693
+ {
1694
+ "match": "\\bfunction\\b",
1695
+ "name": "keyword.token.function.d"
1696
+ },
1697
+ {
1698
+ "match": "\\bgoto\\b",
1699
+ "name": "keyword.token.goto.d"
1700
+ },
1701
+ {
1702
+ "match": "\\bidouble\\b",
1703
+ "name": "keyword.token.idouble.d"
1704
+ },
1705
+ {
1706
+ "match": "\\bif\\b",
1707
+ "name": "keyword.token.if.d"
1708
+ },
1709
+ {
1710
+ "match": "\\bifloat\\b",
1711
+ "name": "keyword.token.ifloat.d"
1712
+ },
1713
+ {
1714
+ "match": "\\bimmutable\\b",
1715
+ "name": "keyword.token.immutable.d"
1716
+ },
1717
+ {
1718
+ "match": "\\bimport\\b",
1719
+ "name": "keyword.token.import.d"
1720
+ },
1721
+ {
1722
+ "match": "\\bin\\b",
1723
+ "name": "keyword.token.in.d"
1724
+ },
1725
+ {
1726
+ "match": "\\binout\\b",
1727
+ "name": "keyword.token.inout.d"
1728
+ },
1729
+ {
1730
+ "match": "\\bint\\b",
1731
+ "name": "keyword.token.int.d"
1732
+ },
1733
+ {
1734
+ "match": "\\binterface\\b",
1735
+ "name": "keyword.token.interface.d"
1736
+ },
1737
+ {
1738
+ "match": "\\binvariant\\b",
1739
+ "name": "keyword.token.invariant.d"
1740
+ },
1741
+ {
1742
+ "match": "\\bireal\\b",
1743
+ "name": "keyword.token.ireal.d"
1744
+ },
1745
+ {
1746
+ "match": "\\bis\\b",
1747
+ "name": "keyword.token.is.d"
1748
+ },
1749
+ {
1750
+ "match": "\\blazy\\b",
1751
+ "name": "keyword.token.lazy.d"
1752
+ },
1753
+ {
1754
+ "match": "\\blong\\b",
1755
+ "name": "keyword.token.long.d"
1756
+ },
1757
+ {
1758
+ "match": "\\bmacro\\b",
1759
+ "name": "keyword.token.macro.d"
1760
+ },
1761
+ {
1762
+ "match": "\\bmixin\\b",
1763
+ "name": "keyword.token.mixin.d"
1764
+ },
1765
+ {
1766
+ "match": "\\bmodule\\b",
1767
+ "name": "keyword.token.module.d"
1768
+ },
1769
+ {
1770
+ "match": "\\bnew\\b",
1771
+ "name": "keyword.token.new.d"
1772
+ },
1773
+ {
1774
+ "match": "\\bnothrow\\b",
1775
+ "name": "keyword.token.nothrow.d"
1776
+ },
1777
+ {
1778
+ "match": "\\bnull\\b",
1779
+ "name": "constant.language.null.d"
1780
+ },
1781
+ {
1782
+ "match": "\\bout\\b",
1783
+ "name": "keyword.token.out.d"
1784
+ },
1785
+ {
1786
+ "match": "\\boverride\\b",
1787
+ "name": "keyword.token.override.d"
1788
+ },
1789
+ {
1790
+ "match": "\\bpackage\\b",
1791
+ "name": "keyword.token.package.d"
1792
+ },
1793
+ {
1794
+ "match": "\\bpragma\\b",
1795
+ "name": "keyword.token.pragma.d"
1796
+ },
1797
+ {
1798
+ "match": "\\bprivate\\b",
1799
+ "name": "keyword.token.private.d"
1800
+ },
1801
+ {
1802
+ "match": "\\bprotected\\b",
1803
+ "name": "keyword.token.protected.d"
1804
+ },
1805
+ {
1806
+ "match": "\\bpublic\\b",
1807
+ "name": "keyword.token.public.d"
1808
+ },
1809
+ {
1810
+ "match": "\\bpure\\b",
1811
+ "name": "keyword.token.pure.d"
1812
+ },
1813
+ {
1814
+ "match": "\\breal\\b",
1815
+ "name": "keyword.token.real.d"
1816
+ },
1817
+ {
1818
+ "match": "\\bref\\b",
1819
+ "name": "keyword.token.ref.d"
1820
+ },
1821
+ {
1822
+ "match": "\\breturn\\b",
1823
+ "name": "keyword.token.return.d"
1824
+ },
1825
+ {
1826
+ "match": "\\bscope\\b",
1827
+ "name": "keyword.token.scope.d"
1828
+ },
1829
+ {
1830
+ "match": "\\bshared\\b",
1831
+ "name": "keyword.token.shared.d"
1832
+ },
1833
+ {
1834
+ "match": "\\bshort\\b",
1835
+ "name": "keyword.token.short.d"
1836
+ },
1837
+ {
1838
+ "match": "\\bstatic\\b",
1839
+ "name": "keyword.token.static.d"
1840
+ },
1841
+ {
1842
+ "match": "\\bstruct\\b",
1843
+ "name": "keyword.token.struct.d"
1844
+ },
1845
+ {
1846
+ "match": "\\bsuper\\b",
1847
+ "name": "keyword.token.super.d"
1848
+ },
1849
+ {
1850
+ "match": "\\bswitch\\b",
1851
+ "name": "keyword.token.switch.d"
1852
+ },
1853
+ {
1854
+ "match": "\\bsynchronized\\b",
1855
+ "name": "keyword.token.synchronized.d"
1856
+ },
1857
+ {
1858
+ "match": "\\btemplate\\b",
1859
+ "name": "keyword.token.template.d"
1860
+ },
1861
+ {
1862
+ "match": "\\bthis\\b",
1863
+ "name": "keyword.token.this.d"
1864
+ },
1865
+ {
1866
+ "match": "\\bthrow\\b",
1867
+ "name": "keyword.token.throw.d"
1868
+ },
1869
+ {
1870
+ "match": "\\btrue\\b",
1871
+ "name": "constant.language.boolean.true.d"
1872
+ },
1873
+ {
1874
+ "match": "\\btry\\b",
1875
+ "name": "keyword.token.try.d"
1876
+ },
1877
+ {
1878
+ "match": "\\btypedef\\b",
1879
+ "name": "keyword.token.typedef.d"
1880
+ },
1881
+ {
1882
+ "match": "\\btypeid\\b",
1883
+ "name": "keyword.token.typeid.d"
1884
+ },
1885
+ {
1886
+ "match": "\\btypeof\\b",
1887
+ "name": "keyword.token.typeof.d"
1888
+ },
1889
+ {
1890
+ "match": "\\bubyte\\b",
1891
+ "name": "keyword.token.ubyte.d"
1892
+ },
1893
+ {
1894
+ "match": "\\bucent\\b",
1895
+ "name": "keyword.token.ucent.d"
1896
+ },
1897
+ {
1898
+ "match": "\\buint\\b",
1899
+ "name": "keyword.token.uint.d"
1900
+ },
1901
+ {
1902
+ "match": "\\bulong\\b",
1903
+ "name": "keyword.token.ulong.d"
1904
+ },
1905
+ {
1906
+ "match": "\\bunion\\b",
1907
+ "name": "keyword.token.union.d"
1908
+ },
1909
+ {
1910
+ "match": "\\bunittest\\b",
1911
+ "name": "keyword.token.unittest.d"
1912
+ },
1913
+ {
1914
+ "match": "\\bushort\\b",
1915
+ "name": "keyword.token.ushort.d"
1916
+ },
1917
+ {
1918
+ "match": "\\bversion\\b",
1919
+ "name": "keyword.token.version.d"
1920
+ },
1921
+ {
1922
+ "match": "\\bvoid\\b",
1923
+ "name": "keyword.token.void.d"
1924
+ },
1925
+ {
1926
+ "match": "\\bvolatile\\b",
1927
+ "name": "keyword.token.volatile.d"
1928
+ },
1929
+ {
1930
+ "match": "\\bwchar\\b",
1931
+ "name": "keyword.token.wchar.d"
1932
+ },
1933
+ {
1934
+ "match": "\\bwhile\\b",
1935
+ "name": "keyword.token.while.d"
1936
+ },
1937
+ {
1938
+ "match": "\\bwith\\b",
1939
+ "name": "keyword.token.with.d"
1940
+ },
1941
+ {
1942
+ "match": "\\b__FILE__\\b",
1943
+ "name": "keyword.token.__FILE__.d"
1944
+ },
1945
+ {
1946
+ "match": "\\b__MODULE__\\b",
1947
+ "name": "keyword.token.__MODULE__.d"
1948
+ },
1949
+ {
1950
+ "match": "\\b__LINE__\\b",
1951
+ "name": "keyword.token.__LINE__.d"
1952
+ },
1953
+ {
1954
+ "match": "\\b__FUNCTION__\\b",
1955
+ "name": "keyword.token.__FUNCTION__.d"
1956
+ },
1957
+ {
1958
+ "match": "\\b__PRETTY_FUNCTION__\\b",
1959
+ "name": "keyword.token.__PRETTY_FUNCTION__.d"
1960
+ },
1961
+ {
1962
+ "match": "\\b__gshared\\b",
1963
+ "name": "keyword.token.__gshared.d"
1964
+ },
1965
+ {
1966
+ "match": "\\b__traits\\b",
1967
+ "name": "keyword.token.__traits.d"
1968
+ },
1969
+ {
1970
+ "match": "\\b__vector\\b",
1971
+ "name": "keyword.token.__vector.d"
1972
+ },
1973
+ {
1974
+ "match": "\\b__parameters\\b",
1975
+ "name": "keyword.token.__parameters.d"
1976
+ }
1977
+ ]
1978
+ },
1979
+ "labeled-statement": {
1980
+ "patterns": [
1981
+ {
1982
+ "match": "\\b(?!abstract|alias|align|asm|assert|auto|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|in|inout|int|interface|invariant|ireal|is|lazy|long|macro|mixin|module|new|nothrow|noreturn|null|out|override|package|pragma|private|protected|public|pure|real|ref|return|scope|shared|short|static|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|__FILE__|__MODULE__|__LINE__|__FUNCTION__|__PRETTY_FUNCTION__|__gshared|__traits|__vector|__parameters)[a-zA-Z_][a-zA-Z_0-9]*\\s*:",
1983
+ "name": "entity.name.d"
1984
+ }
1985
+ ]
1986
+ },
1987
+ "lexical": {
1988
+ "patterns": [
1989
+ {
1990
+ "include": "#comment"
1991
+ },
1992
+ {
1993
+ "include": "#string-literal"
1994
+ },
1995
+ {
1996
+ "include": "#character-literal"
1997
+ },
1998
+ {
1999
+ "include": "#float-literal"
2000
+ },
2001
+ {
2002
+ "include": "#integer-literal"
2003
+ },
2004
+ {
2005
+ "include": "#eof"
2006
+ },
2007
+ {
2008
+ "include": "#special-tokens"
2009
+ },
2010
+ {
2011
+ "include": "#special-token-sequence"
2012
+ },
2013
+ {
2014
+ "include": "#keyword"
2015
+ },
2016
+ {
2017
+ "include": "#identifier"
2018
+ }
2019
+ ]
2020
+ },
2021
+ "line-comment": {
2022
+ "patterns": [
2023
+ {
2024
+ "match": "//+.*$",
2025
+ "name": "comment.line.d"
2026
+ }
2027
+ ]
2028
+ },
2029
+ "linkage-attribute": {
2030
+ "patterns": [
2031
+ {
2032
+ "begin": "\\bextern\\s*\\(\\s*C\\+\\+\\s*,",
2033
+ "beginCaptures": {
2034
+ "0": {
2035
+ "name": "keyword.other.extern.cplusplus.begin.d"
2036
+ }
2037
+ },
2038
+ "end": "\\)",
2039
+ "endCaptures": {
2040
+ "0": {
2041
+ "name": "keyword.other.extern.cplusplus.end.d"
2042
+ }
2043
+ },
2044
+ "patterns": [
2045
+ {
2046
+ "include": "#identifier"
2047
+ },
2048
+ {
2049
+ "include": "#comma"
2050
+ }
2051
+ ]
2052
+ },
2053
+ {
2054
+ "begin": "\\bextern\\s*\\(",
2055
+ "beginCaptures": {
2056
+ "0": {
2057
+ "name": "keyword.other.extern.begin.d"
2058
+ }
2059
+ },
2060
+ "end": "\\)",
2061
+ "endCaptures": {
2062
+ "0": {
2063
+ "name": "keyword.other.extern.end.d"
2064
+ }
2065
+ },
2066
+ "patterns": [
2067
+ {
2068
+ "include": "#linkage-type"
2069
+ }
2070
+ ]
2071
+ }
2072
+ ]
2073
+ },
2074
+ "linkage-type": {
2075
+ "patterns": [
2076
+ {
2077
+ "match": "C|C\\+\\+|D|Windows|Pascal|System",
2078
+ "name": "storage.modifier.linkage-type.d"
2079
+ }
2080
+ ]
2081
+ },
2082
+ "logical-expression": {
2083
+ "patterns": [
2084
+ {
2085
+ "match": "\\|\\||&&|==|!=|!",
2086
+ "name": "keyword.operator.logical.d"
2087
+ }
2088
+ ]
2089
+ },
2090
+ "member-function-attribute": {
2091
+ "patterns": [
2092
+ {
2093
+ "match": "\\b(const|immutable|inout|shared)\\b",
2094
+ "name": "storage.type.modifier.member-function-attribute"
2095
+ }
2096
+ ]
2097
+ },
2098
+ "mixin-declaration": {
2099
+ "patterns": [
2100
+ {
2101
+ "begin": "\\bmixin\\s*\\(",
2102
+ "beginCaptures": {
2103
+ "0": {
2104
+ "name": "keyword.mixin.begin.d"
2105
+ }
2106
+ },
2107
+ "end": "\\)",
2108
+ "endCaptures": {
2109
+ "0": {
2110
+ "name": "keyword.mixin.end.d"
2111
+ }
2112
+ },
2113
+ "patterns": [
2114
+ {
2115
+ "include": "#comment"
2116
+ },
2117
+ {
2118
+ "include": "#expression"
2119
+ },
2120
+ {
2121
+ "include": "#comma"
2122
+ }
2123
+ ]
2124
+ }
2125
+ ]
2126
+ },
2127
+ "mixin-expression": {
2128
+ "patterns": [
2129
+ {
2130
+ "begin": "\\bmixin\\s*\\(",
2131
+ "beginCaptures": {
2132
+ "0": {
2133
+ "name": "keyword.other.mixin.begin.d"
2134
+ }
2135
+ },
2136
+ "end": "\\)",
2137
+ "endCaptures": {
2138
+ "0": {
2139
+ "name": "keyword.other.mixin.end.d"
2140
+ }
2141
+ },
2142
+ "patterns": [
2143
+ {
2144
+ "include": "#comment"
2145
+ },
2146
+ {
2147
+ "include": "#expression"
2148
+ },
2149
+ {
2150
+ "include": "#comma"
2151
+ }
2152
+ ]
2153
+ }
2154
+ ]
2155
+ },
2156
+ "mixin-statement": {
2157
+ "patterns": [
2158
+ {
2159
+ "begin": "\\bmixin\\s*\\(",
2160
+ "beginCaptures": {
2161
+ "0": {
2162
+ "name": "keyword.control.mixin.begin.d"
2163
+ }
2164
+ },
2165
+ "end": "\\)",
2166
+ "endCaptures": {
2167
+ "0": {
2168
+ "name": "keyword.control.mixin.end.d"
2169
+ }
2170
+ },
2171
+ "patterns": [
2172
+ {
2173
+ "include": "#comment"
2174
+ },
2175
+ {
2176
+ "include": "#expression"
2177
+ },
2178
+ {
2179
+ "include": "#comma"
2180
+ }
2181
+ ]
2182
+ }
2183
+ ]
2184
+ },
2185
+ "mixin-template-declaration": {
2186
+ "patterns": [
2187
+ {
2188
+ "captures": {
2189
+ "1": {
2190
+ "name": "storage.type.mixintemplate.d"
2191
+ },
2192
+ "2": {
2193
+ "name": "entity.name.type.mixintemplate.d"
2194
+ }
2195
+ },
2196
+ "match": "\\b(mixin\\s*template)(?:\\s+([A-Za-z_][\\w_\\d]*))?\\b"
2197
+ }
2198
+ ]
2199
+ },
2200
+ "module": {
2201
+ "packages": [
2202
+ {
2203
+ "import": "#module-declaration"
2204
+ }
2205
+ ]
2206
+ },
2207
+ "module-declaration": {
2208
+ "patterns": [
2209
+ {
2210
+ "begin": "\\b(module)\\s+",
2211
+ "beginCaptures": {
2212
+ "1": {
2213
+ "name": "keyword.package.module.d"
2214
+ }
2215
+ },
2216
+ "end": ";",
2217
+ "endCaptures": {
2218
+ "0": {
2219
+ "name": "meta.module.end.d"
2220
+ }
2221
+ },
2222
+ "patterns": [
2223
+ {
2224
+ "include": "#module-identifier"
2225
+ },
2226
+ {
2227
+ "include": "#comment"
2228
+ }
2229
+ ]
2230
+ }
2231
+ ]
2232
+ },
2233
+ "module-identifier": {
2234
+ "patterns": [
2235
+ {
2236
+ "match": "([_a-zA-Z][_\\d\\w]*)(\\s*\\.\\s*[_a-zA-Z][_\\d\\w]*)*",
2237
+ "name": "variable.parameter.module.d"
2238
+ }
2239
+ ]
2240
+ },
2241
+ "nesting-block-comment": {
2242
+ "patterns": [
2243
+ {
2244
+ "begin": "/((?!\\+/)\\+)+",
2245
+ "beginCaptures": {
2246
+ "0": {
2247
+ "name": "comment.block.documentation.begin.d"
2248
+ }
2249
+ },
2250
+ "end": "\\++/",
2251
+ "endCaptures": {
2252
+ "0": {
2253
+ "name": "comment.block.documentation.end.d"
2254
+ }
2255
+ },
2256
+ "name": "comment.block.documentation.content.d",
2257
+ "patterns": [
2258
+ {
2259
+ "include": "#nesting-block-comment"
2260
+ }
2261
+ ]
2262
+ }
2263
+ ]
2264
+ },
2265
+ "new-expression": {
2266
+ "patterns": [
2267
+ {
2268
+ "match": "\\bnew\\s+",
2269
+ "name": "keyword.other.new.d"
2270
+ }
2271
+ ]
2272
+ },
2273
+ "non-block-statement": {
2274
+ "patterns": [
2275
+ {
2276
+ "include": "#module-declaration"
2277
+ },
2278
+ {
2279
+ "include": "#labeled-statement"
2280
+ },
2281
+ {
2282
+ "include": "#if-statement"
2283
+ },
2284
+ {
2285
+ "include": "#while-statement"
2286
+ },
2287
+ {
2288
+ "include": "#do-statement"
2289
+ },
2290
+ {
2291
+ "include": "#for-statement"
2292
+ },
2293
+ {
2294
+ "include": "#static-foreach"
2295
+ },
2296
+ {
2297
+ "include": "#static-foreach-reverse"
2298
+ },
2299
+ {
2300
+ "include": "#foreach-statement"
2301
+ },
2302
+ {
2303
+ "include": "#foreach-reverse-statement"
2304
+ },
2305
+ {
2306
+ "include": "#switch-statement"
2307
+ },
2308
+ {
2309
+ "include": "#final-switch-statement"
2310
+ },
2311
+ {
2312
+ "include": "#case-statement"
2313
+ },
2314
+ {
2315
+ "include": "#default-statement"
2316
+ },
2317
+ {
2318
+ "include": "#continue-statement"
2319
+ },
2320
+ {
2321
+ "include": "#break-statement"
2322
+ },
2323
+ {
2324
+ "include": "#return-statement"
2325
+ },
2326
+ {
2327
+ "include": "#goto-statement"
2328
+ },
2329
+ {
2330
+ "include": "#with-statement"
2331
+ },
2332
+ {
2333
+ "include": "#synchronized-statement"
2334
+ },
2335
+ {
2336
+ "include": "#try-statement"
2337
+ },
2338
+ {
2339
+ "include": "#catches"
2340
+ },
2341
+ {
2342
+ "include": "#scope-guard-statement"
2343
+ },
2344
+ {
2345
+ "include": "#throw-statement"
2346
+ },
2347
+ {
2348
+ "include": "#finally-statement"
2349
+ },
2350
+ {
2351
+ "include": "#asm-statement"
2352
+ },
2353
+ {
2354
+ "include": "#pragma-statement"
2355
+ },
2356
+ {
2357
+ "include": "#mixin-statement"
2358
+ },
2359
+ {
2360
+ "include": "#conditional-statement"
2361
+ },
2362
+ {
2363
+ "include": "#static-assert"
2364
+ },
2365
+ {
2366
+ "include": "#deprecated-statement"
2367
+ },
2368
+ {
2369
+ "include": "#unit-test"
2370
+ },
2371
+ {
2372
+ "include": "#declaration-statement"
2373
+ }
2374
+ ]
2375
+ },
2376
+ "operands": {
2377
+ "patterns": [
2378
+ {
2379
+ "match": "\\?|:",
2380
+ "name": "keyword.operator.ternary.assembly.d"
2381
+ },
2382
+ {
2383
+ "match": "\\]|\\[",
2384
+ "name": "keyword.operator.bracket.assembly.d"
2385
+ },
2386
+ {
2387
+ "match": ">>>|\\|\\||&&|==|!=|<=|>=|<<|>>|\\||\\^|&|<|>|\\+|-|\\*|/|%|~|!",
2388
+ "name": "keyword.operator.assembly.d"
2389
+ }
2390
+ ]
2391
+ },
2392
+ "out-statement": {
2393
+ "patterns": [
2394
+ {
2395
+ "begin": "\\bout\\s*\\(",
2396
+ "beginCaptures": {
2397
+ "0": {
2398
+ "name": "keyword.control.out.begin.d"
2399
+ }
2400
+ },
2401
+ "end": "\\)",
2402
+ "endCaptures": {
2403
+ "0": {
2404
+ "name": "keyword.control.out.end.d"
2405
+ }
2406
+ },
2407
+ "patterns": [
2408
+ {
2409
+ "include": "#identifier"
2410
+ }
2411
+ ]
2412
+ },
2413
+ {
2414
+ "match": "\\bout\\b",
2415
+ "name": "keyword.control.out.d"
2416
+ }
2417
+ ]
2418
+ },
2419
+ "parentheses-expression": {
2420
+ "patterns": [
2421
+ {
2422
+ "begin": "\\(",
2423
+ "end": "\\)",
2424
+ "patterns": [
2425
+ {
2426
+ "include": "#expression"
2427
+ }
2428
+ ]
2429
+ }
2430
+ ]
2431
+ },
2432
+ "postblit": {
2433
+ "patterns": [
2434
+ {
2435
+ "match": "\\bthis\\s*\\(\\s*this\\s*\\)\\s",
2436
+ "name": "entity.name.class.postblit.d"
2437
+ }
2438
+ ]
2439
+ },
2440
+ "pragma": {
2441
+ "patterns": [
2442
+ {
2443
+ "match": "\\bpragma\\s*\\(\\s*[_\\w][_\\d\\w]*\\s*\\)",
2444
+ "name": "keyword.other.pragma.d"
2445
+ },
2446
+ {
2447
+ "begin": "\\bpragma\\s*\\(\\s*[_\\w][_\\d\\w]*\\s*,",
2448
+ "end": "\\)",
2449
+ "name": "keyword.other.pragma.d",
2450
+ "patterns": [
2451
+ {
2452
+ "include": "#expression"
2453
+ }
2454
+ ]
2455
+ },
2456
+ {
2457
+ "match": "^#!.+",
2458
+ "name": "gfm.markup.header.preprocessor.script-tag.d"
2459
+ }
2460
+ ]
2461
+ },
2462
+ "pragma-statement": {
2463
+ "patterns": [
2464
+ {
2465
+ "include": "#pragma"
2466
+ }
2467
+ ]
2468
+ },
2469
+ "property": {
2470
+ "patterns": [
2471
+ {
2472
+ "match": "@(property|safe|trusted|system|disable|nogc)\\b",
2473
+ "name": "entity.name.tag.property.d"
2474
+ },
2475
+ {
2476
+ "include": "#user-defined-attribute"
2477
+ }
2478
+ ]
2479
+ },
2480
+ "protection-attribute": {
2481
+ "patterns": [
2482
+ {
2483
+ "match": "\\b(private|package|protected|public|export)\\b",
2484
+ "name": "keyword.other.protections.d"
2485
+ }
2486
+ ]
2487
+ },
2488
+ "register": {
2489
+ "patterns": [
2490
+ {
2491
+ "match": "\\b(XMM0|XMM1|XMM2|XMM3|XMM4|XMM5|XMM6|XMM7|MM0|MM1|MM2|MM3|MM4|MM5|MM6|MM7|ST\\(0\\)|ST\\(1\\)|ST\\(2\\)|ST\\(3\\)|ST\\(4\\)|ST\\(5\\)|ST\\(6\\)|ST\\(7\\)|ST|TR1|TR2|TR3|TR4|TR5|TR6|TR7|DR0|DR1|DR2|DR3|DR4|DR5|DR6|DR7|CR0|CR2|CR3|CR4|EAX|EBX|ECX|EDX|EBP|ESP|EDI|ESI|AL|AH|AX|BL|BH|BX|CL|CH|CX|DL|DH|DX|BP|SP|DI|SI|ES|CS|SS|DS|GS|FS)\\b",
2492
+ "name": "storage.type.assembly.register.d"
2493
+ }
2494
+ ]
2495
+ },
2496
+ "register-64": {
2497
+ "patterns": [
2498
+ {
2499
+ "match": "\\b(RAX|RBX|RCX|RDX|BPL|RBP|SPL|RSP|DIL|RDI|SIL|RSI|R8B|R8W|R8D|R8|R9B|R9W|R9D|R9|R10B|R10W|R10D|R10|R11B|R11W|R11D|R11|R12B|R12W|R12D|R12|R13B|R13W|R13D|R13|R14B|R14W|R14D|R14|R15B|R15W|R15D|R15|XMM8|XMM9|XMM10|XMM11|XMM12|XMM13|XMM14|XMM15|YMM0|YMM1|YMM2|YMM3|YMM4|YMM5|YMM6|YMM7|YMM8|YMM9|YMM10|YMM11|YMM12|YMM13|YMM14|YMM15)\\b",
2500
+ "name": "storage.type.assembly.register-64.d"
2501
+ }
2502
+ ]
2503
+ },
2504
+ "rel-expression": {
2505
+ "patterns": [
2506
+ {
2507
+ "match": "!<>=|!<>|<>=|!>=|!<=|<=|>=|<>|!>|!<|<|>",
2508
+ "name": "keyword.operator.rel.d"
2509
+ }
2510
+ ]
2511
+ },
2512
+ "return-statement": {
2513
+ "patterns": [
2514
+ {
2515
+ "match": "\\breturn\\b",
2516
+ "name": "keyword.control.return.d"
2517
+ }
2518
+ ]
2519
+ },
2520
+ "scope-guard-statement": {
2521
+ "patterns": [
2522
+ {
2523
+ "match": "\\bscope\\s*\\((exit|success|failure)\\)",
2524
+ "name": "keyword.control.scope.d"
2525
+ }
2526
+ ]
2527
+ },
2528
+ "semi-colon": {
2529
+ "patterns": [
2530
+ {
2531
+ "match": ";",
2532
+ "name": "meta.statement.end.d"
2533
+ }
2534
+ ]
2535
+ },
2536
+ "shared-static-constructor": {
2537
+ "patterns": [
2538
+ {
2539
+ "match": "\\b(shared\\s+)?static\\s+this\\s*\\(\\s*\\)",
2540
+ "name": "entity.name.class.constructor.shared-static.d"
2541
+ },
2542
+ {
2543
+ "include": "#function-body"
2544
+ }
2545
+ ]
2546
+ },
2547
+ "shared-static-destructor": {
2548
+ "patterns": [
2549
+ {
2550
+ "match": "\\b(shared\\s+)?static\\s+~this\\s*\\(\\s*\\)",
2551
+ "name": "entity.name.class.destructor.static.d"
2552
+ }
2553
+ ]
2554
+ },
2555
+ "shift-expression": {
2556
+ "patterns": [
2557
+ {
2558
+ "match": "<<|>>|>>>",
2559
+ "name": "keyword.operator.shift.d"
2560
+ },
2561
+ {
2562
+ "include": "#add-expression"
2563
+ }
2564
+ ]
2565
+ },
2566
+ "special-keyword": {
2567
+ "patterns": [
2568
+ {
2569
+ "match": "\\b(__FILE__|__FILE_FULL_PATH__|__MODULE__|__LINE__|__FUNCTION__|__PRETTY_FUNCTION__)\\b",
2570
+ "name": "constant.language.special-keyword.d"
2571
+ }
2572
+ ]
2573
+ },
2574
+ "special-token-sequence": {
2575
+ "patterns": [
2576
+ {
2577
+ "match": "#\\s*line.*",
2578
+ "name": "gfm.markup.italic.special-token-sequence.d"
2579
+ }
2580
+ ]
2581
+ },
2582
+ "special-tokens": {
2583
+ "patterns": [
2584
+ {
2585
+ "match": "\\b(__DATE__|__TIME__|__TIMESTAMP__|__VENDOR__|__VERSION__)\\b",
2586
+ "name": "gfm.markup.raw.special-tokens.d"
2587
+ }
2588
+ ]
2589
+ },
2590
+ "statement": {
2591
+ "patterns": [
2592
+ {
2593
+ "include": "#non-block-statement"
2594
+ },
2595
+ {
2596
+ "include": "#semi-colon"
2597
+ }
2598
+ ]
2599
+ },
2600
+ "static-assert": {
2601
+ "patterns": [
2602
+ {
2603
+ "begin": "\\bstatic\\s+assert\\b\\s*\\(",
2604
+ "beginCaptures": {
2605
+ "0": {
2606
+ "name": "keyword.other.static-assert.begin.d"
2607
+ }
2608
+ },
2609
+ "end": "\\)",
2610
+ "endCaptures": {
2611
+ "0": {
2612
+ "name": "keyword.other.static-assert.end.d"
2613
+ }
2614
+ },
2615
+ "patterns": [
2616
+ {
2617
+ "include": "#expression"
2618
+ }
2619
+ ]
2620
+ }
2621
+ ]
2622
+ },
2623
+ "static-foreach": {
2624
+ "patterns": [
2625
+ {
2626
+ "begin": "\\b(static\\s+foreach)\\b\\s*",
2627
+ "captures": {
2628
+ "1": {
2629
+ "name": "keyword.control.static-foreach.d"
2630
+ }
2631
+ },
2632
+ "end": "(?<=\\))",
2633
+ "patterns": [
2634
+ {
2635
+ "begin": "\\(",
2636
+ "end": "\\)",
2637
+ "patterns": [
2638
+ {
2639
+ "match": ";",
2640
+ "name": "keyword.operator.semi-colon.d"
2641
+ },
2642
+ {
2643
+ "include": "source.d"
2644
+ }
2645
+ ]
2646
+ }
2647
+ ]
2648
+ }
2649
+ ]
2650
+ },
2651
+ "static-foreach-reverse": {
2652
+ "patterns": [
2653
+ {
2654
+ "begin": "\\b(static\\s+foreach_reverse)\\b\\s*",
2655
+ "captures": {
2656
+ "1": {
2657
+ "name": "keyword.control.static-foreach.d"
2658
+ }
2659
+ },
2660
+ "end": "(?<=\\))",
2661
+ "patterns": [
2662
+ {
2663
+ "begin": "\\(",
2664
+ "end": "\\)",
2665
+ "patterns": [
2666
+ {
2667
+ "match": ";",
2668
+ "name": "keyword.operator.semi-colon.d"
2669
+ },
2670
+ {
2671
+ "include": "source.d"
2672
+ }
2673
+ ]
2674
+ }
2675
+ ]
2676
+ }
2677
+ ]
2678
+ },
2679
+ "static-if-condition": {
2680
+ "patterns": [
2681
+ {
2682
+ "begin": "\\bstatic\\s+if\\b\\s*\\(",
2683
+ "beginCaptures": {
2684
+ "0": {
2685
+ "name": "keyword.control.static-if.begin.d"
2686
+ }
2687
+ },
2688
+ "end": "\\)",
2689
+ "endCaptures": {
2690
+ "0": {
2691
+ "name": "keyword.control.static-if.end.d"
2692
+ }
2693
+ },
2694
+ "patterns": [
2695
+ {
2696
+ "include": "#comment"
2697
+ },
2698
+ {
2699
+ "include": "#expression"
2700
+ }
2701
+ ]
2702
+ }
2703
+ ]
2704
+ },
2705
+ "storage-class": {
2706
+ "patterns": [
2707
+ {
2708
+ "match": "\\b(deprecated|enum|static|extern|abstract|final|override|synchronized|auto|scope|const|immutable|inout|shared|__gshared|nothrow|pure|ref)\\b",
2709
+ "name": "storage.class.d"
2710
+ },
2711
+ {
2712
+ "include": "#linkage-attribute"
2713
+ },
2714
+ {
2715
+ "include": "#align-attribute"
2716
+ },
2717
+ {
2718
+ "include": "#property"
2719
+ }
2720
+ ]
2721
+ },
2722
+ "string-literal": {
2723
+ "patterns": [
2724
+ {
2725
+ "include": "#wysiwyg-string"
2726
+ },
2727
+ {
2728
+ "include": "#alternate-wysiwyg-string"
2729
+ },
2730
+ {
2731
+ "include": "#hex-string"
2732
+ },
2733
+ {
2734
+ "include": "#arbitrary-delimited-string"
2735
+ },
2736
+ {
2737
+ "include": "#delimited-string"
2738
+ },
2739
+ {
2740
+ "include": "#double-quoted-string"
2741
+ },
2742
+ {
2743
+ "include": "#token-string"
2744
+ }
2745
+ ]
2746
+ },
2747
+ "struct-declaration": {
2748
+ "patterns": [
2749
+ {
2750
+ "captures": {
2751
+ "1": {
2752
+ "name": "storage.type.struct.d"
2753
+ },
2754
+ "2": {
2755
+ "name": "entity.name.type.struct.d"
2756
+ }
2757
+ },
2758
+ "match": "\\b(struct)(?:\\s+([A-Za-z_][\\w_\\d]*))?\\b"
2759
+ }
2760
+ ]
2761
+ },
2762
+ "switch-statement": {
2763
+ "patterns": [
2764
+ {
2765
+ "begin": "\\b(switch)\\b\\s*",
2766
+ "captures": {
2767
+ "1": {
2768
+ "name": "keyword.control.switch.d"
2769
+ }
2770
+ },
2771
+ "end": "(?<=\\))",
2772
+ "patterns": [
2773
+ {
2774
+ "begin": "\\(",
2775
+ "end": "\\)",
2776
+ "patterns": [
2777
+ {
2778
+ "include": "source.d"
2779
+ }
2780
+ ]
2781
+ }
2782
+ ]
2783
+ }
2784
+ ]
2785
+ },
2786
+ "synchronized-statement": {
2787
+ "patterns": [
2788
+ {
2789
+ "begin": "\\b(synchronized)\\b\\s*(?=\\()",
2790
+ "captures": {
2791
+ "1": {
2792
+ "name": "keyword.control.synchronized.d"
2793
+ }
2794
+ },
2795
+ "end": "(?<=\\))",
2796
+ "patterns": [
2797
+ {
2798
+ "begin": "\\(",
2799
+ "end": "\\)",
2800
+ "patterns": [
2801
+ {
2802
+ "include": "source.d"
2803
+ }
2804
+ ]
2805
+ }
2806
+ ]
2807
+ }
2808
+ ]
2809
+ },
2810
+ "template-declaration": {
2811
+ "patterns": [
2812
+ {
2813
+ "captures": {
2814
+ "1": {
2815
+ "name": "storage.type.template.d"
2816
+ },
2817
+ "2": {
2818
+ "name": "entity.name.type.template.d"
2819
+ }
2820
+ },
2821
+ "match": "\\b(template)(?:\\s+([A-Za-z_][\\w_\\d]*))?\\b"
2822
+ }
2823
+ ]
2824
+ },
2825
+ "throw-statement": {
2826
+ "patterns": [
2827
+ {
2828
+ "match": "\\bthrow\\b",
2829
+ "name": "keyword.control.throw.d"
2830
+ }
2831
+ ]
2832
+ },
2833
+ "token-string": {
2834
+ "begin": "q\\{",
2835
+ "beginCaptures": {
2836
+ "0": {
2837
+ "name": "string.quoted.token.d"
2838
+ }
2839
+ },
2840
+ "end": "\\}[cdw]?",
2841
+ "endCaptures": {
2842
+ "0": {
2843
+ "name": "string.quoted.token.d"
2844
+ }
2845
+ },
2846
+ "patterns": [
2847
+ {
2848
+ "include": "#token-string-content"
2849
+ }
2850
+ ]
2851
+ },
2852
+ "token-string-content": {
2853
+ "patterns": [
2854
+ {
2855
+ "begin": "{",
2856
+ "end": "}",
2857
+ "patterns": [
2858
+ {
2859
+ "include": "#token-string-content"
2860
+ }
2861
+ ]
2862
+ },
2863
+ {
2864
+ "include": "#comment"
2865
+ },
2866
+ {
2867
+ "include": "#tokens"
2868
+ }
2869
+ ]
2870
+ },
2871
+ "tokens": {
2872
+ "patterns": [
2873
+ {
2874
+ "include": "#string-literal"
2875
+ },
2876
+ {
2877
+ "include": "#character-literal"
2878
+ },
2879
+ {
2880
+ "include": "#integer-literal"
2881
+ },
2882
+ {
2883
+ "include": "#float-literal"
2884
+ },
2885
+ {
2886
+ "include": "#keyword"
2887
+ },
2888
+ {
2889
+ "match": "~=|~|>>>|>>=|>>|>=|>|=>|==|=|<>|<=|<<|<|%=|%|#|&=|&&|&|\\$|\\|=|\\|\\||\\||\\+=|\\+\\+|\\+|\\^=|\\^\\^=|\\^\\^|\\^|\\*=|\\*|\\}|\\{|\\]|\\[|\\)|\\(|\\.\\.\\.|\\.\\.|\\.|\\?|\\!>=|\\!>|\\!=|\\!<>=|\\!<>|\\!<=|\\!<|\\!|/=|/|@|:|;|,|-=|--|-",
2890
+ "name": "meta.lexical.token.symbolic.d"
2891
+ },
2892
+ {
2893
+ "include": "#identifier"
2894
+ }
2895
+ ]
2896
+ },
2897
+ "traits-argument": {
2898
+ "patterns": [
2899
+ {
2900
+ "include": "#expression"
2901
+ },
2902
+ {
2903
+ "include": "#type"
2904
+ }
2905
+ ]
2906
+ },
2907
+ "traits-arguments": {
2908
+ "patterns": [
2909
+ {
2910
+ "include": "#traits-argument"
2911
+ },
2912
+ {
2913
+ "include": "#comma"
2914
+ }
2915
+ ]
2916
+ },
2917
+ "traits-expression": {
2918
+ "patterns": [
2919
+ {
2920
+ "begin": "\\b__traits\\s*\\(",
2921
+ "beginCaptures": {
2922
+ "0": {
2923
+ "name": "keyword.other.traits.begin.d"
2924
+ }
2925
+ },
2926
+ "end": "\\)",
2927
+ "endCaptures": {
2928
+ "0": {
2929
+ "name": "keyword.other.traits.end.d"
2930
+ }
2931
+ },
2932
+ "patterns": [
2933
+ {
2934
+ "include": "#traits-keyword"
2935
+ },
2936
+ {
2937
+ "include": "#comma"
2938
+ },
2939
+ {
2940
+ "include": "#traits-argument"
2941
+ }
2942
+ ]
2943
+ }
2944
+ ]
2945
+ },
2946
+ "traits-keyword": {
2947
+ "patterns": [
2948
+ {
2949
+ "match": "isAbstractClass|isArithmetic|isAssociativeArray|isFinalClass|isPOD|isNested|isFloating|isIntegral|isScalar|isStaticArray|isUnsigned|isVirtualFunction|isVirtualMethod|isAbstractFunction|isFinalFunction|isStaticFunction|isOverrideFunction|isRef|isOut|isLazy|hasMember|identifier|getAliasThis|getAttributes|getMember|getOverloads|getProtection|getVirtualFunctions|getVirtualMethods|getUnitTests|parent|classInstanceSize|getVirtualIndex|allMembers|derivedMembers|isSame|compiles",
2950
+ "name": "support.constant.traits-keyword.d"
2951
+ }
2952
+ ]
2953
+ },
2954
+ "try-statement": {
2955
+ "patterns": [
2956
+ {
2957
+ "match": "\\btry\\b",
2958
+ "name": "keyword.control.try.d"
2959
+ }
2960
+ ]
2961
+ },
2962
+ "type": {
2963
+ "patterns": [
2964
+ {
2965
+ "include": "#typeof"
2966
+ },
2967
+ {
2968
+ "include": "#base-type"
2969
+ },
2970
+ {
2971
+ "include": "#type-ctor"
2972
+ },
2973
+ {
2974
+ "begin": "!\\(",
2975
+ "end": "\\)",
2976
+ "patterns": [
2977
+ {
2978
+ "include": "#type"
2979
+ },
2980
+ {
2981
+ "include": "#expression"
2982
+ }
2983
+ ]
2984
+ }
2985
+ ]
2986
+ },
2987
+ "type-ctor": {
2988
+ "patterns": [
2989
+ {
2990
+ "match": "(const|immutable|inout|shared)\\b",
2991
+ "name": "storage.type.modifier.d"
2992
+ }
2993
+ ]
2994
+ },
2995
+ "type-specialization": {
2996
+ "patterns": [
2997
+ {
2998
+ "match": "\\b(struct|union|class|interface|enum|function|delegate|super|const|immutable|inout|shared|return|__parameters)\\b",
2999
+ "name": "keyword.other.storage.type-specialization.d"
3000
+ }
3001
+ ]
3002
+ },
3003
+ "typeid-expression": {
3004
+ "patterns": [
3005
+ {
3006
+ "match": "\\btypeid\\s*(?=\\()",
3007
+ "name": "keyword.other.typeid.d"
3008
+ }
3009
+ ]
3010
+ },
3011
+ "typeof": {
3012
+ "begin": "typeof\\s*\\(",
3013
+ "end": "\\)",
3014
+ "name": "keyword.token.typeof.d",
3015
+ "patterns": [
3016
+ {
3017
+ "match": "return",
3018
+ "name": "keyword.control.return.d"
3019
+ },
3020
+ {
3021
+ "include": "#expression"
3022
+ }
3023
+ ]
3024
+ },
3025
+ "union-declaration": {
3026
+ "patterns": [
3027
+ {
3028
+ "captures": {
3029
+ "1": {
3030
+ "name": "storage.type.union.d"
3031
+ },
3032
+ "2": {
3033
+ "name": "entity.name.type.union.d"
3034
+ }
3035
+ },
3036
+ "match": "\\b(union)(?:\\s+([A-Za-z_][\\w_\\d]*))?\\b"
3037
+ }
3038
+ ]
3039
+ },
3040
+ "user-defined-attribute": {
3041
+ "patterns": [
3042
+ {
3043
+ "match": "@([_\\w][_\\d\\w]*)\\b",
3044
+ "name": "entity.name.tag.user-defined-property.d"
3045
+ },
3046
+ {
3047
+ "begin": "@([_\\w][_\\d\\w]*)?\\(",
3048
+ "end": "\\)",
3049
+ "name": "entity.name.tag.user-defined-property.d",
3050
+ "patterns": [
3051
+ {
3052
+ "include": "#expression"
3053
+ }
3054
+ ]
3055
+ }
3056
+ ]
3057
+ },
3058
+ "version-condition": {
3059
+ "patterns": [
3060
+ {
3061
+ "match": "\\bversion\\s*\\(\\s*unittest\\s*\\)",
3062
+ "name": "keyword.other.version.unittest.d"
3063
+ },
3064
+ {
3065
+ "match": "\\bversion\\s*\\(\\s*assert\\s*\\)",
3066
+ "name": "keyword.other.version.assert.d"
3067
+ },
3068
+ {
3069
+ "begin": "\\bversion\\s*\\(",
3070
+ "beginCaptures": {
3071
+ "0": {
3072
+ "name": "keyword.other.version.identifier.begin.d"
3073
+ }
3074
+ },
3075
+ "end": "\\)",
3076
+ "endCaptures": {
3077
+ "0": {
3078
+ "name": "keyword.other.version.identifer.end.d"
3079
+ }
3080
+ },
3081
+ "patterns": [
3082
+ {
3083
+ "include": "#integer-literal"
3084
+ },
3085
+ {
3086
+ "include": "#identifier"
3087
+ }
3088
+ ]
3089
+ },
3090
+ {
3091
+ "include": "#version-specification"
3092
+ }
3093
+ ]
3094
+ },
3095
+ "version-specification": {
3096
+ "patterns": [
3097
+ {
3098
+ "match": "\\bversion\\b\\s*(?==)",
3099
+ "name": "keyword.other.version-specification.d"
3100
+ }
3101
+ ]
3102
+ },
3103
+ "void-initializer": {
3104
+ "patterns": [
3105
+ {
3106
+ "match": "\\bvoid\\b",
3107
+ "name": "support.type.void.d"
3108
+ }
3109
+ ]
3110
+ },
3111
+ "while-statement": {
3112
+ "patterns": [
3113
+ {
3114
+ "begin": "\\b(while)\\b\\s*",
3115
+ "captures": {
3116
+ "1": {
3117
+ "name": "keyword.control.while.d"
3118
+ }
3119
+ },
3120
+ "end": "(?<=\\))",
3121
+ "patterns": [
3122
+ {
3123
+ "begin": "\\(",
3124
+ "end": "\\)",
3125
+ "patterns": [
3126
+ {
3127
+ "include": "source.d"
3128
+ }
3129
+ ]
3130
+ }
3131
+ ]
3132
+ }
3133
+ ]
3134
+ },
3135
+ "with-statement": {
3136
+ "patterns": [
3137
+ {
3138
+ "begin": "\\b(with)\\b\\s*(?=\\()",
3139
+ "captures": {
3140
+ "1": {
3141
+ "name": "keyword.control.with.d"
3142
+ }
3143
+ },
3144
+ "end": "(?<=\\))",
3145
+ "patterns": [
3146
+ {
3147
+ "begin": "\\(",
3148
+ "end": "\\)",
3149
+ "patterns": [
3150
+ {
3151
+ "include": "source.d"
3152
+ }
3153
+ ]
3154
+ }
3155
+ ]
3156
+ }
3157
+ ]
3158
+ },
3159
+ "wysiwyg-characters": {
3160
+ "patterns": [
3161
+ {
3162
+ "include": "#character"
3163
+ },
3164
+ {
3165
+ "include": "#end-of-line"
3166
+ }
3167
+ ]
3168
+ },
3169
+ "wysiwyg-string": {
3170
+ "patterns": [
3171
+ {
3172
+ "begin": "r\\\"",
3173
+ "end": "\\\"[cwd]?",
3174
+ "name": "string.wysiwyg-string.d",
3175
+ "patterns": [
3176
+ {
3177
+ "include": "#wysiwyg-characters"
3178
+ }
3179
+ ]
3180
+ }
3181
+ ]
3182
+ }
3183
+ },
3184
+ "scopeName": "source.d"
3185
+ }