PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.13.0
Code Block Pro – Beautiful Syntax Highlighting v1.13.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 / imba.tmLanguage.json

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

2,694 lines 78.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {
2 "name": "imba",
3 "scopeName": "source.imba",
4 "fileTypes": ["imba", "imba2"],
5 "uuid": "ef98eb90-bf9b-11e4-bb52-0800200c9a67",
6 "patterns": [
7 {
8 "include": "#root"
9 },
10 {
11 "name": "comment.line.shebang.imba",
12 "match": "\\A(#!).*(?=$)",
13 "captures": {
14 "1": {
15 "name": "punctuation.definition.comment.imba"
16 }
17 }
18 }
19 ],
20 "repository": {
21 "root": {
22 "patterns": [
23 {
24 "include": "#block"
25 }
26 ]
27 },
28 "block": {
29 "patterns": [
30 {
31 "include": "#style-declaration"
32 },
33 {
34 "include": "#object-keys"
35 },
36 {
37 "include": "#tag-literal"
38 },
39 {
40 "include": "#regex"
41 },
42 {
43 "include": "#keywords"
44 },
45 {
46 "include": "#comment"
47 },
48 {
49 "include": "#literal"
50 },
51 {
52 "include": "#plain-identifiers"
53 },
54 {
55 "include": "#plain-accessors"
56 },
57 {
58 "include": "#pairs"
59 },
60 {
61 "include": "#invalid-indentation"
62 }
63 ]
64 },
65 "expr": {
66 "patterns": [
67 {
68 "include": "#style-declaration"
69 },
70 {
71 "include": "#object-keys"
72 },
73 {
74 "include": "#tag-literal"
75 },
76 {
77 "include": "#regex"
78 },
79 {
80 "include": "#keywords"
81 },
82 {
83 "include": "#comment"
84 },
85 {
86 "include": "#literal"
87 },
88 {
89 "include": "#plain-identifiers"
90 },
91 {
92 "include": "#plain-accessors"
93 },
94 {
95 "include": "#pairs"
96 }
97 ]
98 },
99 "literal": {
100 "patterns": [
101 {
102 "include": "#number-with-unit-literal"
103 },
104 {
105 "include": "#numeric-literal"
106 },
107 {
108 "include": "#boolean-literal"
109 },
110 {
111 "include": "#null-literal"
112 },
113 {
114 "include": "#undefined-literal"
115 },
116 {
117 "include": "#numericConstant-literal"
118 },
119 {
120 "include": "#this-literal"
121 },
122 {
123 "include": "#global-literal"
124 },
125 {
126 "include": "#super-literal"
127 },
128 {
129 "include": "#type-literal"
130 },
131 {
132 "include": "#string"
133 }
134 ]
135 },
136 "pairs": {
137 "patterns": [
138 {
139 "include": "#curly-braces"
140 },
141 {
142 "include": "#square-braces"
143 },
144 {
145 "include": "#round-braces"
146 }
147 ]
148 },
149 "curly-braces": {
150 "begin": "\\s*(\\{)",
151 "beginCaptures": {
152 "1": {
153 "name": "meta.brace.curly.imba"
154 }
155 },
156 "end": "\\}",
157 "endCaptures": {
158 "0": {
159 "name": "meta.brace.curly.imba"
160 }
161 },
162 "patterns": [
163 {
164 "include": "#expr"
165 },
166 {
167 "include": "#punctuation-comma"
168 }
169 ]
170 },
171 "square-braces": {
172 "begin": "\\s*(\\[)",
173 "beginCaptures": {
174 "1": {
175 "name": "meta.brace.square.imba"
176 }
177 },
178 "end": "\\]",
179 "endCaptures": {
180 "0": {
181 "name": "meta.brace.square.imba"
182 }
183 },
184 "patterns": [
185 {
186 "include": "#expr"
187 },
188 {
189 "include": "#punctuation-comma"
190 }
191 ]
192 },
193 "round-braces": {
194 "begin": "\\s*(\\()",
195 "beginCaptures": {
196 "1": {
197 "name": "meta.brace.round.imba"
198 }
199 },
200 "end": "\\)",
201 "endCaptures": {
202 "0": {
203 "name": "meta.brace.round.imba"
204 }
205 },
206 "patterns": [
207 {
208 "include": "#expr"
209 },
210 {
211 "include": "#punctuation-comma"
212 }
213 ]
214 },
215 "keywords": {
216 "patterns": [
217 {
218 "name": "keyword.control.imba",
219 "match": "(if|elif|else|unless|switch|when|then|do|import|export|for own|for|while|until|return|try|catch|await|finally|throw|as|continue|break|extend|augment)(?![_\\-$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
220 },
221 {
222 "name": "keyword.control.imba",
223 "match": "(?<=export\\s+)(default)(?![_\\-$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
224 },
225 {
226 "name": "keyword.control.imba",
227 "match": "(?<=import\\s+)(type)(?=\\s+[\\w\\{\\$\\_])"
228 },
229 {
230 "name": "keyword.control.imba",
231 "match": "(extend)\\s+(?=class|tag)"
232 },
233 {
234 "name": "keyword.control.imba",
235 "match": "(?<=[\\*\\}\\w\\$]\\s+)(from)(?=\\s+[\\\"\\'])"
236 },
237 {
238 "name": "storage.type.function.imba",
239 "match": "(def|get|set)(?![_\\-$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
240 },
241 {
242 "name": "storage.type.class.imba",
243 "match": "(tag|class|struct)(?![_\\-$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
244 },
245 {
246 "name": "storage.type.imba",
247 "match": "(let|const|constructor)(?![_\\-$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
248 },
249 {
250 "name": "storage.type.imba",
251 "match": "(prop|attr)(?![_\\-$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
252 },
253 {
254 "name": "storage.modifier.imba",
255 "match": "(static)\\s+"
256 },
257 {
258 "include": "#ops"
259 },
260 {
261 "name": "keyword.operator.assignment.imba",
262 "match": "(=|\\|\\|=|\\?\\?=|\\&\\&=|\\+=|\\-=|\\*=|\\^=|\\%=)"
263 },
264 {
265 "name": "keyword.operator.imba",
266 "match": "(\\>\\=?|\\<\\=?)"
267 },
268 {
269 "name": "keyword.operator.imba",
270 "match": "(of|delete|\\!?isa|typeof|in|new)(?![_\\-$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
271 }
272 ]
273 },
274 "ops": {
275 "patterns": [
276 {
277 "name": "keyword.operator.spread.imba",
278 "match": "\\.\\.\\."
279 },
280 {
281 "name": "keyword.operator.assignment.compound.imba",
282 "match": "\\*=|(?<!\\()/=|%=|\\+=|\\-=|\\?=|\\?\\?=|=\\?"
283 },
284 {
285 "name": "keyword.operator.assignment.compound.bitwise.imba",
286 "match": "\\^=\\?|\\|=\\?|\\~=\\?|\\&=|\\^=|<<=|>>=|>>>=|\\|="
287 },
288 {
289 "name": "keyword.operator.bitwise.shift.imba",
290 "match": "<<|>>>|>>"
291 },
292 {
293 "name": "keyword.operator.comparison.imba",
294 "match": "===|!==|==|!=|~="
295 },
296 {
297 "name": "keyword.operator.relational.imba",
298 "match": "<=|>=|<>|<|>"
299 },
300 {
301 "match": "(\\!)\\s*(/)(?![/*])",
302 "captures": {
303 "1": {
304 "name": "keyword.operator.logical.imba"
305 },
306 "2": {
307 "name": "keyword.operator.arithmetic.imba"
308 }
309 }
310 },
311 {
312 "name": "keyword.operator.logical.imba",
313 "match": "\\!|&&|\\|\\||\\?\\?|or\\b(?=\\s|$)|and\\b(?=\\s|$)"
314 },
315 {
316 "name": "keyword.operator.bitwise.imba",
317 "match": "\\&|~|\\^|\\|"
318 },
319 {
320 "name": "keyword.operator.assignment.imba",
321 "match": "\\="
322 },
323 {
324 "name": "keyword.operator.decrement.imba",
325 "match": "--"
326 },
327 {
328 "name": "keyword.operator.increment.imba",
329 "match": "\\+\\+"
330 },
331 {
332 "name": "keyword.operator.arithmetic.imba",
333 "match": "%|\\*|/|-|\\+"
334 }
335 ]
336 },
337 "object-keys": {
338 "patterns": [
339 {
340 "match": "[_$[:alpha:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\?\\!]?\\:",
341 "name": "meta.object-literal.key"
342 }
343 ]
344 },
345 "invalid-indentation": {
346 "patterns": [
347 {
348 "name": "invalid.whitespace",
349 "match": "^[\\ ]+"
350 },
351 {
352 "name": "invalid.whitespace",
353 "match": "^\\t+\\s+"
354 }
355 ]
356 },
357 "style-property": {
358 "patterns": [
359 {
360 "name": "meta.property-name.css",
361 "begin": "(?=(?:[\\@\\.]+[\\!\\<\\>]?)?[\\w\\-\\$]+(?:[\\@\\.]+[\\!\\<\\>]?[\\w\\-\\$]+)*(?:\\s*\\:))",
362 "beginCaptures": {
363 "1": {
364 "name": "support.function.calc.css"
365 },
366 "2": {
367 "name": "punctuation.section.function.begin.bracket.round.css"
368 }
369 },
370 "end": "\\s*\\:",
371 "endCaptures": {
372 "0": {
373 "name": "punctuation.separator.key-value.css"
374 }
375 },
376 "patterns": [
377 {
378 "name": "support.type.property-name.variable.css",
379 "match": "(?:--|\\$)[\\w\\-\\$]+"
380 },
381 {
382 "name": "support.type.property-name.modifier.breakpoint.css",
383 "match": "\\@[\\!\\<\\>]?[0-9]+"
384 },
385 {
386 "name": "support.type.property-name.modifier.css",
387 "match": "\\@[\\w\\-\\$]+"
388 },
389 {
390 "name": "support.type.property-name.modifier.up.css",
391 "match": "\\.\\.[\\w\\-\\$]+"
392 },
393 {
394 "name": "support.type.property-name.modifier.is.css",
395 "match": "\\.[\\w\\-\\$]+"
396 },
397 {
398 "name": "support.type.property-name.css",
399 "match": "[\\w\\-\\$]+"
400 }
401 ]
402 }
403 ]
404 },
405 "style-expr": {
406 "patterns": [
407 {
408 "match": "(\\b[0-9][0-9_]*)(\\w+|%)?",
409 "captures": {
410 "1": {
411 "name": "constant.numeric.integer.decimal.css"
412 },
413 "2": {
414 "name": "keyword.other.unit.css"
415 }
416 }
417 },
418 {
419 "name": "support.constant.property-value.var.css",
420 "match": "--[_$[:alpha:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\?\\!]?"
421 },
422 {
423 "name": "support.constant.property-value.size.css",
424 "match": "(x+s|sm-|md-|lg-|sm|md|lg|x+l|hg|x+h)(?![\\w-])"
425 },
426 {
427 "name": "support.constant.property-value.css",
428 "match": "[_$[:alpha:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\?\\!]?"
429 },
430 {
431 "name": "meta.function.css",
432 "begin": "(\\()",
433 "beginCaptures": {
434 "1": {
435 "name": "punctuation.section.function.begin.bracket.round.css"
436 }
437 },
438 "end": "\\)",
439 "patterns": [
440 {
441 "include": "#style-expr"
442 }
443 ]
444 }
445 ]
446 },
447 "inline-styles": {
448 "patterns": [
449 {
450 "include": "#style-property"
451 },
452 {
453 "include": "#css-property-values"
454 },
455 {
456 "include": "#style-expr"
457 }
458 ]
459 },
460 "style-declaration": {
461 "name": "meta.style.imba",
462 "begin": "^(\\t*)(?:(global|local|export)\\s+)?(?:(scoped)\\s+)?(css)\\s",
463 "beginCaptures": {
464 "2": {
465 "name": "keyword.control.export.imba"
466 },
467 "3": {
468 "name": "storage.modifier.imba"
469 },
470 "4": {
471 "name": "storage.type.style.imba"
472 }
473 },
474 "end": "^(?!(\\1\\t|\\s*$))",
475 "patterns": [
476 {
477 "include": "#css-selector"
478 },
479 {
480 "include": "#css-comment"
481 },
482 {
483 "include": "#nested-css-selector"
484 },
485 {
486 "include": "#inline-styles"
487 }
488 ]
489 },
490 "nested-style-declaration": {
491 "name": "meta.style.imba",
492 "begin": "^(\\t+)(?=[\\n^]*\\&)",
493 "end": "^(?!(\\1\\t|\\s*$))",
494 "patterns": [
495 {
496 "include": "#nested-css-selector"
497 },
498 {
499 "include": "#inline-styles"
500 }
501 ]
502 },
503 "css-size-keywords": [
504 {
505 "name": "support.constant.size.property-value.css",
506 "match": "(x+s|sm-|md-|lg-|sm|md|lg|x+l|hg|x+h)(?![\\w-])"
507 }
508 ],
509 "css-color-keywords": {
510 "patterns": [
511 {
512 "name": "support.constant.color.w3c-standard-color-name.css",
513 "match": "(?i)(?<![\\w-])(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)(?![\\w-])"
514 },
515 {
516 "name": "support.constant.color.w3c-extended-color-name.css",
517 "match": "(?xi) (?<![\\w-])\n(aliceblue|antiquewhite|aquamarine|azure|beige|bisque|blanchedalmond|blueviolet|brown|burlywood\n|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan\n|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange\n|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise\n|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen\n|gainsboro|ghostwhite|gold|goldenrod|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki\n|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow\n|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray\n|lightslategrey|lightsteelblue|lightyellow|limegreen|linen|magenta|mediumaquamarine|mediumblue\n|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise\n|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|oldlace|olivedrab|orangered\n|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum\n|powderblue|rebeccapurple|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell\n|sienna|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|thistle|tomato\n|transparent|turquoise|violet|wheat|whitesmoke|yellowgreen)\n(?![\\w-])"
518 },
519 {
520 "name": "support.constant.color.current.css",
521 "match": "(?i)(?<![\\w-])currentColor(?![\\w-])"
522 }
523 ]
524 },
525 "css-functions": {
526 "patterns": [
527 {
528 "name": "meta.function.calc.css",
529 "begin": "(?i)(?<![\\w-])(calc)(\\()",
530 "beginCaptures": {
531 "1": {
532 "name": "support.function.calc.css"
533 },
534 "2": {
535 "name": "punctuation.section.function.begin.bracket.round.css"
536 }
537 },
538 "end": "\\)",
539 "endCaptures": {
540 "0": {
541 "name": "punctuation.section.function.end.bracket.round.css"
542 }
543 },
544 "patterns": [
545 {
546 "name": "keyword.operator.arithmetic.css",
547 "match": "[*/]|(?<=\\s|^)[-+](?=\\s|$)"
548 },
549 {
550 "include": "#css-property-values"
551 }
552 ]
553 },
554 {
555 "name": "meta.function.color.css",
556 "begin": "(?i)(?<![\\w-])(rgba?|hsla?)(\\()",
557 "beginCaptures": {
558 "1": {
559 "name": "support.function.misc.css"
560 },
561 "2": {
562 "name": "punctuation.section.function.begin.bracket.round.css"
563 }
564 },
565 "end": "\\)",
566 "endCaptures": {
567 "0": {
568 "name": "punctuation.section.function.end.bracket.round.css"
569 }
570 },
571 "patterns": [
572 {
573 "include": "#css-property-values"
574 }
575 ]
576 },
577 {
578 "name": "meta.function.gradient.css",
579 "begin": "(?xi) (?<![\\w-])\n(\n (?:-webkit-|-moz-|-o-)? # Accept prefixed/historical variants\n (?:repeating-)? # \"Repeating\"-type gradient\n (?:linear|radial|conic) # Shape\n -gradient\n)\n(\\()",
580 "beginCaptures": {
581 "1": {
582 "name": "support.function.gradient.css"
583 },
584 "2": {
585 "name": "punctuation.section.function.begin.bracket.round.css"
586 }
587 },
588 "end": "\\)",
589 "endCaptures": {
590 "0": {
591 "name": "punctuation.section.function.end.bracket.round.css"
592 }
593 },
594 "patterns": [
595 {
596 "name": "keyword.operator.gradient.css",
597 "match": "(?i)(?<![\\w-])(from|to|at)(?![\\w-])"
598 },
599 {
600 "include": "#css-property-values"
601 }
602 ]
603 },
604 {
605 "name": "meta.function.gradient.invalid.deprecated.gradient.css",
606 "begin": "(?i)(?<![\\w-])(-webkit-gradient)(\\()",
607 "beginCaptures": {
608 "1": {
609 "name": "invalid.deprecated.gradient.function.css"
610 },
611 "2": {
612 "name": "punctuation.section.function.begin.bracket.round.css"
613 }
614 },
615 "end": "\\)",
616 "endCaptures": {
617 "0": {
618 "name": "punctuation.section.function.end.bracket.round.css"
619 }
620 },
621 "patterns": [
622 {
623 "begin": "(?i)(?<![\\w-])(from|to|color-stop)(\\()",
624 "beginCaptures": {
625 "1": {
626 "name": "invalid.deprecated.function.css"
627 },
628 "2": {
629 "name": "punctuation.section.function.begin.bracket.round.css"
630 }
631 },
632 "end": "\\)",
633 "endCaptures": {
634 "0": {
635 "name": "punctuation.section.function.end.bracket.round.css"
636 }
637 },
638 "patterns": [
639 {
640 "include": "#css-property-values"
641 }
642 ]
643 },
644 {
645 "include": "#css-property-values"
646 }
647 ]
648 },
649 {
650 "name": "meta.function.misc.css",
651 "begin": "(?xi) (?<![\\w-])\n(annotation|attr|blur|brightness|character-variant|contrast|counters?\n|cross-fade|drop-shadow|element|fit-content|format|grayscale|hue-rotate\n|image-set|invert|local|minmax|opacity|ornaments|repeat|saturate|sepia\n|styleset|stylistic|swash|symbols)\n(\\()",
652 "beginCaptures": {
653 "1": {
654 "name": "support.function.misc.css"
655 },
656 "2": {
657 "name": "punctuation.section.function.begin.bracket.round.css"
658 }
659 },
660 "end": "\\)",
661 "endCaptures": {
662 "0": {
663 "name": "punctuation.section.function.end.bracket.round.css"
664 }
665 },
666 "patterns": [
667 {
668 "name": "constant.numeric.other.density.css",
669 "match": "(?i)(?<=[,\\s\"]|\\*/|^)\\d+x(?=[\\s,\"')]|/\\*|$)"
670 },
671 {
672 "include": "#css-property-values"
673 },
674 {
675 "name": "variable.parameter.misc.css",
676 "match": "[^'\"),\\s]+"
677 }
678 ]
679 },
680 {
681 "name": "meta.function.shape.css",
682 "begin": "(?i)(?<![\\w-])(circle|ellipse|inset|polygon|rect)(\\()",
683 "beginCaptures": {
684 "1": {
685 "name": "support.function.shape.css"
686 },
687 "2": {
688 "name": "punctuation.section.function.begin.bracket.round.css"
689 }
690 },
691 "end": "\\)",
692 "endCaptures": {
693 "0": {
694 "name": "punctuation.section.function.end.bracket.round.css"
695 }
696 },
697 "patterns": [
698 {
699 "name": "keyword.operator.shape.css",
700 "match": "(?i)(?<=\\s|^|\\*/)(at|round)(?=\\s|/\\*|$)"
701 },
702 {
703 "include": "#css-property-values"
704 }
705 ]
706 },
707 {
708 "name": "meta.function.timing-function.css",
709 "begin": "(?i)(?<![\\w-])(cubic-bezier|steps)(\\()",
710 "beginCaptures": {
711 "1": {
712 "name": "support.function.timing-function.css"
713 },
714 "2": {
715 "name": "punctuation.section.function.begin.bracket.round.css"
716 }
717 },
718 "end": "\\)",
719 "endCaptures": {
720 "0": {
721 "name": "punctuation.section.function.end.bracket.round.css"
722 }
723 },
724 "patterns": [
725 {
726 "name": "support.constant.step-direction.css",
727 "match": "(?i)(?<![\\w-])(start|end)(?=\\s*\\)|$)"
728 },
729 {
730 "include": "#css-property-values"
731 }
732 ]
733 },
734 {
735 "begin": "(?xi) (?<![\\w-])\n( (?:translate|scale|rotate)(?:[XYZ]|3D)?\n| matrix(?:3D)?\n| skew[XY]?\n| perspective\n)\n(\\()",
736 "beginCaptures": {
737 "1": {
738 "name": "support.function.transform.css"
739 },
740 "2": {
741 "name": "punctuation.section.function.begin.bracket.round.css"
742 }
743 },
744 "end": "\\)",
745 "endCaptures": {
746 "0": {
747 "name": "punctuation.section.function.end.bracket.round.css"
748 }
749 },
750 "patterns": [
751 {
752 "include": "#css-property-values"
753 }
754 ]
755 }
756 ]
757 },
758 "css-numeric-values": {
759 "patterns": [
760 {
761 "name": "constant.other.color.rgb-value.hex.css",
762 "match": "(#)(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})\\b",
763 "captures": {
764 "1": {
765 "name": "punctuation.definition.constant.css"
766 }
767 }
768 },
769 {
770 "name": "constant.numeric.css",
771 "match": "(?xi) (?<![\\w-])\n[-+]? # Sign indicator\n\n(?: # Numerals\n [0-9]+ (?:\\.[0-9]+)? # Integer/float with leading digits\n | \\.[0-9]+ # Float without leading digits\n)\n\n(?: # Scientific notation\n (?<=[0-9]) # Exponent must follow a digit\n E # Exponent indicator\n [-+]? # Possible sign indicator\n [0-9]+ # Exponent value\n)?\n\n(?: # Possible unit for data-type:\n (%) # - Percentage\n | ( deg|grad|rad|turn # - Angle\n | Hz|kHz # - Frequency\n | ch|cm|em|ex|fr|in|mm|mozmm| # - Length\n pc|pt|px|q|rem|vh|vmax|vmin|\n vw\n | dpi|dpcm|dppx # - Resolution\n | s|ms # - Time\n )\n \\b # Boundary checking intentionally lax to\n)? # facilitate embedding in CSS-like grammars",
772 "captures": {
773 "1": {
774 "name": "keyword.other.unit.percentage.css"
775 },
776 "2": {
777 "name": "keyword.other.unit.${2:/downcase}.css"
778 }
779 }
780 }
781 ]
782 },
783 "css-combinators": {
784 "patterns": [
785 {
786 "name": "punctuation.separator.combinator.css",
787 "match": ">>>|>>|>|\\+|~"
788 },
789 {
790 "name": "keyword.other.parent-selector.css",
791 "match": "&"
792 }
793 ]
794 },
795 "css-pseudo-classes": {
796 "name": "entity.other.attribute-name.pseudo-class.css",
797 "match": "(?xi)\n(:)(:*)\n(?: active|any-link|checked|default|defined|disabled|empty|enabled|first\n | (?:first|last|only)-(?:child|of-type)|focus|focus-visible|focus-within\n | fullscreen|host|hover|in-range|indeterminate|invalid|left|link\n | optional|out-of-range|placeholder-shown|read-only|read-write\n | required|right|root|scope|target|unresolved\n | valid|visited\n)(?![\\w-]|\\s*[;}])",
798 "captures": {
799 "1": {
800 "name": "punctuation.definition.entity.css"
801 },
802 "2": {
803 "name": "invalid.illegal.colon.css"
804 }
805 }
806 },
807 "css-pseudo-elements": {
808 "name": "entity.other.attribute-name.pseudo-element.css",
809 "match": "(?xi)\n(?:\n (::?) # Elements using both : and :: notation\n (?: after\n | before\n | first-letter\n | first-line\n | (?:-(?:ah|apple|atsc|epub|hp|khtml|moz\n |ms|o|rim|ro|tc|wap|webkit|xv)\n | (?:mso|prince))\n -[a-z-]+\n )\n |\n (::) # Double-colon only\n (?: backdrop\n | content\n | grammar-error\n | marker\n | placeholder\n | selection\n | shadow\n | spelling-error\n )\n)\n(?![\\w-]|\\s*[;}])",
810 "captures": {
811 "1": {
812 "name": "punctuation.definition.entity.css"
813 },
814 "2": {
815 "name": "punctuation.definition.entity.css"
816 }
817 }
818 },
819 "css-commas": {
820 "name": "punctuation.separator.list.comma.css",
821 "match": ","
822 },
823 "css-comment": {
824 "patterns": [
825 {
826 "name": "comment.line.imba",
827 "match": "\\#(\\s.+)?(\\n|$)"
828 },
829 {
830 "name": "comment.line.imba",
831 "match": "(^\\t+)(\\#(\\s.+)?(\\n|$))"
832 }
833 ]
834 },
835 "css-escapes": {
836 "patterns": [
837 {
838 "name": "constant.character.escape.codepoint.css",
839 "match": "\\\\[0-9a-fA-F]{1,6}"
840 },
841 {
842 "name": "constant.character.escape.newline.css",
843 "begin": "\\\\$\\s*",
844 "end": "^(?<!\\G)"
845 },
846 {
847 "name": "constant.character.escape.css",
848 "match": "\\\\."
849 }
850 ]
851 },
852 "css-selector": {
853 "name": "meta.selector.css",
854 "begin": "(?<=css\\s)(?!(?:[\\@\\.]+[\\!\\<\\>]?)?[\\w\\-\\$]+(?:[\\@\\.]+[\\!\\<\\>]?[\\w\\-\\$]+)*(?:\\s*\\:))",
855 "end": "(\\s*(?=(?:[\\@\\.]+[\\!\\<\\>]?)?[\\w\\-\\$]+(?:[\\@\\.]+[\\!\\<\\>]?[\\w\\-\\$]+)*(?:\\s*\\:))|\\s*$|(?=\\s+\\#\\s))",
856 "endCaptures": {
857 "0": {
858 "name": "punctuation.separator.sel-properties.css"
859 }
860 },
861 "patterns": [
862 {
863 "include": "#css-selector-innards"
864 }
865 ]
866 },
867 "nested-css-selector": {
868 "name": "meta.selector.css",
869 "begin": "(^\\t+)(?!(?:[\\@\\.]+[\\!\\<\\>]?)?[\\w\\-\\$]+(?:[\\@\\.]+[\\!\\<\\>]?[\\w\\-\\$]+)*(?:\\s*\\:))",
870 "end": "(\\s*(?=(?:[\\@\\.]+[\\!\\<\\>]?)?[\\w\\-\\$]+(?:[\\@\\.]+[\\!\\<\\>]?[\\w\\-\\$]+)*(?:\\s*\\:))|\\s*$|(?=\\s+\\#\\s))",
871 "endCaptures": {
872 "0": {
873 "name": "punctuation.separator.sel-properties.css"
874 }
875 },
876 "patterns": [
877 {
878 "include": "#css-selector-innards"
879 }
880 ]
881 },
882 "inline-css-selector": {
883 "name": "meta.selector.css",
884 "begin": "(^\\t+)(?!(?:[\\@\\.]+[\\!\\<\\>]?)?[\\w\\-\\$]+(?:[\\@\\.]+[\\!\\<\\>]?[\\w\\-\\$]+)*(?:\\s*\\:))",
885 "end": "(\\s*(?=(?:[\\@\\.]+[\\!\\<\\>]?)?[\\w\\-\\$]+(?:[\\@\\.]+[\\!\\<\\>]?[\\w\\-\\$]+)*(?:\\s*\\:)|\\)|\\])|\\s*$)",
886 "endCaptures": {
887 "0": {
888 "name": "punctuation.separator.sel-properties.css"
889 }
890 },
891 "patterns": [
892 {
893 "include": "#css-selector-innards"
894 }
895 ]
896 },
897 "css-selector-innards": {
898 "patterns": [
899 {
900 "include": "#css-commas"
901 },
902 {
903 "include": "#css-escapes"
904 },
905 {
906 "include": "#css-combinators"
907 },
908 {
909 "name": "entity.name.tag.wildcard.css",
910 "match": "\\*"
911 },
912 {
913 "name": "meta.attribute-selector.css",
914 "begin": "\\[",
915 "beginCaptures": {
916 "0": {
917 "name": "punctuation.definition.entity.begin.bracket.square.css"
918 }
919 },
920 "end": "\\]",
921 "endCaptures": {
922 "0": {
923 "name": "punctuation.definition.entity.end.bracket.square.css"
924 }
925 },
926 "patterns": [
927 {
928 "include": "#string"
929 },
930 {
931 "match": "(?<=[\"'\\s]|^|\\*/)\\s*([iI])\\s*(?=[\\s\\]]|/\\*|$)",
932 "captures": {
933 "1": {
934 "name": "storage.modifier.ignore-case.css"
935 }
936 }
937 },
938 {
939 "match": "(?x)(?<==)\\s*((?!/\\*)(?:[^\\\\\"'\\s\\]]|\\\\.)+)",
940 "captures": {
941 "1": {
942 "name": "string.unquoted.attribute-value.css"
943 }
944 }
945 },
946 {
947 "include": "#css-escapes"
948 },
949 {
950 "name": "keyword.operator.pattern.css",
951 "match": "[~|^$*]?="
952 },
953 {
954 "name": "punctuation.separator.css",
955 "match": "\\|"
956 },
957 {
958 "match": "(?x)\n# Qualified namespace prefix\n( -?(?!\\d)(?:[\\w-]|[^\\\\x00-\\\\x7F]|\\\\(?:[0-9a-fA-F]{1,6}|.))+\n| \\*\n)\n# Lookahead to ensure there's a valid identifier ahead\n(?=\n \\| (?!\\s|=|$|\\])\n (?: -?(?!\\d)\n | [\\\\\\w-]\n | [^\\\\x00-\\\\x7F]\n )\n)",
959 "captures": {
960 "1": {
961 "name": "entity.other.namespace-prefix.css"
962 }
963 }
964 },
965 {
966 "match": "(?x)\n(-?(?!\\d)(?>[\\w-]|[^\\\\x00-\\\\x7F]|\\\\(?:[0-9a-fA-F]{1,6}|.))+)\n\\s*\n(?=[~|^\\]$*=]|/\\*)",
967 "captures": {
968 "1": {
969 "name": "entity.other.attribute-name.css"
970 }
971 }
972 }
973 ]
974 },
975 {
976 "include": "#css-pseudo-classes"
977 },
978 {
979 "include": "#css-pseudo-elements"
980 }
981 ]
982 },
983 "css-property-values": {
984 "patterns": [
985 {
986 "include": "#css-commas"
987 },
988 {
989 "include": "#css-escapes"
990 },
991 {
992 "include": "#css-functions"
993 },
994 {
995 "include": "#css-numeric-values"
996 },
997 {
998 "include": "#css-size-keywords"
999 },
1000 {
1001 "include": "#css-color-keywords"
1002 },
1003 {
1004 "include": "#string"
1005 },
1006 {
1007 "name": "keyword.other.important.css",
1008 "match": "!\\s*important(?![\\w-])"
1009 }
1010 ]
1011 },
1012 "tag-literal": {
1013 "patterns": [
1014 {
1015 "name": "meta.tag.imba",
1016 "begin": "(<)(?=[\\w\\{\\[\\.\\#\\$\\@])",
1017 "beginCaptures": {
1018 "1": {
1019 "name": "punctuation.section.tag.open.imba"
1020 }
1021 },
1022 "end": "(>)",
1023 "endCaptures": {
1024 "1": {
1025 "name": "punctuation.section.tag.close.imba"
1026 }
1027 },
1028 "patterns": [
1029 {
1030 "include": "#tag-content"
1031 }
1032 ],
1033 "contentName": "meta.tag.attributes.imba"
1034 }
1035 ]
1036 },
1037 "tag-content": {
1038 "patterns": [
1039 {
1040 "include": "#tag-name"
1041 },
1042 {
1043 "include": "#tag-expr-name"
1044 },
1045 {
1046 "include": "#tag-interpolated-content"
1047 },
1048 {
1049 "include": "#tag-interpolated-parens"
1050 },
1051 {
1052 "include": "#tag-interpolated-brackets"
1053 },
1054 {
1055 "include": "#tag-event-handler"
1056 },
1057 {
1058 "include": "#tag-classname"
1059 },
1060 {
1061 "include": "#tag-ref"
1062 },
1063 {
1064 "include": "#tag-attr-value"
1065 },
1066 {
1067 "include": "#tag-attr-name"
1068 },
1069 {
1070 "include": "#comment"
1071 }
1072 ]
1073 },
1074 "tag-name": {
1075 "patterns": [
1076 {
1077 "name": "entity.name.tag.special.imba",
1078 "match": "(?<=<)(self|global|slot)(?=[\\.\\[\\>\\s\\(])"
1079 }
1080 ]
1081 },
1082 "tag-expr-name": {
1083 "begin": "(?<=<)(?=[\\w\\{])",
1084 "contentName": "entity.name.tag.imba",
1085 "end": "(?=[\\.\\[\\>\\s\\(])",
1086 "patterns": [
1087 {
1088 "include": "#tag-interpolated-content"
1089 }
1090 ]
1091 },
1092 "tag-interpolated-content": {
1093 "name": "meta.tag.expression.imba",
1094 "begin": "\\{",
1095 "beginCaptures": {
1096 "0": {
1097 "name": "punctuation.section.tag.imba"
1098 }
1099 },
1100 "end": "\\}",
1101 "endCaptures": {
1102 "0": {
1103 "name": "punctuation.section.tag.imba"
1104 }
1105 },
1106 "patterns": [
1107 {
1108 "include": "#expression"
1109 }
1110 ],
1111 "contentName": "meta.embedded.line.imba"
1112 },
1113 "tag-interpolated-parens": {
1114 "name": "meta.tag.expression.imba",
1115 "begin": "\\(",
1116 "beginCaptures": {
1117 "0": {
1118 "name": "punctuation.section.tag.imba"
1119 }
1120 },
1121 "end": "\\)",
1122 "endCaptures": {
1123 "0": {
1124 "name": "punctuation.section.tag.imba"
1125 }
1126 },
1127 "patterns": [
1128 {
1129 "include": "#expression"
1130 }
1131 ],
1132 "contentName": "meta.embedded.line.imba"
1133 },
1134 "tag-interpolated-brackets": {
1135 "name": "meta.tag.expression.imba",
1136 "begin": "\\[",
1137 "beginCaptures": {
1138 "0": {
1139 "name": "punctuation.section.tag.imba"
1140 }
1141 },
1142 "end": "\\]",
1143 "endCaptures": {
1144 "0": {
1145 "name": "punctuation.section.tag.imba"
1146 }
1147 },
1148 "patterns": [
1149 {
1150 "include": "#inline-css-selector"
1151 },
1152 {
1153 "include": "#inline-styles"
1154 }
1155 ],
1156 "contentName": "meta.embedded.line.imba"
1157 },
1158 "tag-classname": {
1159 "begin": "\\.",
1160 "patterns": [
1161 {
1162 "include": "#tag-interpolated-content"
1163 }
1164 ],
1165 "end": "(?=[\\.\\[\\>\\s\\(\\=])",
1166 "contentName": "entity.other.attribute-name.class.css"
1167 },
1168 "tag-ref": {
1169 "match": "(\\$[_$[:alpha:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\?\\!]?)",
1170 "name": "entity.other.attribute-name.reference.css"
1171 },
1172 "tag-event-handler": {
1173 "begin": "(\\@[\\w$_]+(?:\\-[\\w$_]+)*)",
1174 "beginCaptures": {
1175 "0": {
1176 "name": "entity.other.event-name.imba"
1177 }
1178 },
1179 "patterns": [
1180 {
1181 "include": "#tag-interpolated-content"
1182 },
1183 {
1184 "include": "#tag-interpolated-parens"
1185 },
1186 {
1187 "name": "entity.other.event-modifier.imba",
1188 "begin": "\\.",
1189 "beginCaptures": {
1190 "0": {
1191 "name": "punctuation.section.tag"
1192 }
1193 },
1194 "patterns": [
1195 {
1196 "include": "#tag-interpolated-parens"
1197 },
1198 {
1199 "include": "#tag-interpolated-content"
1200 }
1201 ],
1202 "end": "(?=[\\.\\[\\>\\s\\=]|$)"
1203 }
1204 ],
1205 "end": "(?=[\\[\\>\\s\\=])",
1206 "contentName": "entity.other.tag.event"
1207 },
1208 "tag-attr-name": {
1209 "begin": "([\\w$_]+(?:\\-[\\w$_]+)*)",
1210 "beginCaptures": {
1211 "0": {
1212 "name": "entity.other.attribute-name.imba"
1213 }
1214 },
1215 "end": "(?=[\\s\\.\\[\\>\\=])",
1216 "contentName": "entity.other.attribute-name.imba"
1217 },
1218 "tag-attr-value": {
1219 "begin": "(\\=)",
1220 "beginCaptures": {
1221 "0": {
1222 "name": "keyword.operator.tag.assignment"
1223 }
1224 },
1225 "end": "(?=>|\\s)",
1226 "contentName": "meta.tag.attribute-value.imba",
1227 "patterns": [
1228 {
1229 "include": "#expr"
1230 }
1231 ]
1232 },
1233 "expression": {
1234 "patterns": [
1235 {
1236 "begin": "\\(",
1237 "beginCaptures": {
1238 "0": {
1239 "name": "meta.brace.round.imba"
1240 }
1241 },
1242 "end": "\\)",
1243 "endCaptures": {
1244 "0": {
1245 "name": "meta.brace.round.imba"
1246 }
1247 },
1248 "patterns": [
1249 {
1250 "include": "#expr"
1251 }
1252 ]
1253 },
1254 {
1255 "include": "#tag-literal"
1256 },
1257 {
1258 "include": "#expressionWithoutIdentifiers"
1259 },
1260 {
1261 "include": "#identifiers"
1262 },
1263 {
1264 "include": "#expressionPunctuations"
1265 }
1266 ]
1267 },
1268 "expressionWithoutIdentifiers": {
1269 "patterns": [
1270 {
1271 "include": "#string"
1272 },
1273 {
1274 "include": "#regex"
1275 },
1276 {
1277 "include": "#comment"
1278 },
1279 {
1280 "include": "#function-expression"
1281 },
1282 {
1283 "include": "#class-expression"
1284 },
1285 {
1286 "include": "#ternary-expression"
1287 },
1288 {
1289 "include": "#new-expr"
1290 },
1291 {
1292 "include": "#instanceof-expr"
1293 },
1294 {
1295 "include": "#object-literal"
1296 },
1297 {
1298 "include": "#expression-operators"
1299 },
1300 {
1301 "include": "#literal"
1302 },
1303 {
1304 "include": "#support-objects"
1305 }
1306 ]
1307 },
1308 "expressionPunctuations": {
1309 "patterns": [
1310 {
1311 "include": "#punctuation-comma"
1312 },
1313 {
1314 "include": "#punctuation-accessor"
1315 }
1316 ]
1317 },
1318 "decorator": {
1319 "name": "meta.decorator.imba",
1320 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))\\@(?!\\@)",
1321 "beginCaptures": {
1322 "0": {
1323 "name": "punctuation.decorator.imba"
1324 }
1325 },
1326 "end": "(?=\\s)",
1327 "patterns": [
1328 {
1329 "include": "#expr"
1330 }
1331 ]
1332 },
1333 "array-literal": {
1334 "name": "meta.array.literal.imba",
1335 "begin": "\\s*(\\[)",
1336 "beginCaptures": {
1337 "1": {
1338 "name": "meta.brace.square.imba"
1339 }
1340 },
1341 "end": "\\]",
1342 "endCaptures": {
1343 "0": {
1344 "name": "meta.brace.square.imba"
1345 }
1346 },
1347 "patterns": [
1348 {
1349 "include": "#expr"
1350 },
1351 {
1352 "include": "#punctuation-comma"
1353 }
1354 ]
1355 },
1356 "type-literal": {
1357 "name": "meta.type.annotation.imba",
1358 "begin": "(\\\\)",
1359 "beginCaptures": {
1360 "1": {
1361 "name": "meta.type.annotation.open.imba"
1362 }
1363 },
1364 "end": "(?=[\\s\\]\\)\\,\\.\\=\\}]|$)",
1365 "patterns": [
1366 {
1367 "include": "#type-brackets"
1368 }
1369 ]
1370 },
1371 "type-brackets": {
1372 "patterns": [
1373 {
1374 "begin": "{",
1375 "end": "}",
1376 "patterns": [
1377 {
1378 "include": "#type-brackets"
1379 }
1380 ]
1381 },
1382 {
1383 "begin": "\\[",
1384 "end": "\\]",
1385 "patterns": [
1386 {
1387 "include": "#type-brackets"
1388 }
1389 ]
1390 },
1391 {
1392 "begin": "\\<",
1393 "end": "\\>",
1394 "patterns": [
1395 {
1396 "include": "#type-brackets"
1397 }
1398 ]
1399 },
1400 {
1401 "begin": "\\(",
1402 "end": "\\)",
1403 "patterns": [
1404 {
1405 "include": "#type-brackets"
1406 }
1407 ]
1408 }
1409 ]
1410 },
1411 "numeric-literal": {
1412 "patterns": [
1413 {
1414 "name": "constant.numeric.hex.imba",
1415 "match": "\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$)",
1416 "captures": {
1417 "1": {
1418 "name": "storage.type.numeric.bigint.imba"
1419 }
1420 }
1421 },
1422 {
1423 "name": "constant.numeric.binary.imba",
1424 "match": "\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$)",
1425 "captures": {
1426 "1": {
1427 "name": "storage.type.numeric.bigint.imba"
1428 }
1429 }
1430 },
1431 {
1432 "name": "constant.numeric.octal.imba",
1433 "match": "\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$)",
1434 "captures": {
1435 "1": {
1436 "name": "storage.type.numeric.bigint.imba"
1437 }
1438 }
1439 },
1440 {
1441 "match": "(?x)\n(?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b) # 1\n)(?!\\$)",
1442 "captures": {
1443 "0": {
1444 "name": "constant.numeric.decimal.imba"
1445 },
1446 "1": {
1447 "name": "meta.delimiter.decimal.period.imba"
1448 },
1449 "2": {
1450 "name": "storage.type.numeric.bigint.imba"
1451 },
1452 "3": {
1453 "name": "meta.delimiter.decimal.period.imba"
1454 },
1455 "4": {
1456 "name": "storage.type.numeric.bigint.imba"
1457 },
1458 "5": {
1459 "name": "meta.delimiter.decimal.period.imba"
1460 },
1461 "6": {
1462 "name": "storage.type.numeric.bigint.imba"
1463 },
1464 "7": {
1465 "name": "storage.type.numeric.bigint.imba"
1466 },
1467 "8": {
1468 "name": "meta.delimiter.decimal.period.imba"
1469 },
1470 "9": {
1471 "name": "storage.type.numeric.bigint.imba"
1472 },
1473 "10": {
1474 "name": "meta.delimiter.decimal.period.imba"
1475 },
1476 "11": {
1477 "name": "storage.type.numeric.bigint.imba"
1478 },
1479 "12": {
1480 "name": "meta.delimiter.decimal.period.imba"
1481 },
1482 "13": {
1483 "name": "storage.type.numeric.bigint.imba"
1484 },
1485 "14": {
1486 "name": "storage.type.numeric.bigint.imba"
1487 }
1488 }
1489 }
1490 ]
1491 },
1492 "number-with-unit-literal": {
1493 "patterns": [
1494 {
1495 "match": "([0-9]+)([a-z]+|\\%)",
1496 "captures": {
1497 "1": {
1498 "name": "constant.numeric.imba"
1499 },
1500 "2": {
1501 "name": "keyword.other.unit.imba"
1502 }
1503 }
1504 },
1505 {
1506 "match": "([0-9]*\\.[0-9]+(?:[eE][\\-+]?[0-9]+)?)([a-z]+|\\%)",
1507 "captures": {
1508 "1": {
1509 "name": "constant.numeric.decimal.imba"
1510 },
1511 "2": {
1512 "name": "keyword.other.unit.imba"
1513 }
1514 }
1515 }
1516 ]
1517 },
1518 "boolean-literal": {
1519 "patterns": [
1520 {
1521 "name": "constant.language.boolean.true.imba",
1522 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(true|yes)(?![_\\-$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1523 },
1524 {
1525 "name": "constant.language.boolean.false.imba",
1526 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(false|no)(?![_\\-$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1527 }
1528 ]
1529 },
1530 "null-literal": {
1531 "name": "constant.language.null.imba",
1532 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))null(?![_\\-$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1533 },
1534 "this-literal": {
1535 "name": "variable.language.this.imba",
1536 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(this|self)\\b(?!\\$)"
1537 },
1538 "global-literal": {
1539 "name": "variable.language.global.imba",
1540 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(global)\\b(?!\\$)"
1541 },
1542 "super-literal": {
1543 "name": "variable.language.super.imba",
1544 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))super\\b(?!\\$)"
1545 },
1546 "undefined-literal": {
1547 "name": "constant.language.undefined.imba",
1548 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))undefined(?![_\\-$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1549 },
1550 "numericConstant-literal": {
1551 "patterns": [
1552 {
1553 "name": "constant.language.nan.imba",
1554 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))NaN(?![_\\-$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1555 },
1556 {
1557 "name": "constant.language.infinity.imba",
1558 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Infinity(?![_\\-$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1559 }
1560 ]
1561 },
1562 "plain-identifiers": {
1563 "patterns": [
1564 {
1565 "name": "variable.other.constant.imba",
1566 "match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
1567 },
1568 {
1569 "name": "variable.other.class.imba",
1570 "match": "[[:upper:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\!]?"
1571 },
1572 {
1573 "name": "variable.special.imba",
1574 "match": "\\$\\d+"
1575 },
1576 {
1577 "name": "variable.other.internal.imba",
1578 "match": "\\$[_$[:alpha:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\?\\!]?"
1579 },
1580 {
1581 "name": "variable.other.symbol.imba",
1582 "match": "\\@\\@+[_$[:alpha:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\?\\!]?"
1583 },
1584 {
1585 "name": "variable.other.readwrite.imba",
1586 "match": "[_$[:alpha:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\?\\!]?"
1587 },
1588 {
1589 "name": "variable.other.instance.imba",
1590 "match": "\\@[_$[:alpha:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\?\\!]?"
1591 },
1592 {
1593 "name": "variable.other.private.imba",
1594 "match": "\\#+[_$[:alpha:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\?\\!]?"
1595 },
1596 {
1597 "name": "string.symbol.imba",
1598 "match": "\\:[_$[:alpha:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\?\\!]?"
1599 }
1600 ]
1601 },
1602 "plain-accessors": {
1603 "patterns": [
1604 {
1605 "match": "(\\.\\.?)([_$[:alpha:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\?\\!]?)",
1606 "captures": {
1607 "1": {
1608 "name": "punctuation.accessor.imba"
1609 },
1610 "2": {
1611 "name": "variable.other.property.imba"
1612 }
1613 }
1614 }
1615 ]
1616 },
1617 "identifiers": {
1618 "patterns": [
1619 {
1620 "match": "(?x)(?:(?:(\\.)|(\\.\\.(?!\\s*[[:digit:]]|\\s+)))\\s*)?([_$[:alpha:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\?\\!]?)(?=\\s*={{functionOrArrowLookup}})",
1621 "captures": {
1622 "1": {
1623 "name": "punctuation.accessor.imba"
1624 },
1625 "2": {
1626 "name": "punctuation.accessor.optional.imba"
1627 },
1628 "3": {
1629 "name": "entity.name.function.property.imba"
1630 }
1631 }
1632 },
1633 {
1634 "match": "(?:(\\.)|(\\.\\.(?!\\s*[[:digit:]]|\\s+)))\\s*(\\#?[[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])",
1635 "captures": {
1636 "1": {
1637 "name": "punctuation.accessor.imba"
1638 },
1639 "2": {
1640 "name": "punctuation.accessor.optional.imba"
1641 },
1642 "3": {
1643 "name": "variable.other.constant.property.imba"
1644 }
1645 }
1646 },
1647 {
1648 "match": "(?:(\\.)|(\\.\\.(?!\\s*[[:digit:]]|\\s+)))([[:upper:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\!]?)",
1649 "captures": {
1650 "1": {
1651 "name": "punctuation.accessor.imba"
1652 },
1653 "2": {
1654 "name": "punctuation.accessor.optional.imba"
1655 },
1656 "3": {
1657 "name": "variable.other.class.property.imba"
1658 }
1659 }
1660 },
1661 {
1662 "match": "(?:(\\.)|(\\.\\.(?!\\s*[[:digit:]]|\\s+)))(\\#?[_$[:alpha:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\?\\!]?)",
1663 "captures": {
1664 "1": {
1665 "name": "punctuation.accessor.imba"
1666 },
1667 "2": {
1668 "name": "punctuation.accessor.optional.imba"
1669 },
1670 "3": {
1671 "name": "variable.other.property.imba"
1672 }
1673 }
1674 },
1675 {
1676 "name": "keyword.other",
1677 "match": "(for own|for|if|unless|when)\\b"
1678 },
1679 {
1680 "name": "support.function.require",
1681 "match": "require"
1682 },
1683 {
1684 "include": "#plain-identifiers"
1685 },
1686 {
1687 "include": "#type-literal"
1688 }
1689 ]
1690 },
1691 "type-annotation": {
1692 "patterns": [
1693 {
1694 "include": "#type-literal"
1695 }
1696 ]
1697 },
1698 "punctuation-comma": {
1699 "name": "punctuation.separator.comma.imba",
1700 "match": ","
1701 },
1702 "punctuation-semicolon": {
1703 "name": "punctuation.terminator.statement.imba",
1704 "match": ";"
1705 },
1706 "punctuation-accessor": {
1707 "match": "(?:(\\.)|(\\.\\.(?!\\s*[[:digit:]]|\\s+)))",
1708 "captures": {
1709 "1": {
1710 "name": "punctuation.accessor.imba"
1711 },
1712 "2": {
1713 "name": "punctuation.accessor.optional.imba"
1714 }
1715 }
1716 },
1717 "string": {
1718 "patterns": [
1719 {
1720 "include": "#qstring-single-multi"
1721 },
1722 {
1723 "include": "#qstring-double-multi"
1724 },
1725 {
1726 "include": "#qstring-single"
1727 },
1728 {
1729 "include": "#qstring-double"
1730 },
1731 {
1732 "include": "#template"
1733 }
1734 ]
1735 },
1736 "qstring-double": {
1737 "name": "string.quoted.double.imba",
1738 "begin": "\"",
1739 "beginCaptures": {
1740 "0": {
1741 "name": "punctuation.definition.string.begin.imba"
1742 }
1743 },
1744 "end": "\"",
1745 "endCaptures": {
1746 "0": {
1747 "name": "punctuation.definition.string.end.imba"
1748 }
1749 },
1750 "patterns": [
1751 {
1752 "include": "#template-substitution-element"
1753 },
1754 {
1755 "include": "#string-character-escape"
1756 }
1757 ]
1758 },
1759 "qstring-single": {
1760 "name": "string.quoted.single.imba",
1761 "begin": "'",
1762 "beginCaptures": {
1763 "0": {
1764 "name": "punctuation.definition.string.begin.imba"
1765 }
1766 },
1767 "end": "(\\')|((?:[^\\\\\\n])$)",
1768 "endCaptures": {
1769 "1": {
1770 "name": "punctuation.definition.string.end.imba"
1771 },
1772 "2": {
1773 "name": "invalid.illegal.newline.imba"
1774 }
1775 },
1776 "patterns": [
1777 {
1778 "include": "#string-character-escape"
1779 }
1780 ]
1781 },
1782 "qstring-single-multi": {
1783 "name": "string.quoted.single.imba",
1784 "begin": "'''",
1785 "beginCaptures": {
1786 "0": {
1787 "name": "punctuation.definition.string.begin.imba"
1788 }
1789 },
1790 "end": "'''",
1791 "endCaptures": {
1792 "0": {
1793 "name": "punctuation.definition.string.end.imba"
1794 }
1795 },
1796 "patterns": [
1797 {
1798 "include": "#string-character-escape"
1799 }
1800 ]
1801 },
1802 "string-character-escape": {
1803 "name": "constant.character.escape.imba",
1804 "match": "\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|u\\{[0-9A-Fa-f]+\\}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)"
1805 },
1806 "template": {
1807 "patterns": [
1808 {
1809 "name": "string.template.imba",
1810 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\?\\!]?\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\?\\!]?)({{typeArguments}}\\s*)?`)",
1811 "end": "(?=`)",
1812 "patterns": [
1813 {
1814 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\?\\!]?\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\?\\!]?))",
1815 "end": "(?=({{typeArguments}}\\s*)?`)",
1816 "patterns": [
1817 {
1818 "name": "entity.name.function.tagged-template.imba",
1819 "match": "([_$[:alpha:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\?\\!]?)"
1820 }
1821 ]
1822 }
1823 ]
1824 },
1825 {
1826 "name": "string.template.imba",
1827 "begin": "([_$[:alpha:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\?\\!]?)\\s*(?=({{typeArguments}}\\s*)`)",
1828 "beginCaptures": {
1829 "1": {
1830 "name": "entity.name.function.tagged-template.imba"
1831 }
1832 },
1833 "end": "(?=`)",
1834 "patterns": [
1835 {
1836 "include": "#type-arguments"
1837 }
1838 ]
1839 },
1840 {
1841 "name": "string.template.imba",
1842 "begin": "([_$[:alpha:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\?\\!]?)?(`)",
1843 "beginCaptures": {
1844 "1": {
1845 "name": "entity.name.function.tagged-template.imba"
1846 },
1847 "2": {
1848 "name": "punctuation.definition.string.template.begin.imba"
1849 }
1850 },
1851 "end": "`",
1852 "endCaptures": {
1853 "0": {
1854 "name": "punctuation.definition.string.template.end.imba"
1855 }
1856 },
1857 "patterns": [
1858 {
1859 "include": "#template-substitution-element"
1860 },
1861 {
1862 "include": "#string-character-escape"
1863 }
1864 ]
1865 }
1866 ]
1867 },
1868 "template-substitution-element": {
1869 "name": "meta.template.expression.imba",
1870 "begin": "(?<!\\\\)\\{",
1871 "beginCaptures": {
1872 "0": {
1873 "name": "punctuation.definition.template-expression.begin.imba"
1874 }
1875 },
1876 "end": "\\}",
1877 "endCaptures": {
1878 "0": {
1879 "name": "punctuation.definition.template-expression.end.imba"
1880 }
1881 },
1882 "patterns": [
1883 {
1884 "include": "#expr"
1885 }
1886 ],
1887 "contentName": "meta.embedded.line.imba"
1888 },
1889 "regex": {
1890 "patterns": [
1891 {
1892 "name": "string.regexp.imba",
1893 "begin": "(?<!\\+\\+|--|})(?<=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[\\()]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\]|\\(([^\\)\\\\]|\\\\.)+\\))+\\/([gimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
1894 "beginCaptures": {
1895 "1": {
1896 "name": "punctuation.definition.string.begin.imba"
1897 }
1898 },
1899 "end": "(/)([gimsuy]*)",
1900 "endCaptures": {
1901 "1": {
1902 "name": "punctuation.definition.string.end.imba"
1903 },
1904 "2": {
1905 "name": "keyword.other.imba"
1906 }
1907 },
1908 "patterns": [
1909 {
1910 "include": "#regexp"
1911 }
1912 ]
1913 },
1914 {
1915 "name": "string.regexp.imba",
1916 "begin": "((?<![_$[:alnum:])\\]]|\\+\\+|--|}|\\*\\/)|((?<=^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case))\\s*)\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+\\/([gimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
1917 "beginCaptures": {
1918 "0": {
1919 "name": "punctuation.definition.string.begin.imba"
1920 }
1921 },
1922 "end": "(/)([gimsuy]*)",
1923 "endCaptures": {
1924 "1": {
1925 "name": "punctuation.definition.string.end.imba"
1926 },
1927 "2": {
1928 "name": "keyword.other.imba"
1929 }
1930 },
1931 "patterns": [
1932 {
1933 "include": "#regexp"
1934 }
1935 ]
1936 }
1937 ]
1938 },
1939 "regexp": {
1940 "patterns": [
1941 {
1942 "name": "keyword.control.anchor.regexp",
1943 "match": "\\\\[bB]|\\^|\\$"
1944 },
1945 {
1946 "match": "\\\\[1-9]\\d*|\\\\k<([a-zA-Z_$][\\w$]*)>",
1947 "captures": {
1948 "0": {
1949 "name": "keyword.other.back-reference.regexp"
1950 },
1951 "1": {
1952 "name": "variable.other.regexp"
1953 }
1954 }
1955 },
1956 {
1957 "name": "keyword.operator.quantifier.regexp",
1958 "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??"
1959 },
1960 {
1961 "name": "keyword.operator.or.regexp",
1962 "match": "\\|"
1963 },
1964 {
1965 "name": "meta.group.assertion.regexp",
1966 "begin": "(\\()((\\?=)|(\\?!)|(\\?<=)|(\\?<!))",
1967 "beginCaptures": {
1968 "1": {
1969 "name": "punctuation.definition.group.regexp"
1970 },
1971 "2": {
1972 "name": "punctuation.definition.group.assertion.regexp"
1973 },
1974 "3": {
1975 "name": "meta.assertion.look-ahead.regexp"
1976 },
1977 "4": {
1978 "name": "meta.assertion.negative-look-ahead.regexp"
1979 },
1980 "5": {
1981 "name": "meta.assertion.look-behind.regexp"
1982 },
1983 "6": {
1984 "name": "meta.assertion.negative-look-behind.regexp"
1985 }
1986 },
1987 "end": "(\\))",
1988 "endCaptures": {
1989 "1": {
1990 "name": "punctuation.definition.group.regexp"
1991 }
1992 },
1993 "patterns": [
1994 {
1995 "include": "#regexp"
1996 }
1997 ]
1998 },
1999 {
2000 "name": "meta.group.regexp",
2001 "begin": "\\((?:(\\?:)|(?:\\?<([a-zA-Z_$][\\w$]*)>))?",
2002 "beginCaptures": {
2003 "0": {
2004 "name": "punctuation.definition.group.regexp"
2005 },
2006 "1": {
2007 "name": "punctuation.definition.group.no-capture.regexp"
2008 },
2009 "2": {
2010 "name": "variable.other.regexp"
2011 }
2012 },
2013 "end": "\\)",
2014 "endCaptures": {
2015 "0": {
2016 "name": "punctuation.definition.group.regexp"
2017 }
2018 },
2019 "patterns": [
2020 {
2021 "include": "#regexp"
2022 }
2023 ]
2024 },
2025 {
2026 "name": "constant.other.character-class.set.regexp",
2027 "begin": "(\\[)(\\^)?",
2028 "beginCaptures": {
2029 "1": {
2030 "name": "punctuation.definition.character-class.regexp"
2031 },
2032 "2": {
2033 "name": "keyword.operator.negation.regexp"
2034 }
2035 },
2036 "end": "(\\])",
2037 "endCaptures": {
2038 "1": {
2039 "name": "punctuation.definition.character-class.regexp"
2040 }
2041 },
2042 "patterns": [
2043 {
2044 "name": "constant.other.character-class.range.regexp",
2045 "match": "(?:.|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))",
2046 "captures": {
2047 "1": {
2048 "name": "constant.character.numeric.regexp"
2049 },
2050 "2": {
2051 "name": "constant.character.control.regexp"
2052 },
2053 "3": {
2054 "name": "constant.character.escape.backslash.regexp"
2055 },
2056 "4": {
2057 "name": "constant.character.numeric.regexp"
2058 },
2059 "5": {
2060 "name": "constant.character.control.regexp"
2061 },
2062 "6": {
2063 "name": "constant.character.escape.backslash.regexp"
2064 }
2065 }
2066 },
2067 {
2068 "include": "#regex-character-class"
2069 }
2070 ]
2071 },
2072 {
2073 "include": "#regex-character-class"
2074 }
2075 ]
2076 },
2077 "regex-character-class": {
2078 "patterns": [
2079 {
2080 "name": "constant.other.character-class.regexp",
2081 "match": "\\\\[wWsSdDtrnvf]|\\."
2082 },
2083 {
2084 "name": "constant.character.numeric.regexp",
2085 "match": "\\\\([0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4})"
2086 },
2087 {
2088 "name": "constant.character.control.regexp",
2089 "match": "\\\\c[A-Z]"
2090 },
2091 {
2092 "name": "constant.character.escape.backslash.regexp",
2093 "match": "\\\\."
2094 }
2095 ]
2096 },
2097 "comment": {
2098 "patterns": [
2099 {
2100 "name": "comment.block.documentation.imba",
2101 "begin": "/\\*\\*(?!/)",
2102 "beginCaptures": {
2103 "0": {
2104 "name": "punctuation.definition.comment.imba"
2105 }
2106 },
2107 "end": "\\*/",
2108 "endCaptures": {
2109 "0": {
2110 "name": "punctuation.definition.comment.imba"
2111 }
2112 },
2113 "patterns": [
2114 {
2115 "include": "#docblock"
2116 }
2117 ]
2118 },
2119 {
2120 "name": "comment.block.imba",
2121 "begin": "(/\\*)(?:\\s*((@)internal)(?=\\s|(\\*/)))?",
2122 "beginCaptures": {
2123 "1": {
2124 "name": "punctuation.definition.comment.imba"
2125 },
2126 "2": {
2127 "name": "storage.type.internaldeclaration.imba"
2128 },
2129 "3": {
2130 "name": "punctuation.decorator.internaldeclaration.imba"
2131 }
2132 },
2133 "end": "\\*/",
2134 "endCaptures": {
2135 "0": {
2136 "name": "punctuation.definition.comment.imba"
2137 }
2138 }
2139 },
2140 {
2141 "name": "comment.block.imba",
2142 "begin": "(###)",
2143 "beginCaptures": {
2144 "1": {
2145 "name": "punctuation.definition.comment.imba"
2146 }
2147 },
2148 "end": "###(?:[ \\t]*\\n)",
2149 "endCaptures": {
2150 "0": {
2151 "name": "punctuation.definition.comment.imba"
2152 }
2153 }
2154 },
2155 {
2156 "begin": "(^[ \\t]+)?((//|\\#\\s)(?:\\s*((@)internal)(?=\\s|$))?)",
2157 "beginCaptures": {
2158 "1": {
2159 "name": "punctuation.whitespace.comment.leading.imba"
2160 },
2161 "2": {
2162 "name": "comment.line.double-slash.imba"
2163 },
2164 "3": {
2165 "name": "punctuation.definition.comment.imba"
2166 },
2167 "4": {
2168 "name": "storage.type.internaldeclaration.imba"
2169 },
2170 "5": {
2171 "name": "punctuation.decorator.internaldeclaration.imba"
2172 }
2173 },
2174 "end": "(?=$)",
2175 "contentName": "comment.line.double-slash.imba"
2176 }
2177 ]
2178 },
2179 "single-line-comment-consuming-line-ending": {
2180 "begin": "(^[ \\t]+)?((//|\\#\\s)(?:\\s*((@)internal)(?=\\s|$))?)",
2181 "beginCaptures": {
2182 "1": {
2183 "name": "punctuation.whitespace.comment.leading.imba"
2184 },
2185 "2": {
2186 "name": "comment.line.double-slash.imba"
2187 },
2188 "3": {
2189 "name": "punctuation.definition.comment.imba"
2190 },
2191 "4": {
2192 "name": "storage.type.internaldeclaration.imba"
2193 },
2194 "5": {
2195 "name": "punctuation.decorator.internaldeclaration.imba"
2196 }
2197 },
2198 "end": "(?=^)",
2199 "contentName": "comment.line.double-slash.imba"
2200 },
2201 "directives": {
2202 "name": "comment.line.triple-slash.directive.imba",
2203 "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|lib|name)\\s*=\\s*((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))+\\s*/>\\s*$)",
2204 "beginCaptures": {
2205 "1": {
2206 "name": "punctuation.definition.comment.imba"
2207 }
2208 },
2209 "end": "(?=$)",
2210 "patterns": [
2211 {
2212 "name": "meta.tag.imba",
2213 "begin": "(<)(reference|amd-dependency|amd-module)",
2214 "beginCaptures": {
2215 "1": {
2216 "name": "punctuation.definition.tag.directive.imba"
2217 },
2218 "2": {
2219 "name": "entity.name.tag.directive.imba"
2220 }
2221 },
2222 "end": "/>",
2223 "endCaptures": {
2224 "0": {
2225 "name": "punctuation.definition.tag.directive.imba"
2226 }
2227 },
2228 "patterns": [
2229 {
2230 "name": "entity.other.attribute-name.directive.imba",
2231 "match": "path|types|no-default-lib|lib|name"
2232 },
2233 {
2234 "name": "keyword.operator.assignment.imba",
2235 "match": "="
2236 },
2237 {
2238 "include": "#string"
2239 }
2240 ]
2241 }
2242 ]
2243 },
2244 "docblock": {
2245 "patterns": [
2246 {
2247 "match": "(?x)\n((@)(?:access|api))\n\\s+\n(private|protected|public)\n\\b",
2248 "captures": {
2249 "1": {
2250 "name": "storage.type.class.jsdoc"
2251 },
2252 "2": {
2253 "name": "punctuation.definition.block.tag.jsdoc"
2254 },
2255 "3": {
2256 "name": "constant.language.access-type.jsdoc"
2257 }
2258 }
2259 },
2260 {
2261 "match": "(?x)\n((@)author)\n\\s+\n(\n [^@\\s<>*/]\n (?:[^@<>*/]|\\*[^/])*\n)\n(?:\n \\s*\n (<)\n ([^>\\s]+)\n (>)\n)?",
2262 "captures": {
2263 "1": {
2264 "name": "storage.type.class.jsdoc"
2265 },
2266 "2": {
2267 "name": "punctuation.definition.block.tag.jsdoc"
2268 },
2269 "3": {
2270 "name": "entity.name.type.instance.jsdoc"
2271 },
2272 "4": {
2273 "name": "punctuation.definition.bracket.angle.begin.jsdoc"
2274 },
2275 "5": {
2276 "name": "constant.other.email.link.underline.jsdoc"
2277 },
2278 "6": {
2279 "name": "punctuation.definition.bracket.angle.end.jsdoc"
2280 }
2281 }
2282 },
2283 {
2284 "match": "(?x)\n((@)borrows) \\s+\n((?:[^@\\s*/]|\\*[^/])+) # <that namepath>\n\\s+ (as) \\s+ # as\n((?:[^@\\s*/]|\\*[^/])+) # <this namepath>",
2285 "captures": {
2286 "1": {
2287 "name": "storage.type.class.jsdoc"
2288 },
2289 "2": {
2290 "name": "punctuation.definition.block.tag.jsdoc"
2291 },
2292 "3": {
2293 "name": "entity.name.type.instance.jsdoc"
2294 },
2295 "4": {
2296 "name": "keyword.operator.control.jsdoc"
2297 },
2298 "5": {
2299 "name": "entity.name.type.instance.jsdoc"
2300 }
2301 }
2302 },
2303 {
2304 "name": "meta.example.jsdoc",
2305 "begin": "((@)example)\\s+",
2306 "end": "(?=@|\\*/)",
2307 "beginCaptures": {
2308 "1": {
2309 "name": "storage.type.class.jsdoc"
2310 },
2311 "2": {
2312 "name": "punctuation.definition.block.tag.jsdoc"
2313 }
2314 },
2315 "patterns": [
2316 {
2317 "match": "^\\s\\*\\s+"
2318 },
2319 {
2320 "contentName": "constant.other.description.jsdoc",
2321 "begin": "\\G(<)caption(>)",
2322 "beginCaptures": {
2323 "0": {
2324 "name": "entity.name.tag.inline.jsdoc"
2325 },
2326 "1": {
2327 "name": "punctuation.definition.bracket.angle.begin.jsdoc"
2328 },
2329 "2": {
2330 "name": "punctuation.definition.bracket.angle.end.jsdoc"
2331 }
2332 },
2333 "end": "(</)caption(>)|(?=\\*/)",
2334 "endCaptures": {
2335 "0": {
2336 "name": "entity.name.tag.inline.jsdoc"
2337 },
2338 "1": {
2339 "name": "punctuation.definition.bracket.angle.begin.jsdoc"
2340 },
2341 "2": {
2342 "name": "punctuation.definition.bracket.angle.end.jsdoc"
2343 }
2344 }
2345 },
2346 {
2347 "match": "[^\\s@*](?:[^*]|\\*[^/])*",
2348 "captures": {
2349 "0": {
2350 "name": "source.embedded.imba"
2351 }
2352 }
2353 }
2354 ]
2355 },
2356 {
2357 "match": "(?x) ((@)kind) \\s+ (class|constant|event|external|file|function|member|mixin|module|namespace|typedef) \\b",
2358 "captures": {
2359 "1": {
2360 "name": "storage.type.class.jsdoc"
2361 },
2362 "2": {
2363 "name": "punctuation.definition.block.tag.jsdoc"
2364 },
2365 "3": {
2366 "name": "constant.language.symbol-type.jsdoc"
2367 }
2368 }
2369 },
2370 {
2371 "match": "(?x)\n((@)see)\n\\s+\n(?:\n # URL\n (\n (?=https?://)\n (?:[^\\s*]|\\*[^/])+\n )\n |\n # JSDoc namepath\n (\n (?!\n # Avoid matching bare URIs (also acceptable as links)\n https?://\n |\n # Avoid matching {@inline tags}; we match those below\n (?:\\[[^\\[\\]]*\\])? # Possible description [preceding]{@tag}\n {@(?:link|linkcode|linkplain|tutorial)\\b\n )\n # Matched namepath\n (?:[^@\\s*/]|\\*[^/])+\n )\n)",
2372 "captures": {
2373 "1": {
2374 "name": "storage.type.class.jsdoc"
2375 },
2376 "2": {
2377 "name": "punctuation.definition.block.tag.jsdoc"
2378 },
2379 "3": {
2380 "name": "variable.other.link.underline.jsdoc"
2381 },
2382 "4": {
2383 "name": "entity.name.type.instance.jsdoc"
2384 }
2385 }
2386 },
2387 {
2388 "match": "(?x)\n((@)template)\n\\s+\n# One or more valid identifiers\n(\n [A-Za-z_$] # First character: non-numeric word character\n [\\w$.\\[\\]]* # Rest of identifier\n (?: # Possible list of additional identifiers\n \\s* , \\s*\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n )*\n)",
2389 "captures": {
2390 "1": {
2391 "name": "storage.type.class.jsdoc"
2392 },
2393 "2": {
2394 "name": "punctuation.definition.block.tag.jsdoc"
2395 },
2396 "3": {
2397 "name": "variable.other.jsdoc"
2398 }
2399 }
2400 },
2401 {
2402 "match": "(?x)\n(\n (@)\n (?:arg|argument|const|constant|member|namespace|param|var)\n)\n\\s+\n(\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n)",
2403 "captures": {
2404 "1": {
2405 "name": "storage.type.class.jsdoc"
2406 },
2407 "2": {
2408 "name": "punctuation.definition.block.tag.jsdoc"
2409 },
2410 "3": {
2411 "name": "variable.other.jsdoc"
2412 }
2413 }
2414 },
2415 {
2416 "begin": "((@)typedef)\\s+(?={)",
2417 "beginCaptures": {
2418 "1": {
2419 "name": "storage.type.class.jsdoc"
2420 },
2421 "2": {
2422 "name": "punctuation.definition.block.tag.jsdoc"
2423 }
2424 },
2425 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
2426 "patterns": [
2427 {
2428 "include": "#jsdoctype"
2429 },
2430 {
2431 "name": "entity.name.type.instance.jsdoc",
2432 "match": "(?:[^@\\s*/]|\\*[^/])+"
2433 }
2434 ]
2435 },
2436 {
2437 "begin": "((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\\s+(?={)",
2438 "beginCaptures": {
2439 "1": {
2440 "name": "storage.type.class.jsdoc"
2441 },
2442 "2": {
2443 "name": "punctuation.definition.block.tag.jsdoc"
2444 }
2445 },
2446 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
2447 "patterns": [
2448 {
2449 "include": "#jsdoctype"
2450 },
2451 {
2452 "name": "variable.other.jsdoc",
2453 "match": "([A-Za-z_$][\\w$.\\[\\]]*)"
2454 },
2455 {
2456 "name": "variable.other.jsdoc",
2457 "match": "(?x)\n(\\[)\\s*\n[\\w$]+\n(?:\n (?:\\[\\])? # Foo[ ].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [\\w$]+\n)*\n(?:\n \\s*\n (=) # [foo=bar] Default parameter value\n \\s*\n (\n # The inner regexes are to stop the match early at */ and to not stop at escaped quotes\n (?>\n \"(?:(?:\\*(?!/))|(?:\\\\(?!\"))|[^*\\\\])*?\" | # [foo=\"bar\"] Double-quoted\n '(?:(?:\\*(?!/))|(?:\\\\(?!'))|[^*\\\\])*?' | # [foo='bar'] Single-quoted\n \\[ (?:(?:\\*(?!/))|[^*])*? \\] | # [foo=[1,2]] Array literal\n (?:(?:\\*(?!/))|\\s(?!\\s*\\])|\\[.*?(?:\\]|(?=\\*/))|[^*\\s\\[\\]])* # Everything else\n )*\n )\n)?\n\\s*(?:(\\])((?:[^*\\s]|\\*[^\\s/])+)?|(?=\\*/))",
2458 "captures": {
2459 "1": {
2460 "name": "punctuation.definition.optional-value.begin.bracket.square.jsdoc"
2461 },
2462 "2": {
2463 "name": "keyword.operator.assignment.jsdoc"
2464 },
2465 "3": {
2466 "name": "source.embedded.imba"
2467 },
2468 "4": {
2469 "name": "punctuation.definition.optional-value.end.bracket.square.jsdoc"
2470 },
2471 "5": {
2472 "name": "invalid.illegal.syntax.jsdoc"
2473 }
2474 }
2475 }
2476 ]
2477 },
2478 {
2479 "begin": "(?x)\n(\n (@)\n (?:define|enum|exception|export|extends|lends|implements|modifies\n |namespace|private|protected|returns?|suppress|this|throws|type\n |yields?)\n)\n\\s+(?={)",
2480 "beginCaptures": {
2481 "1": {
2482 "name": "storage.type.class.jsdoc"
2483 },
2484 "2": {
2485 "name": "punctuation.definition.block.tag.jsdoc"
2486 }
2487 },
2488 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
2489 "patterns": [
2490 {
2491 "include": "#jsdoctype"
2492 }
2493 ]
2494 },
2495 {
2496 "match": "(?x)\n(\n (@)\n (?:alias|augments|callback|constructs|emits|event|fires|exports?\n |extends|external|function|func|host|lends|listens|interface|memberof!?\n |method|module|mixes|mixin|name|requires|see|this|typedef|uses)\n)\n\\s+\n(\n (?:\n [^{}@\\s*] | \\*[^/]\n )+\n)",
2497 "captures": {
2498 "1": {
2499 "name": "storage.type.class.jsdoc"
2500 },
2501 "2": {
2502 "name": "punctuation.definition.block.tag.jsdoc"
2503 },
2504 "3": {
2505 "name": "entity.name.type.instance.jsdoc"
2506 }
2507 }
2508 },
2509 {
2510 "contentName": "variable.other.jsdoc",
2511 "begin": "((@)(?:default(?:value)?|license|version))\\s+(([''\"]))",
2512 "beginCaptures": {
2513 "1": {
2514 "name": "storage.type.class.jsdoc"
2515 },
2516 "2": {
2517 "name": "punctuation.definition.block.tag.jsdoc"
2518 },
2519 "3": {
2520 "name": "variable.other.jsdoc"
2521 },
2522 "4": {
2523 "name": "punctuation.definition.string.begin.jsdoc"
2524 }
2525 },
2526 "end": "(\\3)|(?=$|\\*/)",
2527 "endCaptures": {
2528 "0": {
2529 "name": "variable.other.jsdoc"
2530 },
2531 "1": {
2532 "name": "punctuation.definition.string.end.jsdoc"
2533 }
2534 }
2535 },
2536 {
2537 "match": "((@)(?:default(?:value)?|license|tutorial|variation|version))\\s+([^\\s*]+)",
2538 "captures": {
2539 "1": {
2540 "name": "storage.type.class.jsdoc"
2541 },
2542 "2": {
2543 "name": "punctuation.definition.block.tag.jsdoc"
2544 },
2545 "3": {
2546 "name": "variable.other.jsdoc"
2547 }
2548 }
2549 },
2550 {
2551 "name": "storage.type.class.jsdoc",
2552 "match": "(?x) (@) (?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles |callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright |default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception |exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func |function|generator|global|hideconstructor|host|ignore|implements|implicitCast|inherit[Dd]oc |inner|instance|interface|internal|kind|lends|license|listens|main|member|memberof!?|method |mixes|mixins?|modifies|module|name|namespace|noalias|nocollapse|nocompile|nosideeffects |override|overview|package|param|polymer(?:Behavior)?|preserve|private|prop|property|protected |public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary |suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation |version|virtual|writeOnce|yields?) \\b",
2553 "captures": {
2554 "1": {
2555 "name": "punctuation.definition.block.tag.jsdoc"
2556 }
2557 }
2558 },
2559 {
2560 "include": "#inline-tags"
2561 },
2562 {
2563 "match": "((@)(?:[_$[:alpha:]][_$[:alnum:]]*(?:\\-[_$[:alnum:]]+)*[\\?\\!]?))(?=\\s+)",
2564 "captures": {
2565 "1": {
2566 "name": "storage.type.class.jsdoc"
2567 },
2568 "2": {
2569 "name": "punctuation.definition.block.tag.jsdoc"
2570 }
2571 }
2572 }
2573 ]
2574 },
2575 "brackets": {
2576 "patterns": [
2577 {
2578 "begin": "{",
2579 "end": "}|(?=\\*/)",
2580 "patterns": [
2581 {
2582 "include": "#brackets"
2583 }
2584 ]
2585 },
2586 {
2587 "begin": "\\[",
2588 "end": "\\]|(?=\\*/)",
2589 "patterns": [
2590 {
2591 "include": "#brackets"
2592 }
2593 ]
2594 }
2595 ]
2596 },
2597 "inline-tags": {
2598 "patterns": [
2599 {
2600 "name": "constant.other.description.jsdoc",
2601 "match": "(\\[)[^\\]]+(\\])(?={@(?:link|linkcode|linkplain|tutorial))",
2602 "captures": {
2603 "1": {
2604 "name": "punctuation.definition.bracket.square.begin.jsdoc"
2605 },
2606 "2": {
2607 "name": "punctuation.definition.bracket.square.end.jsdoc"
2608 }
2609 }
2610 },
2611 {
2612 "name": "entity.name.type.instance.jsdoc",
2613 "begin": "({)((@)(?:link(?:code|plain)?|tutorial))\\s*",
2614 "beginCaptures": {
2615 "1": {
2616 "name": "punctuation.definition.bracket.curly.begin.jsdoc"
2617 },
2618 "2": {
2619 "name": "storage.type.class.jsdoc"
2620 },
2621 "3": {
2622 "name": "punctuation.definition.inline.tag.jsdoc"
2623 }
2624 },
2625 "end": "}|(?=\\*/)",
2626 "endCaptures": {
2627 "0": {
2628 "name": "punctuation.definition.bracket.curly.end.jsdoc"
2629 }
2630 },
2631 "patterns": [
2632 {
2633 "match": "\\G((?=https?://)(?:[^|}\\s*]|\\*[/])+)(\\|)?",
2634 "captures": {
2635 "1": {
2636 "name": "variable.other.link.underline.jsdoc"
2637 },
2638 "2": {
2639 "name": "punctuation.separator.pipe.jsdoc"
2640 }
2641 }
2642 },
2643 {
2644 "match": "\\G((?:[^{}@\\s|*]|\\*[^/])+)(\\|)?",
2645 "captures": {
2646 "1": {
2647 "name": "variable.other.description.jsdoc"
2648 },
2649 "2": {
2650 "name": "punctuation.separator.pipe.jsdoc"
2651 }
2652 }
2653 }
2654 ]
2655 }
2656 ]
2657 },
2658 "jsdoctype": {
2659 "patterns": [
2660 {
2661 "name": "invalid.illegal.type.jsdoc",
2662 "match": "\\G{(?:[^}*]|\\*[^/}])+$"
2663 },
2664 {
2665 "contentName": "entity.name.type.instance.jsdoc",
2666 "begin": "\\G({)",
2667 "beginCaptures": {
2668 "0": {
2669 "name": "entity.name.type.instance.jsdoc"
2670 },
2671 "1": {
2672 "name": "punctuation.definition.bracket.curly.begin.jsdoc"
2673 }
2674 },
2675 "end": "((}))\\s*|(?=\\*/)",
2676 "endCaptures": {
2677 "1": {
2678 "name": "entity.name.type.instance.jsdoc"
2679 },
2680 "2": {
2681 "name": "punctuation.definition.bracket.curly.end.jsdoc"
2682 }
2683 },
2684 "patterns": [
2685 {
2686 "include": "#brackets"
2687 }
2688 ]
2689 }
2690 ]
2691 }
2692 }
2693 }
2694