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

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

1,522 lines 38.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {
2 "fileTypes": ["nim"],
3 "keyEquivalent": "^~N",
4 "name": "nim",
5 "patterns": [
6 {
7 "begin": "[ \\t]*##\\[",
8 "contentName": "comment.block.doc-comment.content.nim",
9 "end": "\\]##",
10 "name": "comment.block.doc-comment.nim",
11 "patterns": [
12 {
13 "include": "#multilinedoccomment",
14 "name": "comment.block.doc-comment.nested.nim"
15 }
16 ]
17 },
18 {
19 "begin": "[ \\t]*#\\[",
20 "contentName": "comment.block.content.nim",
21 "end": "\\]#",
22 "name": "comment.block.nim",
23 "patterns": [
24 {
25 "include": "#multilinecomment",
26 "name": "comment.block.nested.nim"
27 }
28 ]
29 },
30 {
31 "begin": "(^[ \\t]+)?(?=##)",
32 "beginCaptures": {
33 "1": {
34 "name": "punctuation.whitespace.comment.leading.nim"
35 }
36 },
37 "end": "(?!\\G)",
38 "patterns": [
39 {
40 "begin": "##",
41 "beginCaptures": {
42 "0": {
43 "name": "punctuation.definition.comment.nim"
44 }
45 },
46 "end": "\\n",
47 "name": "comment.line.number-sign.doc-comment.nim"
48 }
49 ]
50 },
51 {
52 "begin": "(^[ \\t]+)?(?=#[^\\[])",
53 "beginCaptures": {
54 "1": {
55 "name": "punctuation.whitespace.comment.leading.nim"
56 }
57 },
58 "end": "(?!\\G)",
59 "patterns": [
60 {
61 "begin": "#",
62 "beginCaptures": {
63 "0": {
64 "name": "punctuation.definition.comment.nim"
65 }
66 },
67 "end": "\\n",
68 "name": "comment.line.number-sign.nim"
69 }
70 ]
71 },
72 {
73 "comment": "A nim procedure or method",
74 "name": "meta.proc.nim",
75 "patterns": [
76 {
77 "begin": "\\b(proc|method|template|macro|iterator|converter|func)\\s+\\`?([^\\:\\{\\s\\`\\*\\(]*)\\`?(\\s*\\*)?\\s*(?=\\(|\\=|:|\\[|\\n|\\{)",
78 "captures": {
79 "1": {
80 "name": "keyword.other"
81 },
82 "2": {
83 "name": "entity.name.function.nim"
84 },
85 "3": {
86 "name": "keyword.control.export"
87 }
88 },
89 "end": "\\)",
90 "patterns": [
91 {
92 "include": "source.nim"
93 }
94 ]
95 }
96 ]
97 },
98 {
99 "begin": "discard \"\"\"",
100 "comment": "A discarded triple string literal comment",
101 "end": "\"\"\"(?!\")",
102 "name": "comment.line.discarded.nim"
103 },
104 {
105 "include": "#float_literal"
106 },
107 {
108 "include": "#integer_literal"
109 },
110 {
111 "comment": "Operator as function name",
112 "match": "(?<=\\`)[^\\` ]+(?=\\`)",
113 "name": "entity.name.function.nim"
114 },
115 {
116 "captures": {
117 "1": {
118 "name": "keyword.control.export"
119 }
120 },
121 "comment": "Export qualifier.",
122 "match": "\\b\\s*(\\*)(?:\\s*(?=[,:])|\\s+(?=[=]))"
123 },
124 {
125 "comment": "Export qualifier following a type def.",
126 "match": "\\b([A-Z]\\w+)(\\*)",
127 "captures": {
128 "1": {
129 "name": "support.type.nim"
130 },
131 "2": {
132 "name": "keyword.control.export"
133 }
134 }
135 },
136 {
137 "include": "#string_literal"
138 },
139 {
140 "comment": "Language Constants.",
141 "match": "\\b(true|false|Inf|NegInf|NaN|nil)\\b",
142 "name": "constant.language.nim"
143 },
144 {
145 "comment": "Keywords that affect program control flow or scope.",
146 "match": "\\b(block|break|case|continue|do|elif|else|end|except|finally|for|if|raise|return|try|when|while|yield)\\b",
147 "name": "keyword.control.nim"
148 },
149 {
150 "comment": "Keyword boolean operators for expressions.",
151 "match": "(\\b(and|in|is|isnot|not|notin|or|xor)\\b)",
152 "name": "keyword.boolean.nim"
153 },
154 {
155 "comment": "Generic operators for expressions.",
156 "match": "(=|\\+|-|\\*|/|<|>|@|\\$|~|&|%|!|\\?|\\^|\\.|:|\\\\)+",
157 "name": "keyword.operator.nim"
158 },
159 {
160 "comment": "Other keywords.",
161 "match": "(\\b(addr|as|asm|atomic|bind|cast|const|converter|concept|defer|discard|distinct|div|enum|export|from|import|include|let|mod|mixin|object|of|ptr|ref|shl|shr|static|type|using|var|tuple|iterator|macro|func|method|proc|template)\\b)",
162 "name": "keyword.other.nim"
163 },
164 {
165 "comment": "Invalid and unused keywords.",
166 "match": "(\\b(generic|interface|lambda|out|shared)\\b)",
167 "name": "invalid.illegal.invalid-keyword.nim"
168 },
169 {
170 "comment": "Common functions",
171 "match": "\\b(new|await|assert|echo|defined|declared|newException|countup|countdown|high|low)\\b",
172 "name": "keyword.other.common.function.nim"
173 },
174 {
175 "comment": "Built-in, concrete types.",
176 "match": "\\b(((uint|int)(8|16|32|64)?)|float(32|64)?|bool|string|auto|cstring|char|byte|tobject|typedesc|stmt|expr|any|untyped|typed)\\b",
177 "name": "storage.type.concrete.nim"
178 },
179 {
180 "comment": "Built-in, generic types.",
181 "match": "\\b(range|array|seq|set|pointer)\\b",
182 "name": "storage.type.generic.nim"
183 },
184 {
185 "comment": "Special types.",
186 "match": "\\b(openarray|varargs|void)\\b",
187 "name": "storage.type.generic.nim"
188 },
189 {
190 "comment": "Other constants.",
191 "match": "\\b[A-Z][A-Z0-9_]+\\b",
192 "name": "support.constant.nim"
193 },
194 {
195 "comment": "Other types.",
196 "match": "\\b[A-Z]\\w+\\b",
197 "name": "support.type.nim"
198 },
199 {
200 "comment": "Function call.",
201 "match": "\\b\\w+\\b(?=(\\[([a-zA-Z0-9_,]|\\s)+\\])?\\()",
202 "name": "support.function.any-method.nim"
203 },
204 {
205 "comment": "Function call (no parenthesis).",
206 "match": "(?!(openarray|varargs|void|range|array|seq|set|pointer|new|await|assert|echo|defined|declared|newException|countup|countdown|high|low|((uint|int)(8|16|32|64)?)|float(32|64)?|bool|string|auto|cstring|char|byte|tobject|typedesc|stmt|expr|any|untyped|typed|addr|as|asm|atomic|bind|cast|const|converter|concept|defer|discard|distinct|div|enum|export|from|import|include|let|mod|mixin|object|of|ptr|ref|shl|shr|static|type|using|var|tuple|iterator|macro|func|method|proc|template|and|in|is|isnot|not|notin|or|xor|proc|method|template|macro|iterator|converter|func|true|false|Inf|NegInf|NaN|nil|block|break|case|continue|do|elif|else|end|except|finally|for|if|raise|return|try|when|while|yield)\\b)\\w+\\s+(?!(and|in|is|isnot|not|notin|or|xor|[^a-zA-Z0-9_\"'`(-+]+)\\b)(?=[a-zA-Z0-9_\"'`(-+])",
207 "name": "support.function.any-method.nim"
208 },
209 {
210 "begin": "(^\\s*)?(?=\\{\\.emit: ?\"\"\")",
211 "beginCaptures": {
212 "0": {
213 "name": "punctuation.whitespace.embedded.leading.nim"
214 }
215 },
216 "end": "(?!\\G)(\\s*$\\n?)?",
217 "endCaptures": {
218 "0": {
219 "name": "punctuation.whitespace.embedded.trailing.nim"
220 }
221 },
222 "patterns": [
223 {
224 "begin": "\\{\\.(emit:) ?(\"\"\")",
225 "captures": {
226 "1": {
227 "name": "keyword.other.nim"
228 },
229 "2": {
230 "name": "punctuation.section.embedded.begin.nim"
231 }
232 },
233 "contentName": "source.c",
234 "end": "(\")\"\"(?!\")(\\.{0,1}\\})?",
235 "endCaptures": {
236 "0": {
237 "name": "punctuation.section.embedded.end.nim"
238 },
239 "1": {
240 "name": "source.c"
241 }
242 },
243 "name": "meta.embedded.block.c",
244 "patterns": [
245 {
246 "begin": "\\`",
247 "end": "\\`",
248 "name": "keyword.operator.nim"
249 },
250 {
251 "include": "source.c"
252 }
253 ]
254 }
255 ]
256 },
257 {
258 "begin": "\\{\\.",
259 "beginCaptures": {
260 "0": {
261 "name": "punctuation.pragma.start.nim"
262 }
263 },
264 "end": "\\.?\\}",
265 "endCaptures": {
266 "0": {
267 "name": "punctuation.pragma.end.nim"
268 }
269 },
270 "patterns": [
271 {
272 "begin": "\\b([[:alpha:]]\\w*)(?:\\s|\\s*:)",
273 "beginCaptures": {
274 "1": {
275 "name": "meta.preprocessor.pragma.nim"
276 }
277 },
278 "end": "(?=\\.?\\}|,)",
279 "patterns": [
280 {
281 "include": "source.nim"
282 }
283 ]
284 },
285 {
286 "begin": "\\b([[:alpha:]]\\w*)\\(",
287 "beginCaptures": {
288 "1": {
289 "name": "meta.preprocessor.pragma.nim"
290 }
291 },
292 "end": "\\)",
293 "patterns": [
294 {
295 "include": "source.nim"
296 }
297 ]
298 },
299 {
300 "match": "\\b([[:alpha:]]\\w*)(?=\\.?\\}|,)",
301 "captures": {
302 "1": {
303 "name": "meta.preprocessor.pragma.nim"
304 }
305 }
306 },
307 {
308 "begin": "\\b([[:alpha:]]\\w*)(\"\"\")",
309 "beginCaptures": {
310 "1": {
311 "name": "meta.preprocessor.pragma.nim"
312 },
313 "2": {
314 "name": "punctuation.definition.string.begin.nim"
315 }
316 },
317 "end": "\"\"\"(?!\")",
318 "endCaptures": {
319 "0": {
320 "name": "punctuation.definition.string.end.nim"
321 }
322 },
323 "name": "string.quoted.triple.raw.nim"
324 },
325 {
326 "begin": "\\b([[:alpha:]]\\w*)(\")",
327 "beginCaptures": {
328 "1": {
329 "name": "meta.preprocessor.pragma.nim"
330 },
331 "2": {
332 "name": "punctuation.definition.string.begin.nim"
333 }
334 },
335 "end": "\"",
336 "endCaptures": {
337 "0": {
338 "name": "punctuation.definition.string.end.nim"
339 }
340 },
341 "name": "string.quoted.double.raw.nim"
342 },
343 {
344 "begin": "\\b(hint\\[\\w+\\]):",
345 "beginCaptures": {
346 "1": {
347 "name": "meta.preprocessor.pragma.nim"
348 }
349 },
350 "end": "(?=\\.?\\}|,)",
351 "patterns": [
352 {
353 "include": "source.nim"
354 }
355 ]
356 },
357 {
358 "match": ",",
359 "name": "punctuation.separator.comma.nim"
360 }
361 ]
362 },
363 {
364 "begin": "(^\\s*)?(?=asm \"\"\")",
365 "beginCaptures": {
366 "0": {
367 "name": "punctuation.whitespace.embedded.leading.nim"
368 }
369 },
370 "end": "(?!\\G)(\\s*$\\n?)?",
371 "endCaptures": {
372 "0": {
373 "name": "punctuation.whitespace.embedded.trailing.nim"
374 }
375 },
376 "patterns": [
377 {
378 "begin": "(asm) (\"\"\")",
379 "captures": {
380 "1": {
381 "name": "keyword.other.nim"
382 },
383 "2": {
384 "name": "punctuation.section.embedded.begin.nim"
385 }
386 },
387 "contentName": "source.asm",
388 "end": "(\")\"\"(?!\")",
389 "endCaptures": {
390 "0": {
391 "name": "punctuation.section.embedded.end.nim"
392 },
393 "1": {
394 "name": "source.asm"
395 }
396 },
397 "name": "meta.embedded.block.asm",
398 "patterns": [
399 {
400 "begin": "\\`",
401 "end": "\\`",
402 "name": "keyword.operator.nim"
403 },
404 {
405 "include": "source.asm"
406 }
407 ]
408 }
409 ]
410 },
411 {
412 "captures": {
413 "1": {
414 "name": "storage.type.function.nim"
415 },
416 "2": {
417 "name": "keyword.operator.nim"
418 }
419 },
420 "comment": "tmpl specifier",
421 "match": "(tmpl(i)?)(?=( (html|xml|js|css|glsl|md))?\"\"\")"
422 },
423 {
424 "begin": "(^\\s*)?(?=html\"\"\")",
425 "beginCaptures": {
426 "0": {
427 "name": "punctuation.whitespace.embedded.leading.nim"
428 }
429 },
430 "end": "(?!\\G)(\\s*$\\n?)?",
431 "endCaptures": {
432 "0": {
433 "name": "punctuation.whitespace.embedded.trailing.nim"
434 }
435 },
436 "patterns": [
437 {
438 "begin": "(html)(\"\"\")",
439 "captures": {
440 "1": {
441 "name": "keyword.other.nim"
442 },
443 "2": {
444 "name": "punctuation.section.embedded.begin.nim"
445 }
446 },
447 "contentName": "text.html",
448 "end": "(\")\"\"(?!\")",
449 "endCaptures": {
450 "0": {
451 "name": "punctuation.section.embedded.end.nim"
452 },
453 "1": {
454 "name": "text.html"
455 }
456 },
457 "name": "meta.embedded.block.html",
458 "patterns": [
459 {
460 "begin": "(?<!\\$)(\\$)\\(",
461 "captures": {
462 "1": {
463 "name": "keyword.operator.nim"
464 }
465 },
466 "end": "\\)",
467 "patterns": [
468 {
469 "include": "source.nim"
470 }
471 ]
472 },
473 {
474 "begin": "(?<!\\$)(\\$)\\{",
475 "captures": {
476 "1": {
477 "name": "keyword.operator.nim"
478 },
479 "2": {
480 "name": "keyword.operator.nim"
481 }
482 },
483 "end": "\\}",
484 "patterns": [
485 {
486 "include": "source.nim"
487 }
488 ]
489 },
490 {
491 "begin": "(?<!\\$)(\\$)(for|while|case|of|when|if|else|elif)( )",
492 "captures": {
493 "1": {
494 "name": "keyword.operator.nim"
495 },
496 "2": {
497 "name": "keyword.operator.nim"
498 }
499 },
500 "end": "(\\{|\\n)",
501 "endCaptures": {
502 "1": {
503 "name": "plain"
504 }
505 },
506 "patterns": [
507 {
508 "include": "source.nim"
509 }
510 ]
511 },
512 {
513 "match": "(?<!\\$)(\\$\\w+)",
514 "name": "keyword.operator.nim"
515 },
516 {
517 "include": "text.html.basic"
518 }
519 ]
520 }
521 ]
522 },
523 {
524 "begin": "(^\\s*)?(?=xml\"\"\")",
525 "beginCaptures": {
526 "0": {
527 "name": "punctuation.whitespace.embedded.leading.nim"
528 }
529 },
530 "end": "(?!\\G)(\\s*$\\n?)?",
531 "endCaptures": {
532 "0": {
533 "name": "punctuation.whitespace.embedded.trailing.nim"
534 }
535 },
536 "patterns": [
537 {
538 "begin": "(xml)(\"\"\")",
539 "captures": {
540 "1": {
541 "name": "keyword.other.nim"
542 },
543 "2": {
544 "name": "punctuation.section.embedded.begin.nim"
545 }
546 },
547 "contentName": "text.xml",
548 "end": "(\")\"\"(?!\")",
549 "endCaptures": {
550 "0": {
551 "name": "punctuation.section.embedded.end.nim"
552 },
553 "1": {
554 "name": "text.xml"
555 }
556 },
557 "name": "meta.embedded.block.xml",
558 "patterns": [
559 {
560 "begin": "(?<!\\$)(\\$)\\(",
561 "captures": {
562 "1": {
563 "name": "keyword.operator.nim"
564 }
565 },
566 "end": "\\)",
567 "patterns": [
568 {
569 "include": "source.nim"
570 }
571 ]
572 },
573 {
574 "begin": "(?<!\\$)(\\$)\\{",
575 "captures": {
576 "1": {
577 "name": "keyword.operator.nim"
578 },
579 "2": {
580 "name": "keyword.operator.nim"
581 }
582 },
583 "end": "\\}",
584 "patterns": [
585 {
586 "include": "source.nim"
587 }
588 ]
589 },
590 {
591 "begin": "(?<!\\$)(\\$)(for|while|case|of|when|if|else|elif)( )",
592 "captures": {
593 "1": {
594 "name": "keyword.operator.nim"
595 },
596 "2": {
597 "name": "keyword.operator.nim"
598 }
599 },
600 "end": "(\\{|\\n)",
601 "endCaptures": {
602 "1": {
603 "name": "plain"
604 }
605 },
606 "patterns": [
607 {
608 "include": "source.nim"
609 }
610 ]
611 },
612 {
613 "match": "(?<!\\$)(\\$\\w+)",
614 "name": "keyword.operator.nim"
615 },
616 {
617 "include": "text.xml"
618 }
619 ]
620 }
621 ]
622 },
623 {
624 "begin": "(^\\s*)?(?=js\"\"\")",
625 "beginCaptures": {
626 "0": {
627 "name": "punctuation.whitespace.embedded.leading.nim"
628 }
629 },
630 "end": "(?!\\G)(\\s*$\\n?)?",
631 "endCaptures": {
632 "0": {
633 "name": "punctuation.whitespace.embedded.trailing.nim"
634 }
635 },
636 "patterns": [
637 {
638 "begin": "(js)(\"\"\")",
639 "captures": {
640 "1": {
641 "name": "keyword.other.nim"
642 },
643 "2": {
644 "name": "punctuation.section.embedded.begin.nim"
645 }
646 },
647 "contentName": "source.js",
648 "end": "(\")\"\"(?!\")",
649 "endCaptures": {
650 "0": {
651 "name": "punctuation.section.embedded.end.nim"
652 },
653 "1": {
654 "name": "source.js"
655 }
656 },
657 "name": "meta.embedded.block.js",
658 "patterns": [
659 {
660 "begin": "(?<!\\$)(\\$)\\(",
661 "captures": {
662 "1": {
663 "name": "keyword.operator.nim"
664 }
665 },
666 "end": "\\)",
667 "patterns": [
668 {
669 "include": "source.nim"
670 }
671 ]
672 },
673 {
674 "begin": "(?<!\\$)(\\$)\\{",
675 "captures": {
676 "1": {
677 "name": "keyword.operator.nim"
678 },
679 "2": {
680 "name": "keyword.operator.nim"
681 }
682 },
683 "end": "\\}",
684 "patterns": [
685 {
686 "include": "source.nim"
687 }
688 ]
689 },
690 {
691 "begin": "(?<!\\$)(\\$)(for|while|case|of|when|if|else|elif)( )",
692 "captures": {
693 "1": {
694 "name": "keyword.operator.nim"
695 },
696 "2": {
697 "name": "keyword.operator.nim"
698 }
699 },
700 "end": "(\\{|\\n)",
701 "endCaptures": {
702 "1": {
703 "name": "plain"
704 }
705 },
706 "patterns": [
707 {
708 "include": "source.nim"
709 }
710 ]
711 },
712 {
713 "match": "(?<!\\$)(\\$\\w+)",
714 "name": "keyword.operator.nim"
715 },
716 {
717 "include": "source.js"
718 }
719 ]
720 }
721 ]
722 },
723 {
724 "begin": "(^\\s*)?(?=css\"\"\")",
725 "beginCaptures": {
726 "0": {
727 "name": "punctuation.whitespace.embedded.leading.nim"
728 }
729 },
730 "end": "(?!\\G)(\\s*$\\n?)?",
731 "endCaptures": {
732 "0": {
733 "name": "punctuation.whitespace.embedded.trailing.nim"
734 }
735 },
736 "patterns": [
737 {
738 "begin": "(css)(\"\"\")",
739 "captures": {
740 "1": {
741 "name": "keyword.other.nim"
742 },
743 "2": {
744 "name": "punctuation.section.embedded.begin.nim"
745 }
746 },
747 "contentName": "source.css",
748 "end": "(\")\"\"(?!\")",
749 "endCaptures": {
750 "0": {
751 "name": "punctuation.section.embedded.end.nim"
752 },
753 "1": {
754 "name": "source.css"
755 }
756 },
757 "name": "meta.embedded.block.css",
758 "patterns": [
759 {
760 "begin": "(?<!\\$)(\\$)\\(",
761 "captures": {
762 "1": {
763 "name": "keyword.operator.nim"
764 }
765 },
766 "end": "\\)",
767 "patterns": [
768 {
769 "include": "source.nim"
770 }
771 ]
772 },
773 {
774 "begin": "(?<!\\$)(\\$)\\{",
775 "captures": {
776 "1": {
777 "name": "keyword.operator.nim"
778 },
779 "2": {
780 "name": "keyword.operator.nim"
781 }
782 },
783 "end": "\\}",
784 "patterns": [
785 {
786 "include": "source.nim"
787 }
788 ]
789 },
790 {
791 "begin": "(?<!\\$)(\\$)(for|while|case|of|when|if|else|elif)( )",
792 "captures": {
793 "1": {
794 "name": "keyword.operator.nim"
795 },
796 "2": {
797 "name": "keyword.operator.nim"
798 }
799 },
800 "end": "(\\{|\\n)",
801 "endCaptures": {
802 "1": {
803 "name": "plain"
804 }
805 },
806 "patterns": [
807 {
808 "include": "source.nim"
809 }
810 ]
811 },
812 {
813 "match": "(?<!\\$)(\\$\\w+)",
814 "name": "keyword.operator.nim"
815 },
816 {
817 "include": "source.css"
818 }
819 ]
820 }
821 ]
822 },
823 {
824 "begin": "(^\\s*)?(?=glsl\"\"\")",
825 "beginCaptures": {
826 "0": {
827 "name": "punctuation.whitespace.embedded.leading.nim"
828 }
829 },
830 "end": "(?!\\G)(\\s*$\\n?)?",
831 "endCaptures": {
832 "0": {
833 "name": "punctuation.whitespace.embedded.trailing.nim"
834 }
835 },
836 "patterns": [
837 {
838 "begin": "(glsl)(\"\"\")",
839 "captures": {
840 "1": {
841 "name": "keyword.other.nim"
842 },
843 "2": {
844 "name": "punctuation.section.embedded.begin.nim"
845 }
846 },
847 "contentName": "source.glsl",
848 "end": "(\")\"\"(?!\")",
849 "endCaptures": {
850 "0": {
851 "name": "punctuation.section.embedded.end.nim"
852 },
853 "1": {
854 "name": "source.glsl"
855 }
856 },
857 "name": "meta.embedded.block.glsl",
858 "patterns": [
859 {
860 "begin": "(?<!\\$)(\\$)\\(",
861 "captures": {
862 "1": {
863 "name": "keyword.operator.nim"
864 }
865 },
866 "end": "\\)",
867 "patterns": [
868 {
869 "include": "source.nim"
870 }
871 ]
872 },
873 {
874 "begin": "(?<!\\$)(\\$)\\{",
875 "captures": {
876 "1": {
877 "name": "keyword.operator.nim"
878 },
879 "2": {
880 "name": "keyword.operator.nim"
881 }
882 },
883 "end": "\\}",
884 "patterns": [
885 {
886 "include": "source.nim"
887 }
888 ]
889 },
890 {
891 "begin": "(?<!\\$)(\\$)(for|while|case|of|when|if|else|elif)( )",
892 "captures": {
893 "1": {
894 "name": "keyword.operator.nim"
895 },
896 "2": {
897 "name": "keyword.operator.nim"
898 }
899 },
900 "end": "(\\{|\\n)",
901 "endCaptures": {
902 "1": {
903 "name": "plain"
904 }
905 },
906 "patterns": [
907 {
908 "include": "source.nim"
909 }
910 ]
911 },
912 {
913 "match": "(?<!\\$)(\\$\\w+)",
914 "name": "keyword.operator.nim"
915 },
916 {
917 "include": "source.glsl"
918 }
919 ]
920 }
921 ]
922 },
923 {
924 "begin": "(^\\s*)?(?=md\"\"\")",
925 "beginCaptures": {
926 "0": {
927 "name": "punctuation.whitespace.embedded.leading.nim"
928 }
929 },
930 "end": "(?!\\G)(\\s*$\\n?)?",
931 "endCaptures": {
932 "0": {
933 "name": "punctuation.whitespace.embedded.trailing.nim"
934 }
935 },
936 "patterns": [
937 {
938 "begin": "(md)(\"\"\")",
939 "captures": {
940 "1": {
941 "name": "keyword.other.nim"
942 },
943 "2": {
944 "name": "punctuation.section.embedded.begin.nim"
945 }
946 },
947 "contentName": "text.html.markdown",
948 "end": "(\")\"\"(?!\")",
949 "endCaptures": {
950 "0": {
951 "name": "punctuation.section.embedded.end.nim"
952 },
953 "1": {
954 "name": "text.html.markdown"
955 }
956 },
957 "name": "meta.embedded.block.html.markdown",
958 "patterns": [
959 {
960 "begin": "(?<!\\$)(\\$)\\(",
961 "captures": {
962 "1": {
963 "name": "keyword.operator.nim"
964 }
965 },
966 "end": "\\)",
967 "patterns": [
968 {
969 "include": "source.nim"
970 }
971 ]
972 },
973 {
974 "begin": "(?<!\\$)(\\$)\\{",
975 "captures": {
976 "1": {
977 "name": "keyword.operator.nim"
978 },
979 "2": {
980 "name": "keyword.operator.nim"
981 }
982 },
983 "end": "\\}",
984 "patterns": [
985 {
986 "include": "source.nim"
987 }
988 ]
989 },
990 {
991 "begin": "(?<!\\$)(\\$)(for|while|case|of|when|if|else|elif)( )",
992 "captures": {
993 "1": {
994 "name": "keyword.operator.nim"
995 },
996 "2": {
997 "name": "keyword.operator.nim"
998 }
999 },
1000 "end": "(\\{|\\n)",
1001 "endCaptures": {
1002 "1": {
1003 "name": "plain"
1004 }
1005 },
1006 "patterns": [
1007 {
1008 "include": "source.nim"
1009 }
1010 ]
1011 },
1012 {
1013 "match": "(?<!\\$)(\\$\\w+)",
1014 "name": "keyword.operator.nim"
1015 },
1016 {
1017 "include": "text.html.markdown"
1018 }
1019 ]
1020 }
1021 ]
1022 }
1023 ],
1024 "repository": {
1025 "multilinecomment": {
1026 "begin": "#\\[",
1027 "end": "\\]#",
1028 "patterns": [
1029 {
1030 "include": "#multilinecomment"
1031 }
1032 ]
1033 },
1034 "multilinedoccomment": {
1035 "begin": "##\\[",
1036 "end": "\\]##",
1037 "patterns": [
1038 {
1039 "include": "#multilinedoccomment"
1040 }
1041 ]
1042 },
1043 "char_escapes": {
1044 "patterns": [
1045 {
1046 "match": "\\\\[cC]|\\\\[rR]",
1047 "name": "constant.character.escape.carriagereturn.nim"
1048 },
1049 {
1050 "match": "\\\\[lL]|\\\\[nN]",
1051 "name": "constant.character.escape.linefeed.nim"
1052 },
1053 {
1054 "match": "\\\\[fF]",
1055 "name": "constant.character.escape.formfeed.nim"
1056 },
1057 {
1058 "match": "\\\\[tT]",
1059 "name": "constant.character.escape.tabulator.nim"
1060 },
1061 {
1062 "match": "\\\\[vV]",
1063 "name": "constant.character.escape.verticaltabulator.nim"
1064 },
1065 {
1066 "match": "\\\\\\\"",
1067 "name": "constant.character.escape.double-quote.nim"
1068 },
1069 {
1070 "match": "\\\\'",
1071 "name": "constant.character.escape.single-quote.nim"
1072 },
1073 {
1074 "match": "\\\\[0-9]+",
1075 "name": "constant.character.escape.chardecimalvalue.nim"
1076 },
1077 {
1078 "match": "\\\\[aA]",
1079 "name": "constant.character.escape.alert.nim"
1080 },
1081 {
1082 "match": "\\\\[bB]",
1083 "name": "constant.character.escape.backspace.nim"
1084 },
1085 {
1086 "match": "\\\\[eE]",
1087 "name": "constant.character.escape.escape.nim"
1088 },
1089 {
1090 "match": "\\\\[xX]\\h\\h",
1091 "name": "constant.character.escape.hex.nim"
1092 },
1093 {
1094 "match": "\\\\\\\\",
1095 "name": "constant.character.escape.backslash.nim"
1096 }
1097 ]
1098 },
1099 "string_escapes": {
1100 "patterns": [
1101 {
1102 "match": "\\\\[pP]",
1103 "name": "constant.character.escape.newline.nim"
1104 },
1105 {
1106 "match": "\\\\[uU]\\h\\h\\h\\h",
1107 "name": "constant.character.escape.hex.nim"
1108 },
1109 {
1110 "match": "\\\\[uU]\\{\\h+\\}",
1111 "name": "constant.character.escape.hex.nim"
1112 },
1113 {
1114 "include": "#char_escapes"
1115 }
1116 ]
1117 },
1118 "raw_string_escapes": {
1119 "match": "[^\"](\"\")",
1120 "captures": {
1121 "1": {
1122 "name": "constant.character.escape.double-quote.nim"
1123 }
1124 }
1125 },
1126 "fmt_interpolation": {
1127 "begin": "\\{",
1128 "beginCaptures": {
1129 "0": {
1130 "name": "punctuation.definition.template-expression.begin.nim"
1131 }
1132 },
1133 "end": "\\}",
1134 "endCaptures": {
1135 "0": {
1136 "name": "punctuation.definition.template-expression.end.nim"
1137 }
1138 },
1139 "patterns": [
1140 {
1141 "begin": ":",
1142 "end": "(?=\\})",
1143 "name": "meta.template.format-specifier.nim"
1144 },
1145 {
1146 "include": "source.nim"
1147 }
1148 ],
1149 "name": "meta.template.expression.nim"
1150 },
1151 "string_literal": {
1152 "patterns": [
1153 {
1154 "include": "#fmt_string_triple"
1155 },
1156 {
1157 "include": "#fmt_string_triple_operator"
1158 },
1159 {
1160 "include": "#extended_string_quoted_triple_raw"
1161 },
1162 {
1163 "include": "#string_quoted_triple_raw"
1164 },
1165 {
1166 "include": "#fmt_string_operator"
1167 },
1168 {
1169 "include": "#fmt_string"
1170 },
1171 {
1172 "include": "#fmt_string_call"
1173 },
1174 {
1175 "include": "#string_quoted_double_raw"
1176 },
1177 {
1178 "include": "#extended_string_quoted_double_raw"
1179 },
1180 {
1181 "include": "#string_quoted_single"
1182 },
1183 {
1184 "include": "#string_quoted_triple"
1185 },
1186 {
1187 "include": "#string_quoted_double"
1188 }
1189 ]
1190 },
1191 "fmt_string": {
1192 "begin": "\\b(fmt)(\")",
1193 "beginCaptures": {
1194 "1": {
1195 "name": "support.function.any-method.nim"
1196 },
1197 "2": {
1198 "name": "punctuation.definition.string.begin.nim"
1199 }
1200 },
1201 "end": "\"",
1202 "endCaptures": {
1203 "0": {
1204 "name": "punctuation.definition.string.end.nim"
1205 }
1206 },
1207 "name": "string.quoted.double.raw.nim",
1208 "patterns": [
1209 {
1210 "match": "(?<!\")\"(?!\")",
1211 "name": "invalid.illegal.nim"
1212 },
1213 {
1214 "include": "#raw_string_escapes"
1215 },
1216 {
1217 "include": "#fmt_interpolation"
1218 }
1219 ]
1220 },
1221 "fmt_string_triple": {
1222 "begin": "\\b(fmt)(\"\"\")",
1223 "beginCaptures": {
1224 "1": {
1225 "name": "support.function.any-method.nim"
1226 },
1227 "2": {
1228 "name": "punctuation.definition.string.begin.nim"
1229 }
1230 },
1231 "end": "\"\"\"",
1232 "endCaptures": {
1233 "0": {
1234 "name": "punctuation.definition.string.end.nim"
1235 }
1236 },
1237 "name": "string.quoted.triple.raw.nim",
1238 "patterns": [
1239 {
1240 "include": "#fmt_interpolation"
1241 }
1242 ]
1243 },
1244 "fmt_string_operator": {
1245 "begin": "(&)(\")",
1246 "beginCaptures": {
1247 "1": {
1248 "name": "keyword.operator.nim"
1249 },
1250 "2": {
1251 "name": "punctuation.definition.string.begin.nim"
1252 }
1253 },
1254 "end": "\"",
1255 "endCaptures": {
1256 "0": {
1257 "name": "punctuation.definition.string.end.nim"
1258 }
1259 },
1260 "name": "string.quoted.double.nim",
1261 "patterns": [
1262 {
1263 "match": "\"",
1264 "name": "invalid.illegal.nim"
1265 },
1266 {
1267 "include": "#string_escapes"
1268 },
1269 {
1270 "include": "#fmt_interpolation"
1271 }
1272 ]
1273 },
1274 "fmt_string_triple_operator": {
1275 "begin": "(&)(\"\"\")",
1276 "beginCaptures": {
1277 "1": {
1278 "name": "keyword.operator.nim"
1279 },
1280 "2": {
1281 "name": "punctuation.definition.string.begin.nim"
1282 }
1283 },
1284 "end": "\"\"\"",
1285 "endCaptures": {
1286 "0": {
1287 "name": "punctuation.definition.string.end.nim"
1288 }
1289 },
1290 "name": "string.quoted.triple.raw.nim",
1291 "patterns": [
1292 {
1293 "include": "#fmt_interpolation"
1294 }
1295 ]
1296 },
1297 "fmt_string_call": {
1298 "begin": "(fmt)\\((?=\")",
1299 "beginCaptures": {
1300 "1": {
1301 "name": "support.function.any-method.nim"
1302 }
1303 },
1304 "end": "\\)",
1305 "patterns": [
1306 {
1307 "begin": "\"",
1308 "beginCaptures": {
1309 "0": {
1310 "name": "punctuation.definition.string.begin.nim"
1311 }
1312 },
1313 "end": "\"(?=\\))",
1314 "endCaptures": {
1315 "0": {
1316 "name": "punctuation.definition.string.end.nim"
1317 }
1318 },
1319 "name": "string.quoted.double.nim",
1320 "patterns": [
1321 {
1322 "match": "\"",
1323 "name": "invalid.illegal.nim"
1324 },
1325 {
1326 "include": "#string_escapes"
1327 },
1328 {
1329 "include": "#fmt_interpolation"
1330 }
1331 ]
1332 }
1333 ]
1334 },
1335 "string_quoted_double": {
1336 "begin": "\"",
1337 "beginCaptures": {
1338 "0": {
1339 "name": "punctuation.definition.string.begin.nim"
1340 }
1341 },
1342 "comment": "Double Quoted String",
1343 "end": "\"",
1344 "endCaptures": {
1345 "0": {
1346 "name": "punctuation.definition.string.end.nim"
1347 }
1348 },
1349 "name": "string.quoted.double.nim",
1350 "patterns": [
1351 {
1352 "include": "#string_escapes"
1353 }
1354 ]
1355 },
1356 "string_quoted_double_raw": {
1357 "begin": "\\br\"",
1358 "beginCaptures": {
1359 "0": {
1360 "name": "punctuation.definition.string.begin.nim"
1361 }
1362 },
1363 "end": "\"",
1364 "endCaptures": {
1365 "0": {
1366 "name": "punctuation.definition.string.end.nim"
1367 }
1368 },
1369 "name": "string.quoted.double.raw.nim",
1370 "patterns": [
1371 {
1372 "include": "#raw_string_escapes"
1373 }
1374 ]
1375 },
1376 "extended_string_quoted_double_raw": {
1377 "begin": "\\b(\\w+)(\")",
1378 "beginCaptures": {
1379 "1": {
1380 "name": "support.function.any-method.nim"
1381 },
1382 "2": {
1383 "name": "punctuation.definition.string.begin.nim"
1384 }
1385 },
1386 "end": "\"",
1387 "endCaptures": {
1388 "0": {
1389 "name": "punctuation.definition.string.end.nim"
1390 }
1391 },
1392 "name": "string.quoted.double.raw.nim",
1393 "patterns": [
1394 {
1395 "include": "#raw_string_escapes"
1396 }
1397 ]
1398 },
1399 "string_quoted_single": {
1400 "begin": "'",
1401 "beginCaptures": {
1402 "0": {
1403 "name": "punctuation.definition.string.begin.nim"
1404 }
1405 },
1406 "comment": "Single quoted character literal",
1407 "end": "'",
1408 "endCaptures": {
1409 "0": {
1410 "name": "punctuation.definition.string.end.nim"
1411 }
1412 },
1413 "name": "string.quoted.single.nim",
1414 "patterns": [
1415 {
1416 "include": "#char_escapes"
1417 },
1418 {
1419 "match": "([^']{2,}?)",
1420 "name": "invalid.illegal.character.nim"
1421 }
1422 ]
1423 },
1424 "string_quoted_triple": {
1425 "begin": "\"\"\"",
1426 "beginCaptures": {
1427 "0": {
1428 "name": "punctuation.definition.string.begin.nim"
1429 }
1430 },
1431 "comment": "Triple Quoted String",
1432 "end": "\"\"\"(?!\")",
1433 "endCaptures": {
1434 "0": {
1435 "name": "punctuation.definition.string.end.nim"
1436 }
1437 },
1438 "name": "string.quoted.triple.nim"
1439 },
1440 "string_quoted_triple_raw": {
1441 "begin": "r\"\"\"",
1442 "beginCaptures": {
1443 "0": {
1444 "name": "punctuation.definition.string.begin.nim"
1445 }
1446 },
1447 "comment": "Raw Triple Quoted String",
1448 "end": "\"\"\"",
1449 "endCaptures": {
1450 "0": {
1451 "name": "punctuation.definition.string.end.nim"
1452 }
1453 },
1454 "name": "string.quoted.triple.raw.nim"
1455 },
1456 "extended_string_quoted_triple_raw": {
1457 "begin": "\\b(\\w+)(\"\"\")",
1458 "beginCaptures": {
1459 "1": {
1460 "name": "support.function.any-method.nim"
1461 },
1462 "2": {
1463 "name": "punctuation.definition.string.begin.nim"
1464 }
1465 },
1466 "end": "\"\"\"",
1467 "endCaptures": {
1468 "0": {
1469 "name": "punctuation.definition.string.end.nim"
1470 }
1471 },
1472 "name": "string.quoted.triple.raw.nim"
1473 },
1474 "float_literal": {
1475 "patterns": [
1476 {
1477 "match": "\\b\\d[_\\d]*((\\.\\d[_\\d]*([eE][\\+\\-]?\\d[_\\d]*)?)|([eE][\\+\\-]?\\d[_\\d]*))('([fF](32|64|128)|[fFdD]))?",
1478 "name": "constant.numeric.float.decimal.nim"
1479 },
1480 {
1481 "match": "\\b0[xX]\\h[_\\h]*'([fF](32|64|128)|[fFdD])",
1482 "name": "constant.numeric.float.hexadecimal.nim"
1483 },
1484 {
1485 "match": "\\b0o[0-7][_0-7]*'([fF](32|64|128)|[fFdD])",
1486 "name": "constant.numeric.float.octal.nim"
1487 },
1488 {
1489 "match": "\\b0(b|B)[01][_01]*'([fF](32|64|128)|[fFdD])",
1490 "name": "constant.numeric.float.binary.nim"
1491 },
1492 {
1493 "match": "\\b(\\d[_\\d]*)'([fF](32|64|128)|[fFdD])",
1494 "name": "constant.numeric.float.decimal.nim"
1495 }
1496 ]
1497 },
1498 "integer_literal": {
1499 "patterns": [
1500 {
1501 "match": "\\b(0[xX]\\h[_\\h]*)('(([iIuU](8|16|32|64))|[uU]))?",
1502 "name": "constant.numeric.integer.hexadecimal.nim"
1503 },
1504 {
1505 "match": "\\b(0o[0-7][_0-7]*)('(([iIuU](8|16|32|64))|[uU]))?",
1506 "name": "constant.numeric.integer.octal.nim"
1507 },
1508 {
1509 "match": "\\b(0(b|B)[01][_01]*)('(([iIuU](8|16|32|64))|[uU]))?",
1510 "name": "constant.numeric.integer.binary.nim"
1511 },
1512 {
1513 "match": "\\b(\\d[_\\d]*)('(([iIuU](8|16|32|64))|[uU]))?",
1514 "name": "constant.numeric.integer.decimal.nim"
1515 }
1516 ]
1517 }
1518 },
1519 "scopeName": "source.nim",
1520 "uuid": "6DD62CE8-B129-4554-BD8E-CE5DB490E5A4"
1521 }
1522