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

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

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