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