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

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

5,421 lines 149.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {
2 "information_for_contributors": [
3 "This file has been converted from https://github.com/MagicStack/MagicPython/blob/master/grammars/MagicPython.tmLanguage",
4 "If you want to provide a fix or improvement, please create a pull request against the original repository.",
5 "Once accepted there, we are happy to receive an update request."
6 ],
7 "version": "https://github.com/MagicStack/MagicPython/commit/b2b4f4ae7b4e6284e80bda8080106b93bd588f9e",
8 "name": "vyper",
9 "scopeName": "source.vyper",
10 "patterns": [
11 {
12 "include": "#statement"
13 },
14 {
15 "include": "#expression"
16 },
17 {
18 "include": "#reserved-names-vyper"
19 }
20 ],
21 "repository": {
22 "impossible": {
23 "comment": "This is a special rule that should be used where no match is desired. It is not a good idea to match something like '1{0}' because in some cases that can result in infinite loops in token generation. So the rule instead matches and impossible expression to allow a match to fail and move to the next token.",
24 "match": "$.^"
25 },
26 "statement": {
27 "patterns": [
28 {
29 "include": "#import"
30 },
31 {
32 "include": "#class-declaration"
33 },
34 {
35 "include": "#function-declaration"
36 },
37 {
38 "include": "#generator"
39 },
40 {
41 "include": "#statement-keyword"
42 },
43 {
44 "include": "#assignment-operator"
45 },
46 {
47 "include": "#decorator"
48 },
49 {
50 "include": "#docstring-statement"
51 },
52 {
53 "include": "#semicolon"
54 }
55 ]
56 },
57 "semicolon": {
58 "patterns": [
59 {
60 "name": "invalid.deprecated.semicolon.python",
61 "match": "\\;$"
62 }
63 ]
64 },
65 "comments": {
66 "patterns": [
67 {
68 "name": "comment.line.number-sign.python",
69 "contentName": "meta.typehint.comment.python",
70 "begin": "(?x)\n (?:\n \\# \\s* (type:)\n \\s*+ (?# we want `\\s*+` which is possessive quantifier since\n we do not actually want to backtrack when matching\n whitespace here)\n (?! $ | \\#)\n )\n",
71 "end": "(?:$|(?=\\#))",
72 "beginCaptures": {
73 "0": {
74 "name": "meta.typehint.comment.python"
75 },
76 "1": {
77 "name": "comment.typehint.directive.notation.python"
78 }
79 },
80 "patterns": [
81 {
82 "name": "comment.typehint.ignore.notation.python",
83 "match": "(?x)\n \\G ignore\n (?= \\s* (?: $ | \\#))\n"
84 },
85 {
86 "name": "comment.typehint.type.notation.python",
87 "match": "(?x)\n (?<!\\.)\\b(\n bool | bytes | float | int | object | str\n | List | Dict | Iterable | Sequence | Set\n | FrozenSet | Callable | Union | Tuple\n | Any | None\n )\\b\n"
88 },
89 {
90 "name": "comment.typehint.punctuation.notation.python",
91 "match": "([\\[\\]\\(\\),\\.\\=\\*]|(->))"
92 },
93 {
94 "name": "comment.typehint.variable.notation.python",
95 "match": "([[:alpha:]_]\\w*)"
96 }
97 ]
98 },
99 {
100 "include": "#comments-base"
101 }
102 ]
103 },
104 "docstring-statement": {
105 "begin": "^(?=\\s*[rR]?(\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))",
106 "comment": "the string either terminates correctly or by the beginning of a new line (this is for single line docstrings that aren't terminated) AND it's not followed by another docstring",
107 "end": "((?<=\\1)|^)(?!\\s*[rR]?(\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))",
108 "patterns": [
109 {
110 "include": "#docstring"
111 }
112 ]
113 },
114 "docstring": {
115 "patterns": [
116 {
117 "name": "string.quoted.docstring.multi.python",
118 "begin": "(\\'\\'\\'|\\\"\\\"\\\")",
119 "end": "(\\1)",
120 "beginCaptures": {
121 "1": {
122 "name": "punctuation.definition.string.begin.python"
123 }
124 },
125 "endCaptures": {
126 "1": {
127 "name": "punctuation.definition.string.end.python"
128 }
129 },
130 "patterns": [
131 {
132 "include": "#docstring-prompt"
133 },
134 {
135 "include": "#codetags"
136 },
137 {
138 "include": "#docstring-guts-unicode"
139 }
140 ]
141 },
142 {
143 "name": "string.quoted.docstring.raw.multi.python",
144 "begin": "([rR])(\\'\\'\\'|\\\"\\\"\\\")",
145 "end": "(\\2)",
146 "beginCaptures": {
147 "1": {
148 "name": "storage.type.string.python"
149 },
150 "2": {
151 "name": "punctuation.definition.string.begin.python"
152 }
153 },
154 "endCaptures": {
155 "1": {
156 "name": "punctuation.definition.string.end.python"
157 }
158 },
159 "patterns": [
160 {
161 "include": "#string-consume-escape"
162 },
163 {
164 "include": "#docstring-prompt"
165 },
166 {
167 "include": "#codetags"
168 }
169 ]
170 },
171 {
172 "name": "string.quoted.docstring.single.python",
173 "begin": "(\\'|\\\")",
174 "end": "(\\1)|(\\n)",
175 "beginCaptures": {
176 "1": {
177 "name": "punctuation.definition.string.begin.python"
178 }
179 },
180 "endCaptures": {
181 "1": {
182 "name": "punctuation.definition.string.end.python"
183 },
184 "2": {
185 "name": "invalid.illegal.newline.python"
186 }
187 },
188 "patterns": [
189 {
190 "include": "#codetags"
191 },
192 {
193 "include": "#docstring-guts-unicode"
194 }
195 ]
196 },
197 {
198 "name": "string.quoted.docstring.raw.single.python",
199 "begin": "([rR])(\\'|\\\")",
200 "end": "(\\2)|(\\n)",
201 "beginCaptures": {
202 "1": {
203 "name": "storage.type.string.python"
204 },
205 "2": {
206 "name": "punctuation.definition.string.begin.python"
207 }
208 },
209 "endCaptures": {
210 "1": {
211 "name": "punctuation.definition.string.end.python"
212 },
213 "2": {
214 "name": "invalid.illegal.newline.python"
215 }
216 },
217 "patterns": [
218 {
219 "include": "#string-consume-escape"
220 },
221 {
222 "include": "#codetags"
223 }
224 ]
225 }
226 ]
227 },
228 "docstring-guts-unicode": {
229 "patterns": [
230 {
231 "include": "#escape-sequence-unicode"
232 },
233 {
234 "include": "#escape-sequence"
235 },
236 {
237 "include": "#string-line-continuation"
238 }
239 ]
240 },
241 "docstring-prompt": {
242 "match": "(?x)\n (?:\n (?:^|\\G) \\s* (?# '\\G' is necessary for ST)\n ((?:>>>|\\.\\.\\.) \\s) (?=\\s*\\S)\n )\n",
243 "captures": {
244 "1": {
245 "name": "keyword.control.flow.python"
246 }
247 }
248 },
249 "statement-keyword": {
250 "patterns": [
251 {
252 "name": "storage.type.function.python",
253 "match": "\\b((async\\s+)?\\s*def)\\b"
254 },
255 {
256 "name": "keyword.control.flow.python",
257 "comment": "if `as` is eventually followed by `:` or line continuation\nit's probably control flow like:\n with foo as bar, \\\n Foo as Bar:\n try:\n do_stuff()\n except Exception as e:\n pass\n",
258 "match": "\\b(?<!\\.)as\\b(?=.*[:\\\\])"
259 },
260 {
261 "name": "keyword.control.import.python",
262 "comment": "other legal use of `as` is in an import",
263 "match": "\\b(?<!\\.)as\\b"
264 },
265 {
266 "name": "keyword.control.flow.python",
267 "match": "(?x)\n \\b(?<!\\.)(\n async | continue | del | assert | break | finally | for\n | from | elif | else | if | except | pass | raise\n | return | try | while | with\n )\\b\n"
268 },
269 {
270 "name": "storage.modifier.declaration.python",
271 "match": "(?x)\n \\b(?<!\\.)(\n global | nonlocal\n )\\b\n"
272 },
273 {
274 "name": "storage.type.class.python",
275 "match": "\\b(?<!\\.)(class)\\b"
276 }
277 ]
278 },
279 "expression-bare": {
280 "comment": "valid Python expressions w/o comments and line continuation",
281 "patterns": [
282 {
283 "include": "#backticks"
284 },
285 {
286 "include": "#illegal-anno"
287 },
288 {
289 "include": "#literal"
290 },
291 {
292 "include": "#regexp"
293 },
294 {
295 "include": "#string"
296 },
297 {
298 "include": "#lambda"
299 },
300 {
301 "include": "#generator"
302 },
303 {
304 "include": "#illegal-operator"
305 },
306 {
307 "include": "#operator"
308 },
309 {
310 "include": "#curly-braces"
311 },
312 {
313 "include": "#item-access"
314 },
315 {
316 "include": "#list"
317 },
318 {
319 "include": "#odd-function-call"
320 },
321 {
322 "include": "#round-braces"
323 },
324 {
325 "include": "#function-call"
326 },
327 {
328 "include": "#builtin-functions"
329 },
330 {
331 "include": "#builtin-types"
332 },
333 {
334 "include": "#builtin-exceptions"
335 },
336 {
337 "include": "#magic-names"
338 },
339 {
340 "include": "#special-names"
341 },
342 {
343 "include": "#illegal-names"
344 },
345 {
346 "include": "#special-variables"
347 },
348 {
349 "include": "#ellipsis"
350 },
351 {
352 "include": "#punctuation"
353 },
354 {
355 "include": "#line-continuation"
356 },
357 {
358 "include": "#special-variables-types"
359 }
360 ]
361 },
362 "expression-base": {
363 "comment": "valid Python expressions with comments and line continuation",
364 "patterns": [
365 {
366 "include": "#comments"
367 },
368 {
369 "include": "#expression-bare"
370 },
371 {
372 "include": "#line-continuation"
373 }
374 ]
375 },
376 "expression": {
377 "comment": "All valid Python expressions",
378 "patterns": [
379 {
380 "include": "#expression-base"
381 },
382 {
383 "include": "#member-access"
384 },
385 {
386 "comment": "Tokenize identifiers to help linters",
387 "match": "(?x) \\b ([[:alpha:]_]\\w*) \\b"
388 }
389 ]
390 },
391 "member-access": {
392 "name": "meta.member.access.python",
393 "begin": "(\\.)\\s*(?!\\.)",
394 "end": "(?x)\n # stop when you've just read non-whitespace followed by non-word\n # i.e. when finished reading an identifier or function call\n (?<=\\S)(?=\\W) |\n # stop when seeing the start of something that's not a word,\n # i.e. when seeing a non-identifier\n (^|(?<=\\s))(?=[^\\\\\\w\\s]) |\n $\n",
395 "beginCaptures": {
396 "1": {
397 "name": "punctuation.separator.period.python"
398 }
399 },
400 "patterns": [
401 {
402 "include": "#function-call"
403 },
404 {
405 "include": "#member-access-base"
406 },
407 {
408 "include": "#member-access-attribute"
409 }
410 ]
411 },
412 "member-access-base": {
413 "patterns": [
414 {
415 "include": "#magic-names"
416 },
417 {
418 "include": "#illegal-names"
419 },
420 {
421 "include": "#illegal-object-name"
422 },
423 {
424 "include": "#special-names"
425 },
426 {
427 "include": "#line-continuation"
428 },
429 {
430 "include": "#item-access"
431 },
432 {
433 "include": "#special-variables-types"
434 }
435 ]
436 },
437 "member-access-attribute": {
438 "comment": "Highlight attribute access in otherwise non-specialized cases.",
439 "name": "meta.attribute.python",
440 "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n"
441 },
442 "special-names": {
443 "name": "constant.other.caps.python",
444 "match": "(?x)\n \\b\n # we want to see \"enough\", meaning 2 or more upper-case\n # letters in the beginning of the constant\n #\n # for more details refer to:\n # https://github.com/MagicStack/MagicPython/issues/42\n (\n _* [[:upper:]] [_\\d]* [[:upper:]]\n )\n [[:upper:]\\d]* (_\\w*)?\n \\b\n"
445 },
446 "curly-braces": {
447 "begin": "\\{",
448 "end": "\\}",
449 "beginCaptures": {
450 "0": {
451 "name": "punctuation.definition.dict.begin.python"
452 }
453 },
454 "endCaptures": {
455 "0": {
456 "name": "punctuation.definition.dict.end.python"
457 }
458 },
459 "patterns": [
460 {
461 "name": "punctuation.separator.dict.python",
462 "match": ":"
463 },
464 {
465 "include": "#expression"
466 }
467 ]
468 },
469 "list": {
470 "begin": "\\[",
471 "end": "\\]",
472 "beginCaptures": {
473 "0": {
474 "name": "punctuation.definition.list.begin.python"
475 }
476 },
477 "endCaptures": {
478 "0": {
479 "name": "punctuation.definition.list.end.python"
480 }
481 },
482 "patterns": [
483 {
484 "include": "#expression"
485 }
486 ]
487 },
488 "odd-function-call": {
489 "comment": "A bit obscured function call where there may have been an\narbitrary number of other operations to get the function.\nE.g. \"arr[idx](args)\"\n",
490 "begin": "(?x)\n (?<= \\] | \\) ) \\s*\n (?=\\()\n",
491 "end": "(\\))",
492 "endCaptures": {
493 "1": {
494 "name": "punctuation.definition.arguments.end.python"
495 }
496 },
497 "patterns": [
498 {
499 "include": "#function-arguments"
500 }
501 ]
502 },
503 "round-braces": {
504 "begin": "\\(",
505 "end": "\\)",
506 "beginCaptures": {
507 "0": {
508 "name": "punctuation.parenthesis.begin.python"
509 }
510 },
511 "endCaptures": {
512 "0": {
513 "name": "punctuation.parenthesis.end.python"
514 }
515 },
516 "patterns": [
517 {
518 "include": "#expression"
519 }
520 ]
521 },
522 "line-continuation": {
523 "patterns": [
524 {
525 "match": "(\\\\)\\s*(\\S.*$\\n?)",
526 "captures": {
527 "1": {
528 "name": "punctuation.separator.continuation.line.python"
529 },
530 "2": {
531 "name": "invalid.illegal.line.continuation.python"
532 }
533 }
534 },
535 {
536 "begin": "(\\\\)\\s*$\\n?",
537 "end": "(?x)\n (?=^\\s*$)\n |\n (?! (\\s* [rR]? (\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))\n |\n (\\G $) (?# '\\G' is necessary for ST)\n )\n",
538 "beginCaptures": {
539 "1": {
540 "name": "punctuation.separator.continuation.line.python"
541 }
542 },
543 "patterns": [
544 {
545 "include": "#regexp"
546 },
547 {
548 "include": "#string"
549 }
550 ]
551 }
552 ]
553 },
554 "assignment-operator": {
555 "name": "keyword.operator.assignment.python",
556 "match": "(?x)\n <<= | >>= | //= | \\*\\*=\n | \\+= | -= | /= | @=\n | \\*= | %= | ~= | \\^= | &= | \\|=\n | =(?!=)\n"
557 },
558 "operator": {
559 "match": "(?x)\n \\b(?<!\\.)\n (?:\n (and | or | not | in | is) (?# 1)\n |\n (for | if | else | await | (?:yield(?:\\s+from)?)) (?# 2)\n )\n (?!\\s*:)\\b\n\n | (<< | >> | & | \\| | \\^ | ~) (?# 3)\n\n | (\\*\\* | \\* | \\+ | - | % | // | / | @) (?# 4)\n\n | (!= | == | >= | <= | < | >) (?# 5)\n",
560 "captures": {
561 "1": {
562 "name": "keyword.operator.logical.python"
563 },
564 "2": {
565 "name": "keyword.control.flow.python"
566 },
567 "3": {
568 "name": "keyword.operator.bitwise.python"
569 },
570 "4": {
571 "name": "keyword.operator.arithmetic.python"
572 },
573 "5": {
574 "name": "keyword.operator.comparison.python"
575 }
576 }
577 },
578 "punctuation": {
579 "patterns": [
580 {
581 "name": "punctuation.separator.colon.python",
582 "match": ":"
583 },
584 {
585 "name": "punctuation.separator.element.python",
586 "match": ","
587 }
588 ]
589 },
590 "literal": {
591 "patterns": [
592 {
593 "name": "constant.language.python",
594 "match": "\\b(True|False|None|NotImplemented|Ellipsis)\\b"
595 },
596 {
597 "include": "#number"
598 }
599 ]
600 },
601 "number": {
602 "name": "constant.numeric.python",
603 "patterns": [
604 {
605 "include": "#number-float"
606 },
607 {
608 "include": "#number-dec"
609 },
610 {
611 "include": "#number-hex"
612 },
613 {
614 "include": "#number-oct"
615 },
616 {
617 "include": "#number-bin"
618 },
619 {
620 "include": "#number-long"
621 },
622 {
623 "name": "invalid.illegal.name.python",
624 "match": "\\b[0-9]+\\w+"
625 }
626 ]
627 },
628 "number-float": {
629 "name": "constant.numeric.float.python",
630 "match": "(?x)\n (?<! \\w)(?:\n (?:\n \\.[0-9](?: _?[0-9] )*\n |\n [0-9](?: _?[0-9] )* \\. [0-9](?: _?[0-9] )*\n |\n [0-9](?: _?[0-9] )* \\.\n ) (?: [eE][+-]?[0-9](?: _?[0-9] )* )?\n |\n [0-9](?: _?[0-9] )* (?: [eE][+-]?[0-9](?: _?[0-9] )* )\n )([jJ])?\\b\n",
631 "captures": {
632 "1": {
633 "name": "storage.type.imaginary.number.python"
634 }
635 }
636 },
637 "number-dec": {
638 "name": "constant.numeric.dec.python",
639 "match": "(?x)\n (?<![\\w\\.])(?:\n [1-9](?: _?[0-9] )*\n |\n 0+\n |\n [0-9](?: _?[0-9] )* ([jJ])\n |\n 0 ([0-9]+)(?![eE\\.])\n )\\b\n",
640 "captures": {
641 "1": {
642 "name": "storage.type.imaginary.number.python"
643 },
644 "2": {
645 "name": "invalid.illegal.dec.python"
646 }
647 }
648 },
649 "number-hex": {
650 "name": "constant.numeric.hex.python",
651 "match": "(?x)\n (?<![\\w\\.])\n (0[xX]) (_?[0-9a-fA-F])+\n \\b\n",
652 "captures": {
653 "1": {
654 "name": "storage.type.number.python"
655 }
656 }
657 },
658 "number-oct": {
659 "name": "constant.numeric.oct.python",
660 "match": "(?x)\n (?<![\\w\\.])\n (0[oO]) (_?[0-7])+\n \\b\n",
661 "captures": {
662 "1": {
663 "name": "storage.type.number.python"
664 }
665 }
666 },
667 "number-bin": {
668 "name": "constant.numeric.bin.python",
669 "match": "(?x)\n (?<![\\w\\.])\n (0[bB]) (_?[01])+\n \\b\n",
670 "captures": {
671 "1": {
672 "name": "storage.type.number.python"
673 }
674 }
675 },
676 "number-long": {
677 "name": "constant.numeric.bin.python",
678 "comment": "this is to support python2 syntax for long ints",
679 "match": "(?x)\n (?<![\\w\\.])\n ([1-9][0-9]* | 0) ([lL])\n \\b\n",
680 "captures": {
681 "2": {
682 "name": "storage.type.number.python"
683 }
684 }
685 },
686 "regexp": {
687 "patterns": [
688 {
689 "include": "#regexp-single-three-line"
690 },
691 {
692 "include": "#regexp-double-three-line"
693 },
694 {
695 "include": "#regexp-single-one-line"
696 },
697 {
698 "include": "#regexp-double-one-line"
699 },
700 {
701 "include": "#fregexp-single-three-line"
702 },
703 {
704 "include": "#fregexp-double-three-line"
705 },
706 {
707 "include": "#fregexp-single-one-line"
708 },
709 {
710 "include": "#fregexp-double-one-line"
711 }
712 ]
713 },
714 "string": {
715 "patterns": [
716 {
717 "include": "#string-quoted-multi-line"
718 },
719 {
720 "include": "#string-quoted-single-line"
721 },
722 {
723 "include": "#string-bin-quoted-multi-line"
724 },
725 {
726 "include": "#string-bin-quoted-single-line"
727 },
728 {
729 "include": "#string-raw-quoted-multi-line"
730 },
731 {
732 "include": "#string-raw-quoted-single-line"
733 },
734 {
735 "include": "#string-raw-bin-quoted-multi-line"
736 },
737 {
738 "include": "#string-raw-bin-quoted-single-line"
739 },
740 {
741 "include": "#fstring-fnorm-quoted-multi-line"
742 },
743 {
744 "include": "#fstring-fnorm-quoted-single-line"
745 },
746 {
747 "include": "#fstring-normf-quoted-multi-line"
748 },
749 {
750 "include": "#fstring-normf-quoted-single-line"
751 },
752 {
753 "include": "#fstring-raw-quoted-multi-line"
754 },
755 {
756 "include": "#fstring-raw-quoted-single-line"
757 }
758 ]
759 },
760 "string-unicode-guts": {
761 "patterns": [
762 {
763 "include": "#escape-sequence-unicode"
764 },
765 {
766 "include": "#string-entity"
767 },
768 {
769 "include": "#string-brace-formatting"
770 }
771 ]
772 },
773 "string-consume-escape": {
774 "match": "\\\\['\"\\n\\\\]"
775 },
776 "string-raw-guts": {
777 "patterns": [
778 {
779 "include": "#string-consume-escape"
780 },
781 {
782 "include": "#string-formatting"
783 },
784 {
785 "include": "#string-brace-formatting"
786 }
787 ]
788 },
789 "string-raw-bin-guts": {
790 "patterns": [
791 {
792 "include": "#string-consume-escape"
793 },
794 {
795 "include": "#string-formatting"
796 }
797 ]
798 },
799 "string-entity": {
800 "patterns": [
801 {
802 "include": "#escape-sequence"
803 },
804 {
805 "include": "#string-line-continuation"
806 },
807 {
808 "include": "#string-formatting"
809 }
810 ]
811 },
812 "fstring-guts": {
813 "patterns": [
814 {
815 "include": "#escape-sequence-unicode"
816 },
817 {
818 "include": "#escape-sequence"
819 },
820 {
821 "include": "#string-line-continuation"
822 },
823 {
824 "include": "#fstring-formatting"
825 }
826 ]
827 },
828 "fstring-raw-guts": {
829 "patterns": [
830 {
831 "include": "#string-consume-escape"
832 },
833 {
834 "include": "#fstring-formatting"
835 }
836 ]
837 },
838 "fstring-illegal-single-brace": {
839 "comment": "it is illegal to have a multiline brace inside a single-line string",
840 "begin": "(\\{)(?=[^\\n}]*$\\n?)",
841 "end": "(\\})|(?=\\n)",
842 "beginCaptures": {
843 "1": {
844 "name": "constant.character.format.placeholder.other.python"
845 }
846 },
847 "endCaptures": {
848 "1": {
849 "name": "constant.character.format.placeholder.other.python"
850 }
851 },
852 "patterns": [
853 {
854 "include": "#fstring-terminator-single"
855 },
856 {
857 "include": "#f-expression"
858 }
859 ]
860 },
861 "fstring-illegal-multi-brace": {
862 "patterns": [
863 {
864 "include": "#impossible"
865 }
866 ]
867 },
868 "f-expression": {
869 "comment": "All valid Python expressions, except comments and line continuation",
870 "patterns": [
871 {
872 "include": "#expression-bare"
873 },
874 {
875 "include": "#member-access"
876 },
877 {
878 "comment": "Tokenize identifiers to help linters",
879 "match": "(?x) \\b ([[:alpha:]_]\\w*) \\b"
880 }
881 ]
882 },
883 "escape-sequence-unicode": {
884 "patterns": [
885 {
886 "name": "constant.character.escape.python",
887 "match": "(?x)\n \\\\ (\n u[0-9A-Fa-f]{4}\n | U[0-9A-Fa-f]{8}\n | N\\{[\\w\\s]+?\\}\n )\n"
888 }
889 ]
890 },
891 "escape-sequence": {
892 "name": "constant.character.escape.python",
893 "match": "(?x)\n \\\\ (\n x[0-9A-Fa-f]{2}\n | [0-7]{1,3}\n | [\\\\\"'abfnrtv]\n )\n"
894 },
895 "string-line-continuation": {
896 "name": "constant.language.python",
897 "match": "\\\\$"
898 },
899 "string-formatting": {
900 "name": "meta.format.percent.python",
901 "match": "(?x)\n (\n % (\\([\\w\\s]*\\))?\n [-+#0 ]*\n (\\d+|\\*)? (\\.(\\d+|\\*))?\n ([hlL])?\n [diouxXeEfFgGcrsab%]\n )\n",
902 "captures": {
903 "1": {
904 "name": "constant.character.format.placeholder.other.python"
905 }
906 }
907 },
908 "string-brace-formatting": {
909 "patterns": [
910 {
911 "name": "meta.format.brace.python",
912 "match": "(?x)\n (\n {{ | }}\n | (?:\n {\n \\w* (\\.[[:alpha:]_]\\w* | \\[[^\\]'\"]+\\])*\n (![rsa])?\n ( : \\w? [<>=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )?\n })\n )\n",
913 "captures": {
914 "1": {
915 "name": "constant.character.format.placeholder.other.python"
916 },
917 "3": {
918 "name": "storage.type.format.python"
919 },
920 "4": {
921 "name": "storage.type.format.python"
922 }
923 }
924 },
925 {
926 "name": "meta.format.brace.python",
927 "match": "(?x)\n (\n {\n \\w* (\\.[[:alpha:]_]\\w* | \\[[^\\]'\"]+\\])*\n (![rsa])?\n (:)\n [^'\"{}\\n]* (?:\n \\{ [^'\"}\\n]*? \\} [^'\"{}\\n]*\n )*\n }\n )\n",
928 "captures": {
929 "1": {
930 "name": "constant.character.format.placeholder.other.python"
931 },
932 "3": {
933 "name": "storage.type.format.python"
934 },
935 "4": {
936 "name": "storage.type.format.python"
937 }
938 }
939 }
940 ]
941 },
942 "fstring-formatting": {
943 "patterns": [
944 {
945 "include": "#fstring-formatting-braces"
946 },
947 {
948 "include": "#fstring-formatting-singe-brace"
949 }
950 ]
951 },
952 "fstring-formatting-singe-brace": {
953 "name": "invalid.illegal.brace.python",
954 "match": "(}(?!}))"
955 },
956 "import": {
957 "comment": "Import statements used to correctly mark `from`, `import`, and `as`\n",
958 "patterns": [
959 {
960 "begin": "\\b(?<!\\.)(from)\\b(?=.+import)",
961 "end": "$|(?=import)",
962 "beginCaptures": {
963 "1": {
964 "name": "keyword.control.import.python"
965 }
966 },
967 "patterns": [
968 {
969 "name": "punctuation.separator.period.python",
970 "match": "\\.+"
971 },
972 {
973 "include": "#expression"
974 }
975 ]
976 },
977 {
978 "begin": "\\b(?<!\\.)(import)\\b",
979 "end": "$",
980 "beginCaptures": {
981 "1": {
982 "name": "keyword.control.import.python"
983 }
984 },
985 "patterns": [
986 {
987 "name": "keyword.control.import.python",
988 "match": "\\b(?<!\\.)as\\b"
989 },
990 {
991 "include": "#expression"
992 }
993 ]
994 }
995 ]
996 },
997 "class-declaration": {
998 "patterns": [
999 {
1000 "name": "meta.class.python",
1001 "begin": "(?x)\n \\s*(class)\\s+\n (?=\n [[:alpha:]_]\\w* \\s* (:|\\()\n )\n",
1002 "end": "(:)",
1003 "beginCaptures": {
1004 "1": {
1005 "name": "storage.type.class.python"
1006 }
1007 },
1008 "endCaptures": {
1009 "1": {
1010 "name": "punctuation.section.class.begin.python"
1011 }
1012 },
1013 "patterns": [
1014 {
1015 "include": "#class-name"
1016 },
1017 {
1018 "include": "#class-inheritance"
1019 }
1020 ]
1021 }
1022 ]
1023 },
1024 "class-name": {
1025 "patterns": [
1026 {
1027 "include": "#illegal-object-name"
1028 },
1029 {
1030 "include": "#builtin-possible-callables"
1031 },
1032 {
1033 "name": "entity.name.type.class.python",
1034 "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n"
1035 }
1036 ]
1037 },
1038 "class-inheritance": {
1039 "name": "meta.class.inheritance.python",
1040 "begin": "(\\()",
1041 "end": "(\\))",
1042 "beginCaptures": {
1043 "1": {
1044 "name": "punctuation.definition.inheritance.begin.python"
1045 }
1046 },
1047 "endCaptures": {
1048 "1": {
1049 "name": "punctuation.definition.inheritance.end.python"
1050 }
1051 },
1052 "patterns": [
1053 {
1054 "name": "keyword.operator.unpacking.arguments.python",
1055 "match": "(\\*\\*|\\*)"
1056 },
1057 {
1058 "name": "punctuation.separator.inheritance.python",
1059 "match": ","
1060 },
1061 {
1062 "name": "keyword.operator.assignment.python",
1063 "match": "=(?!=)"
1064 },
1065 {
1066 "name": "support.type.metaclass.python",
1067 "match": "\\bmetaclass\\b"
1068 },
1069 {
1070 "include": "#illegal-names"
1071 },
1072 {
1073 "include": "#class-kwarg"
1074 },
1075 {
1076 "include": "#call-wrapper-inheritance"
1077 },
1078 {
1079 "include": "#expression-base"
1080 },
1081 {
1082 "include": "#member-access-class"
1083 },
1084 {
1085 "include": "#inheritance-identifier"
1086 }
1087 ]
1088 },
1089 "class-kwarg": {
1090 "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\s*(=)(?!=)\n",
1091 "captures": {
1092 "1": {
1093 "name": "entity.other.inherited-class.python variable.parameter.class.python"
1094 },
1095 "2": {
1096 "name": "keyword.operator.assignment.python"
1097 }
1098 }
1099 },
1100 "inheritance-identifier": {
1101 "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n",
1102 "captures": {
1103 "1": {
1104 "name": "entity.other.inherited-class.python"
1105 }
1106 }
1107 },
1108 "member-access-class": {
1109 "name": "meta.member.access.python",
1110 "begin": "(\\.)\\s*(?!\\.)",
1111 "end": "(?<=\\S)(?=\\W)|$",
1112 "beginCaptures": {
1113 "1": {
1114 "name": "punctuation.separator.period.python"
1115 }
1116 },
1117 "patterns": [
1118 {
1119 "include": "#call-wrapper-inheritance"
1120 },
1121 {
1122 "include": "#member-access-base"
1123 },
1124 {
1125 "include": "#inheritance-identifier"
1126 }
1127 ]
1128 },
1129 "lambda": {
1130 "patterns": [
1131 {
1132 "match": "((?<=\\.)lambda|lambda(?=\\s*[\\.=]))",
1133 "captures": {
1134 "1": {
1135 "name": "keyword.control.flow.python"
1136 }
1137 }
1138 },
1139 {
1140 "match": "\\b(lambda)\\s*?(?=[,\\n]|$)",
1141 "captures": {
1142 "1": {
1143 "name": "storage.type.function.lambda.python"
1144 }
1145 }
1146 },
1147 {
1148 "name": "meta.lambda-function.python",
1149 "begin": "(?x)\n \\b (lambda) \\b\n",
1150 "end": "(:)|(\\n)",
1151 "beginCaptures": {
1152 "1": {
1153 "name": "storage.type.function.lambda.python"
1154 }
1155 },
1156 "endCaptures": {
1157 "1": {
1158 "name": "punctuation.section.function.lambda.begin.python"
1159 }
1160 },
1161 "contentName": "meta.function.lambda.parameters.python",
1162 "patterns": [
1163 {
1164 "name": "keyword.operator.unpacking.parameter.python",
1165 "match": "(\\*\\*|\\*)"
1166 },
1167 {
1168 "include": "#lambda-nested-incomplete"
1169 },
1170 {
1171 "include": "#illegal-names"
1172 },
1173 {
1174 "match": "([[:alpha:]_]\\w*)\\s*(?:(,)|(?=:|$))",
1175 "captures": {
1176 "1": {
1177 "name": "variable.parameter.function.language.python"
1178 },
1179 "2": {
1180 "name": "punctuation.separator.parameters.python"
1181 }
1182 }
1183 },
1184 {
1185 "include": "#comments"
1186 },
1187 {
1188 "include": "#backticks"
1189 },
1190 {
1191 "include": "#illegal-anno"
1192 },
1193 {
1194 "include": "#lambda-parameter-with-default"
1195 },
1196 {
1197 "include": "#line-continuation"
1198 },
1199 {
1200 "include": "#illegal-operator"
1201 }
1202 ]
1203 }
1204 ]
1205 },
1206 "lambda-incomplete": {
1207 "name": "storage.type.function.lambda.python",
1208 "match": "\\blambda(?=\\s*[,)])"
1209 },
1210 "lambda-nested-incomplete": {
1211 "name": "storage.type.function.lambda.python",
1212 "match": "\\blambda(?=\\s*[:,)])"
1213 },
1214 "lambda-parameter-with-default": {
1215 "begin": "(?x)\n \\b\n ([[:alpha:]_]\\w*) \\s* (=)\n",
1216 "end": "(,)|(?=:|$)",
1217 "beginCaptures": {
1218 "1": {
1219 "name": "variable.parameter.function.language.python"
1220 },
1221 "2": {
1222 "name": "keyword.operator.python"
1223 }
1224 },
1225 "endCaptures": {
1226 "1": {
1227 "name": "punctuation.separator.parameters.python"
1228 }
1229 },
1230 "patterns": [
1231 {
1232 "include": "#expression"
1233 }
1234 ]
1235 },
1236 "generator": {
1237 "comment": "Match \"for ... in\" construct used in generators and for loops to\ncorrectly identify the \"in\" as a control flow keyword.\n",
1238 "begin": "\\bfor\\b",
1239 "beginCaptures": {
1240 "0": {
1241 "name": "keyword.control.flow.python"
1242 }
1243 },
1244 "end": "\\bin\\b",
1245 "endCaptures": {
1246 "0": {
1247 "name": "keyword.control.flow.python"
1248 }
1249 },
1250 "patterns": [
1251 {
1252 "include": "#expression"
1253 }
1254 ]
1255 },
1256 "function-declaration": {
1257 "name": "meta.function.python",
1258 "begin": "(?x)\n \\s*\n (?:\\b(async) \\s+)? \\b(def)\\s+\n (?=\n [[:alpha:]_][[:word:]]* \\s* \\(\n )\n",
1259 "end": "(:|(?=[#'\"\\n]))",
1260 "beginCaptures": {
1261 "1": {
1262 "name": "storage.type.function.async.python"
1263 },
1264 "2": {
1265 "name": "storage.type.function.python"
1266 }
1267 },
1268 "endCaptures": {
1269 "1": {
1270 "name": "punctuation.section.function.begin.python"
1271 }
1272 },
1273 "patterns": [
1274 {
1275 "include": "#function-def-name"
1276 },
1277 {
1278 "include": "#parameters"
1279 },
1280 {
1281 "include": "#line-continuation"
1282 },
1283 {
1284 "include": "#return-annotation"
1285 }
1286 ]
1287 },
1288 "function-def-name": {
1289 "patterns": [
1290 {
1291 "name": "entity.name.function.fallback.vyper",
1292 "match": "(?x)\n \\b (__default__) \\b\n"
1293 },
1294 {
1295 "name": "entity.name.function.constructor.vyper",
1296 "match": "(?x)\n \\b (__init__) \\b\n"
1297 },
1298 {
1299 "include": "#illegal-object-name"
1300 },
1301 {
1302 "include": "#builtin-possible-callables"
1303 },
1304 {
1305 "name": "entity.name.function.python",
1306 "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n"
1307 }
1308 ]
1309 },
1310 "parameters": {
1311 "name": "meta.function.parameters.python",
1312 "begin": "(\\()",
1313 "end": "(\\))",
1314 "beginCaptures": {
1315 "1": {
1316 "name": "punctuation.definition.parameters.begin.python"
1317 }
1318 },
1319 "endCaptures": {
1320 "1": {
1321 "name": "punctuation.definition.parameters.end.python"
1322 }
1323 },
1324 "patterns": [
1325 {
1326 "name": "keyword.operator.unpacking.parameter.python",
1327 "match": "(\\*\\*|\\*)"
1328 },
1329 {
1330 "include": "#lambda-incomplete"
1331 },
1332 {
1333 "include": "#illegal-names"
1334 },
1335 {
1336 "include": "#illegal-object-name"
1337 },
1338 {
1339 "include": "#parameter-special"
1340 },
1341 {
1342 "match": "(?x)\n ([[:alpha:]_]\\w*)\n \\s* (?: (,) | (?=[)#\\n=]))\n",
1343 "captures": {
1344 "1": {
1345 "name": "variable.parameter.function.language.python"
1346 },
1347 "2": {
1348 "name": "punctuation.separator.parameters.python"
1349 }
1350 }
1351 },
1352 {
1353 "include": "#comments"
1354 },
1355 {
1356 "include": "#loose-default"
1357 },
1358 {
1359 "include": "#annotated-parameter"
1360 }
1361 ]
1362 },
1363 "parameter-special": {
1364 "match": "(?x)\n \\b ((self)|(cls)) \\b \\s*(?:(,)|(?=\\)))\n",
1365 "captures": {
1366 "1": {
1367 "name": "variable.parameter.function.language.python"
1368 },
1369 "2": {
1370 "name": "variable.parameter.function.language.special.self.python"
1371 },
1372 "3": {
1373 "name": "variable.parameter.function.language.special.cls.python"
1374 },
1375 "4": {
1376 "name": "punctuation.separator.parameters.python"
1377 }
1378 }
1379 },
1380 "loose-default": {
1381 "begin": "(=)",
1382 "end": "(,)|(?=\\))",
1383 "beginCaptures": {
1384 "1": {
1385 "name": "keyword.operator.python"
1386 }
1387 },
1388 "endCaptures": {
1389 "1": {
1390 "name": "punctuation.separator.parameters.python"
1391 }
1392 },
1393 "patterns": [
1394 {
1395 "include": "#expression"
1396 }
1397 ]
1398 },
1399 "annotated-parameter": {
1400 "begin": "(?x)\n \\b\n ([[:alpha:]_]\\w*) \\s* (:)\n",
1401 "end": "(,)|(?=\\))",
1402 "beginCaptures": {
1403 "1": {
1404 "name": "variable.parameter.function.language.python"
1405 },
1406 "2": {
1407 "name": "punctuation.separator.annotation.python"
1408 }
1409 },
1410 "endCaptures": {
1411 "1": {
1412 "name": "punctuation.separator.parameters.python"
1413 }
1414 },
1415 "patterns": [
1416 {
1417 "include": "#expression"
1418 },
1419 {
1420 "name": "keyword.operator.assignment.python",
1421 "match": "=(?!=)"
1422 }
1423 ]
1424 },
1425 "return-annotation": {
1426 "begin": "(->)",
1427 "end": "(?=:)",
1428 "beginCaptures": {
1429 "1": {
1430 "name": "punctuation.separator.annotation.result.python"
1431 }
1432 },
1433 "patterns": [
1434 {
1435 "include": "#expression"
1436 }
1437 ]
1438 },
1439 "item-access": {
1440 "patterns": [
1441 {
1442 "name": "meta.item-access.python",
1443 "begin": "(?x)\n \\b(?=\n [[:alpha:]_]\\w* \\s* \\[\n )\n",
1444 "end": "(\\])",
1445 "endCaptures": {
1446 "1": {
1447 "name": "punctuation.definition.arguments.end.python"
1448 }
1449 },
1450 "patterns": [
1451 {
1452 "include": "#item-name"
1453 },
1454 {
1455 "include": "#item-index"
1456 },
1457 {
1458 "include": "#expression"
1459 }
1460 ]
1461 }
1462 ]
1463 },
1464 "item-name": {
1465 "patterns": [
1466 {
1467 "include": "#special-variables"
1468 },
1469 {
1470 "include": "#builtin-functions"
1471 },
1472 {
1473 "include": "#special-names"
1474 },
1475 {
1476 "name": "meta.indexed-name.python",
1477 "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n"
1478 },
1479 {
1480 "include": "#special-variables-types"
1481 }
1482 ]
1483 },
1484 "item-index": {
1485 "begin": "(\\[)",
1486 "end": "(?=\\])",
1487 "beginCaptures": {
1488 "1": {
1489 "name": "punctuation.definition.arguments.begin.python"
1490 }
1491 },
1492 "contentName": "meta.item-access.arguments.python",
1493 "patterns": [
1494 {
1495 "name": "punctuation.separator.slice.python",
1496 "match": ":"
1497 },
1498 {
1499 "include": "#expression"
1500 }
1501 ]
1502 },
1503 "decorator": {
1504 "name": "meta.function.decorator.python",
1505 "begin": "(?x)\n ^\\s*\n ((@)) \\s* (?=[[:alpha:]_]\\w*)\n",
1506 "end": "(?x)\n ( \\) )\n # trailing whitespace and comments are legal\n (?: (.*?) (?=\\s*(?:\\#|$)) )\n | (?=\\n|\\#)\n",
1507 "beginCaptures": {
1508 "1": {
1509 "name": "entity.name.function.decorator.python"
1510 },
1511 "2": {
1512 "name": "punctuation.definition.decorator.python"
1513 }
1514 },
1515 "endCaptures": {
1516 "1": {
1517 "name": "punctuation.definition.arguments.end.python"
1518 },
1519 "2": {
1520 "name": "invalid.illegal.decorator.python"
1521 }
1522 },
1523 "patterns": [
1524 {
1525 "include": "#decorator-name"
1526 },
1527 {
1528 "include": "#function-arguments"
1529 }
1530 ]
1531 },
1532 "decorator-name": {
1533 "patterns": [
1534 {
1535 "include": "#builtin-callables"
1536 },
1537 {
1538 "include": "#illegal-object-name"
1539 },
1540 {
1541 "name": "entity.name.function.decorator.python",
1542 "match": "(?x)\n ([[:alpha:]_]\\w*) | (\\.)\n",
1543 "captures": {
1544 "2": {
1545 "name": "punctuation.separator.period.python"
1546 }
1547 }
1548 },
1549 {
1550 "include": "#line-continuation"
1551 },
1552 {
1553 "name": "invalid.illegal.decorator.python",
1554 "match": "(?x)\n \\s* ([^([:alpha:]\\s_\\.#\\\\] .*?) (?=\\#|$)\n",
1555 "captures": {
1556 "1": {
1557 "name": "invalid.illegal.decorator.python"
1558 }
1559 }
1560 }
1561 ]
1562 },
1563 "call-wrapper-inheritance": {
1564 "comment": "same as a function call, but in inheritance context",
1565 "name": "meta.function-call.python",
1566 "begin": "(?x)\n \\b(?=\n ([[:alpha:]_]\\w*) \\s* (\\()\n )\n",
1567 "end": "(\\))",
1568 "endCaptures": {
1569 "1": {
1570 "name": "punctuation.definition.arguments.end.python"
1571 }
1572 },
1573 "patterns": [
1574 {
1575 "include": "#inheritance-name"
1576 },
1577 {
1578 "include": "#function-arguments"
1579 }
1580 ]
1581 },
1582 "inheritance-name": {
1583 "patterns": [
1584 {
1585 "include": "#lambda-incomplete"
1586 },
1587 {
1588 "include": "#builtin-possible-callables"
1589 },
1590 {
1591 "include": "#inheritance-identifier"
1592 }
1593 ]
1594 },
1595 "function-call": {
1596 "name": "meta.function-call.python",
1597 "comment": "Regular function call of the type \"name(args)\"",
1598 "begin": "(?x)\n \\b(?=\n ([[:alpha:]_]\\w*) \\s* (\\()\n )\n",
1599 "end": "(\\))",
1600 "endCaptures": {
1601 "1": {
1602 "name": "punctuation.definition.arguments.end.python"
1603 }
1604 },
1605 "patterns": [
1606 {
1607 "include": "#special-variables"
1608 },
1609 {
1610 "include": "#function-name"
1611 },
1612 {
1613 "include": "#function-arguments"
1614 }
1615 ]
1616 },
1617 "function-name": {
1618 "patterns": [
1619 {
1620 "include": "#builtin-possible-callables"
1621 },
1622 {
1623 "comment": "Some color schemas support meta.function-call.generic scope",
1624 "name": "meta.function-call.generic.python",
1625 "match": "(?x)\n \\b ([[:alpha:]_]\\w*) \\b\n"
1626 }
1627 ]
1628 },
1629 "function-arguments": {
1630 "begin": "(\\()",
1631 "end": "(?=\\))(?!\\)\\s*\\()",
1632 "beginCaptures": {
1633 "1": {
1634 "name": "punctuation.definition.arguments.begin.python"
1635 }
1636 },
1637 "contentName": "meta.function-call.arguments.python",
1638 "patterns": [
1639 {
1640 "name": "punctuation.separator.arguments.python",
1641 "match": "(,)"
1642 },
1643 {
1644 "match": "(?x)\n (?:(?<=[,(])|^) \\s* (\\*{1,2})\n",
1645 "captures": {
1646 "1": {
1647 "name": "keyword.operator.unpacking.arguments.python"
1648 }
1649 }
1650 },
1651 {
1652 "include": "#lambda-incomplete"
1653 },
1654 {
1655 "include": "#illegal-names"
1656 },
1657 {
1658 "match": "\\b([[:alpha:]_]\\w*)\\s*(=)(?!=)",
1659 "captures": {
1660 "1": {
1661 "name": "variable.parameter.function-call.python"
1662 },
1663 "2": {
1664 "name": "keyword.operator.assignment.python"
1665 }
1666 }
1667 },
1668 {
1669 "name": "keyword.operator.assignment.python",
1670 "match": "=(?!=)"
1671 },
1672 {
1673 "include": "#expression"
1674 },
1675 {
1676 "match": "\\s*(\\))\\s*(\\()",
1677 "captures": {
1678 "1": {
1679 "name": "punctuation.definition.arguments.end.python"
1680 },
1681 "2": {
1682 "name": "punctuation.definition.arguments.begin.python"
1683 }
1684 }
1685 }
1686 ]
1687 },
1688 "builtin-callables": {
1689 "patterns": [
1690 {
1691 "include": "#illegal-names"
1692 },
1693 {
1694 "include": "#illegal-object-name"
1695 },
1696 {
1697 "include": "#builtin-exceptions"
1698 },
1699 {
1700 "include": "#builtin-functions"
1701 },
1702 {
1703 "include": "#builtin-types"
1704 }
1705 ]
1706 },
1707 "builtin-possible-callables": {
1708 "patterns": [
1709 {
1710 "include": "#builtin-callables"
1711 },
1712 {
1713 "include": "#magic-names"
1714 }
1715 ]
1716 },
1717 "builtin-exceptions": {
1718 "name": "support.type.exception.python",
1719 "match": "(?x) (?<!\\.) \\b(\n (\n Arithmetic | Assertion | Attribute | Buffer | BlockingIO\n | BrokenPipe | ChildProcess\n | (Connection (Aborted | Refused | Reset)?)\n | EOF | Environment | FileExists | FileNotFound\n | FloatingPoint | IO | Import | Indentation | Index | Interrupted\n | IsADirectory | NotADirectory | Permission | ProcessLookup\n | Timeout\n | Key | Lookup | Memory | Name | NotImplemented | OS | Overflow\n | Reference | Runtime | Recursion | Syntax | System\n | Tab | Type | UnboundLocal | Unicode(Encode|Decode|Translate)?\n | Value | Windows | ZeroDivision | ModuleNotFound\n ) Error\n|\n ((Pending)?Deprecation | Runtime | Syntax | User | Future | Import\n | Unicode | Bytes | Resource\n )? Warning\n|\n SystemExit | Stop(Async)?Iteration\n | KeyboardInterrupt\n | GeneratorExit | (Base)?Exception\n)\\b\n"
1720 },
1721 "builtin-functions": {
1722 "patterns": [
1723 {
1724 "name": "support.function.builtin.python",
1725 "match": "(?x)\n (?<!\\.) \\b(\n __import__ | abs | all | any | ascii | bin | breakpoint | callable\n | chr | compile | copyright | credits | delattr | dir | divmod\n | enumerate | eval | exec | exit | filter | format | getattr\n | globals | hasattr | hash | help | hex | id | input\n | isinstance | issubclass | iter | len | license | locals | map\n | max | memoryview | min | next | oct | open | ord | pow | print\n | quit | range | reload | repr | reversed | round\n | setattr | sorted | sum | vars | zip\n )\\b\n"
1726 },
1727 {
1728 "name": "variable.legacy.builtin.python",
1729 "match": "(?x)\n (?<!\\.) \\b(\n file | reduce | intern | raw_input | unicode | cmp | basestring\n | execfile | long | xrange\n )\\b\n"
1730 },
1731 {
1732 "name": "support.function.builtin.vyper",
1733 "match": "(?x)\n (?<!\\.) \\b(\n _abi_encode | floor | ceil | convert | slice | len | concat | sha256 | method_id | keccak256 | ecrecover | ecadd | ecmul | extract32 | as_wei_value | raw_call | blockhash | bitwise_and | bitwise_or | bitwise_xor | bitwise_not | uint256_addmod | uint256_mulmod | pow_mod256 | sqrt | shift | create_forwarder_to | min | max | empty | abs )\\b\n"
1734 },
1735 {
1736 "name": "support.function.builtin.lowlevel.vyper",
1737 "match": "(?x)\n (?<!\\.) \\b(\n send | selfdestruct | raw_call | raw_log | create_forwarder_to )\\b\n"
1738 },
1739 {
1740 "name": "support.type.event.vyper",
1741 "match": "(?x)\n (?<!\\.) \\b(\n event )\\b\n"
1742 },
1743 {
1744 "name": "support.type.reference.vyper",
1745 "match": "(?x)\n (?<!\\.) \\b(\n map | struct | HashMap )\\b\n"
1746 },
1747 {
1748 "name": "support.function.builtin.modifiers.safe.vyper",
1749 "match": "(?x)\n (?<!\\.) \\b(\n private | nonreentrant | constant | event | internal | view | pure )\\b\n"
1750 },
1751 {
1752 "name": "support.function.builtin.modifiers.unsafe.vyper",
1753 "match": "(?x)\n (?<!\\.) \\b(\n public | payable | modifying | external )\\b\n"
1754 }
1755 ]
1756 },
1757 "builtin-types": {
1758 "patterns": [
1759 {
1760 "name": "support.type.python",
1761 "match": "(?x)\n (?<!\\.) \\b(\n bool | bytearray | bytes | classmethod | complex | dict\n | float | frozenset | int | list | object | property\n | set | slice | staticmethod | str | tuple | type\n\n (?# Although 'super' is not a type, it's related to types,\n and is special enough to be highlighted differently from\n other built-ins)\n | super\n )\\b\n"
1762 },
1763 {
1764 "name": "support.type.basetype.vyper",
1765 "match": "(?x)\n (?<!\\.) \\b(\n bytes32 | bytearray | wei_value | timestamp | int256 | uint8 | uint256 | decimal | timedelta | string | int128 | address | bool | bytes )\\b\n"
1766 },
1767 {
1768 "name": "support.type.keywords.vyper",
1769 "match": "(?x)\n (?<!\\.) \\b(\n finney | gwei | range | def | ____init____ | timedelta | babbage | zero_address | raise | external | empty_bytes32 | assert | continue | wei | ada | min_int256 | min_int128 | chainid | max_decimal | default | indexed | selfdestruct | lovelace | immutable | throw | kwei | max_int128 | while | constant | ___default___ | balance | twei | codesize | false | max_int256 | _default_ | init | mwei | if | ____default____ | true | payable | internal | until | this | nonpayable | pass | public | nonreentrant | blockhash | max_uint256 | shannon | none | units | _init_ | ___init___ | is_contract | for | zero_wei | min_decimal | szabo | timestamp | ether | pwei | send )\\b\n"
1770 },
1771 {
1772 "name": "support.type.unit.vyper",
1773 "match": "(?x)\n (?<!\\.) \\b(\n shannon | finney | gwei | twei | kwei | wei | lovelace | ether | szabo | pwei | babbage | mwei | ada \n\n (?# Although 'super' is not a type, it's related to types,\n and is special enough to be highlighted differently from\n other built-ins)\n | super\n )\\b\n"
1774 },
1775 {
1776 "name": "support.type.constant.vyper",
1777 "match": "(?x)\n (?<!\\.) \\b(\n ZERO_ADDRESS | EMPTY_BYTES32 | MAX_INT128 | MIN_INT128 | MAX_DECIMAL | MIN_DECIMAL | MAX_UINT256 \n\n (?# Although 'super' is not a type, it's related to types,\n and is special enough to be highlighted differently from\n other built-ins)\n | super\n )\\b\n"
1778 },
1779 {
1780 "name": "entity.other.inherited-class.interface.vyper",
1781 "match": "(?x)\n (?<!\\.) \\b(\n implements )\\b\n"
1782 }
1783 ]
1784 },
1785 "magic-function-names": {
1786 "comment": "these methods have magic interpretation by python and are generally called\nindirectly through syntactic constructs\n",
1787 "match": "(?x)\n \\b(\n __(?:\n abs | add | aenter | aexit | aiter | and | anext | await\n | bool | call | ceil | cmp | coerce | complex | contains\n | copy | deepcopy | del | delattr | delete | delitem\n | delslice | dir | div | divmod | enter | eq | exit | float\n | floor | floordiv | format | ge | get | getattr\n | getattribute | getinitargs | getitem | getnewargs\n | getslice | getstate | gt | hash | hex | iadd | iand | idiv\n | ifloordiv | ilshift | imod | imul | index | init\n | instancecheck | int | invert | ior | ipow | irshift | isub\n | iter | itruediv | ixor | le | len | long | lshift | lt\n | missing | mod | mul | ne | neg | new | next | nonzero | oct | or\n | pos | pow | radd | rand | rdiv | rdivmod | reduce\n | reduce_ex | repr | reversed | rfloordiv | rlshift | rmod\n | rmul | ror | round | rpow | rrshift | rshift | rsub\n | rtruediv | rxor | set | setattr | setitem | setslice\n | setstate | sizeof | str | sub | subclasscheck | truediv\n | trunc | unicode | xor | matmul | rmatmul | imatmul\n | init_subclass | set_name | fspath | bytes | prepare\n )__\n )\\b\n",
1788 "captures": {
1789 "1": {
1790 "name": "support.function.magic.python"
1791 }
1792 }
1793 },
1794 "magic-variable-names": {
1795 "comment": "magic variables which a class/module may have.",
1796 "match": "(?x)\n \\b(\n __(?:\n all | bases | builtins | class | class_getitem | code | debug\n | defaults | dict | doc | file | func | kwdefaults | members\n | metaclass | methods | module | mro | mro_entries | name\n | qualname | post_init | self | signature | slots | subclasses\n | version | weakref | wrapped | annotations | classcell\n | spec | path | package | future | traceback\n )__\n )\\b\n",
1797 "captures": {
1798 "1": {
1799 "name": "support.variable.magic.python"
1800 }
1801 }
1802 },
1803 "magic-names": {
1804 "patterns": [
1805 {
1806 "include": "#magic-function-names"
1807 },
1808 {
1809 "include": "#magic-variable-names"
1810 }
1811 ]
1812 },
1813 "illegal-names": {
1814 "match": "(?x)\n \\b(?:\n (\n and | assert | async | await | break | class | continue | def\n | del | elif | else | except | finally | for | from | global\n | if | in | is | (?<=\\.)lambda | lambda(?=\\s*[\\.=])\n | nonlocal | not | or | pass | raise | return | try | while | with\n | yield\n ) | (\n as | import\n )\n )\\b\n",
1815 "captures": {
1816 "1": {
1817 "name": "keyword.control.flow.python"
1818 },
1819 "2": {
1820 "name": "keyword.control.import.python"
1821 }
1822 }
1823 },
1824 "special-variables": {
1825 "match": "(?x)\n \\b (?<!\\.) (?:\n (self) | (cls)\n )\\b\n",
1826 "captures": {
1827 "1": {
1828 "name": "variable.language.special.self.python"
1829 },
1830 "2": {
1831 "name": "variable.language.special.cls.python"
1832 }
1833 }
1834 },
1835 "ellipsis": {
1836 "name": "constant.other.ellipsis.python",
1837 "match": "\\.\\.\\."
1838 },
1839 "backticks": {
1840 "name": "invalid.deprecated.backtick.python",
1841 "begin": "\\`",
1842 "end": "(?:\\`|(?<!\\\\)(\\n))",
1843 "patterns": [
1844 {
1845 "include": "#expression"
1846 }
1847 ]
1848 },
1849 "illegal-operator": {
1850 "patterns": [
1851 {
1852 "name": "invalid.illegal.operator.python",
1853 "match": "&&|\\|\\||--|\\+\\+"
1854 },
1855 {
1856 "name": "invalid.illegal.operator.python",
1857 "match": "[?$]"
1858 },
1859 {
1860 "name": "invalid.illegal.operator.python",
1861 "comment": "We don't want `!` to flash when we're typing `!=`",
1862 "match": "!\\b"
1863 }
1864 ]
1865 },
1866 "illegal-object-name": {
1867 "comment": "It's illegal to name class or function \"True\"",
1868 "name": "keyword.illegal.name.python",
1869 "match": "\\b(True|False|None)\\b"
1870 },
1871 "illegal-anno": {
1872 "name": "invalid.illegal.annotation.python",
1873 "match": "->"
1874 },
1875 "regexp-base-expression": {
1876 "patterns": [
1877 {
1878 "include": "#regexp-quantifier"
1879 },
1880 {
1881 "include": "#regexp-base-common"
1882 }
1883 ]
1884 },
1885 "fregexp-base-expression": {
1886 "patterns": [
1887 {
1888 "include": "#fregexp-quantifier"
1889 },
1890 {
1891 "include": "#fstring-formatting-braces"
1892 },
1893 {
1894 "match": "\\{.*?\\}"
1895 },
1896 {
1897 "include": "#regexp-base-common"
1898 }
1899 ]
1900 },
1901 "fstring-formatting-braces": {
1902 "patterns": [
1903 {
1904 "comment": "empty braces are illegal",
1905 "match": "({)(\\s*?)(})",
1906 "captures": {
1907 "1": {
1908 "name": "constant.character.format.placeholder.other.python"
1909 },
1910 "2": {
1911 "name": "invalid.illegal.brace.python"
1912 },
1913 "3": {
1914 "name": "constant.character.format.placeholder.other.python"
1915 }
1916 }
1917 },
1918 {
1919 "name": "constant.character.escape.python",
1920 "match": "({{|}})"
1921 }
1922 ]
1923 },
1924 "regexp-base-common": {
1925 "patterns": [
1926 {
1927 "name": "support.other.match.any.regexp",
1928 "match": "\\."
1929 },
1930 {
1931 "name": "support.other.match.begin.regexp",
1932 "match": "\\^"
1933 },
1934 {
1935 "name": "support.other.match.end.regexp",
1936 "match": "\\$"
1937 },
1938 {
1939 "name": "keyword.operator.quantifier.regexp",
1940 "match": "[+*?]\\??"
1941 },
1942 {
1943 "name": "keyword.operator.disjunction.regexp",
1944 "match": "\\|"
1945 },
1946 {
1947 "include": "#regexp-escape-sequence"
1948 }
1949 ]
1950 },
1951 "regexp-quantifier": {
1952 "name": "keyword.operator.quantifier.regexp",
1953 "match": "(?x)\n \\{(\n \\d+ | \\d+,(\\d+)? | ,\\d+\n )\\}\n"
1954 },
1955 "fregexp-quantifier": {
1956 "name": "keyword.operator.quantifier.regexp",
1957 "match": "(?x)\n \\{\\{(\n \\d+ | \\d+,(\\d+)? | ,\\d+\n )\\}\\}\n"
1958 },
1959 "regexp-backreference-number": {
1960 "name": "meta.backreference.regexp",
1961 "match": "(\\\\[1-9]\\d?)",
1962 "captures": {
1963 "1": {
1964 "name": "entity.name.tag.backreference.regexp"
1965 }
1966 }
1967 },
1968 "regexp-backreference": {
1969 "name": "meta.backreference.named.regexp",
1970 "match": "(?x)\n (\\() (\\?P= \\w+(?:\\s+[[:alnum:]]+)?) (\\))\n",
1971 "captures": {
1972 "1": {
1973 "name": "support.other.parenthesis.regexp punctuation.parenthesis.backreference.named.begin.regexp"
1974 },
1975 "2": {
1976 "name": "entity.name.tag.named.backreference.regexp"
1977 },
1978 "3": {
1979 "name": "support.other.parenthesis.regexp punctuation.parenthesis.backreference.named.end.regexp"
1980 }
1981 }
1982 },
1983 "regexp-flags": {
1984 "name": "storage.modifier.flag.regexp",
1985 "match": "\\(\\?[aiLmsux]+\\)"
1986 },
1987 "regexp-escape-special": {
1988 "name": "support.other.escape.special.regexp",
1989 "match": "\\\\([AbBdDsSwWZ])"
1990 },
1991 "regexp-escape-character": {
1992 "name": "constant.character.escape.regexp",
1993 "match": "(?x)\n \\\\ (\n x[0-9A-Fa-f]{2}\n | 0[0-7]{1,2}\n | [0-7]{3}\n )\n"
1994 },
1995 "regexp-escape-unicode": {
1996 "name": "constant.character.unicode.regexp",
1997 "match": "(?x)\n \\\\ (\n u[0-9A-Fa-f]{4}\n | U[0-9A-Fa-f]{8}\n )\n"
1998 },
1999 "regexp-escape-catchall": {
2000 "name": "constant.character.escape.regexp",
2001 "match": "\\\\(.|\\n)"
2002 },
2003 "regexp-escape-sequence": {
2004 "patterns": [
2005 {
2006 "include": "#regexp-escape-special"
2007 },
2008 {
2009 "include": "#regexp-escape-character"
2010 },
2011 {
2012 "include": "#regexp-escape-unicode"
2013 },
2014 {
2015 "include": "#regexp-backreference-number"
2016 },
2017 {
2018 "include": "#regexp-escape-catchall"
2019 }
2020 ]
2021 },
2022 "regexp-charecter-set-escapes": {
2023 "patterns": [
2024 {
2025 "name": "constant.character.escape.regexp",
2026 "match": "\\\\[abfnrtv\\\\]"
2027 },
2028 {
2029 "include": "#regexp-escape-special"
2030 },
2031 {
2032 "name": "constant.character.escape.regexp",
2033 "match": "\\\\([0-7]{1,3})"
2034 },
2035 {
2036 "include": "#regexp-escape-character"
2037 },
2038 {
2039 "include": "#regexp-escape-unicode"
2040 },
2041 {
2042 "include": "#regexp-escape-catchall"
2043 }
2044 ]
2045 },
2046 "codetags": {
2047 "match": "(?:\\b(NOTE|XXX|HACK|FIXME|BUG|TODO)\\b)",
2048 "captures": {
2049 "1": {
2050 "name": "keyword.codetag.notation.python"
2051 }
2052 }
2053 },
2054 "comments-base": {
2055 "name": "comment.line.number-sign.python",
2056 "begin": "(\\#)",
2057 "beginCaptures": {
2058 "1": {
2059 "name": "punctuation.definition.comment.python"
2060 }
2061 },
2062 "end": "($)",
2063 "patterns": [
2064 {
2065 "include": "#codetags"
2066 }
2067 ]
2068 },
2069 "comments-string-single-three": {
2070 "name": "comment.line.number-sign.python",
2071 "begin": "(\\#)",
2072 "beginCaptures": {
2073 "1": {
2074 "name": "punctuation.definition.comment.python"
2075 }
2076 },
2077 "end": "($|(?='''))",
2078 "patterns": [
2079 {
2080 "include": "#codetags"
2081 }
2082 ]
2083 },
2084 "comments-string-double-three": {
2085 "name": "comment.line.number-sign.python",
2086 "begin": "(\\#)",
2087 "beginCaptures": {
2088 "1": {
2089 "name": "punctuation.definition.comment.python"
2090 }
2091 },
2092 "end": "($|(?=\"\"\"))",
2093 "patterns": [
2094 {
2095 "include": "#codetags"
2096 }
2097 ]
2098 },
2099 "single-one-regexp-expression": {
2100 "patterns": [
2101 {
2102 "include": "#regexp-base-expression"
2103 },
2104 {
2105 "include": "#single-one-regexp-character-set"
2106 },
2107 {
2108 "include": "#single-one-regexp-comments"
2109 },
2110 {
2111 "include": "#regexp-flags"
2112 },
2113 {
2114 "include": "#single-one-regexp-named-group"
2115 },
2116 {
2117 "include": "#regexp-backreference"
2118 },
2119 {
2120 "include": "#single-one-regexp-lookahead"
2121 },
2122 {
2123 "include": "#single-one-regexp-lookahead-negative"
2124 },
2125 {
2126 "include": "#single-one-regexp-lookbehind"
2127 },
2128 {
2129 "include": "#single-one-regexp-lookbehind-negative"
2130 },
2131 {
2132 "include": "#single-one-regexp-conditional"
2133 },
2134 {
2135 "include": "#single-one-regexp-parentheses-non-capturing"
2136 },
2137 {
2138 "include": "#single-one-regexp-parentheses"
2139 }
2140 ]
2141 },
2142 "single-one-regexp-character-set": {
2143 "patterns": [
2144 {
2145 "match": "(?x)\n \\[ \\^? \\] (?! .*?\\])\n"
2146 },
2147 {
2148 "name": "meta.character.set.regexp",
2149 "begin": "(\\[)(\\^)?(\\])?",
2150 "end": "(\\]|(?=\\'))|((?=(?<!\\\\)\\n))",
2151 "beginCaptures": {
2152 "1": {
2153 "name": "punctuation.character.set.begin.regexp constant.other.set.regexp"
2154 },
2155 "2": {
2156 "name": "keyword.operator.negation.regexp"
2157 },
2158 "3": {
2159 "name": "constant.character.set.regexp"
2160 }
2161 },
2162 "endCaptures": {
2163 "1": {
2164 "name": "punctuation.character.set.end.regexp constant.other.set.regexp"
2165 },
2166 "2": {
2167 "name": "invalid.illegal.newline.python"
2168 }
2169 },
2170 "patterns": [
2171 {
2172 "include": "#regexp-charecter-set-escapes"
2173 },
2174 {
2175 "name": "constant.character.set.regexp",
2176 "match": "[^\\n]"
2177 }
2178 ]
2179 }
2180 ]
2181 },
2182 "single-one-regexp-named-group": {
2183 "name": "meta.named.regexp",
2184 "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n",
2185 "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
2186 "beginCaptures": {
2187 "1": {
2188 "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"
2189 },
2190 "2": {
2191 "name": "entity.name.tag.named.group.regexp"
2192 }
2193 },
2194 "endCaptures": {
2195 "1": {
2196 "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp"
2197 },
2198 "2": {
2199 "name": "invalid.illegal.newline.python"
2200 }
2201 },
2202 "patterns": [
2203 {
2204 "include": "#single-one-regexp-expression"
2205 }
2206 ]
2207 },
2208 "single-one-regexp-comments": {
2209 "name": "comment.regexp",
2210 "begin": "\\(\\?#",
2211 "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
2212 "beginCaptures": {
2213 "0": {
2214 "name": "punctuation.comment.begin.regexp"
2215 }
2216 },
2217 "endCaptures": {
2218 "1": {
2219 "name": "punctuation.comment.end.regexp"
2220 },
2221 "2": {
2222 "name": "invalid.illegal.newline.python"
2223 }
2224 },
2225 "patterns": [
2226 {
2227 "include": "#codetags"
2228 }
2229 ]
2230 },
2231 "single-one-regexp-lookahead": {
2232 "begin": "(\\()\\?=",
2233 "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
2234 "beginCaptures": {
2235 "0": {
2236 "name": "keyword.operator.lookahead.regexp"
2237 },
2238 "1": {
2239 "name": "punctuation.parenthesis.lookahead.begin.regexp"
2240 }
2241 },
2242 "endCaptures": {
2243 "1": {
2244 "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp"
2245 },
2246 "2": {
2247 "name": "invalid.illegal.newline.python"
2248 }
2249 },
2250 "patterns": [
2251 {
2252 "include": "#single-one-regexp-expression"
2253 }
2254 ]
2255 },
2256 "single-one-regexp-lookahead-negative": {
2257 "begin": "(\\()\\?!",
2258 "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
2259 "beginCaptures": {
2260 "0": {
2261 "name": "keyword.operator.lookahead.negative.regexp"
2262 },
2263 "1": {
2264 "name": "punctuation.parenthesis.lookahead.begin.regexp"
2265 }
2266 },
2267 "endCaptures": {
2268 "1": {
2269 "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp"
2270 },
2271 "2": {
2272 "name": "invalid.illegal.newline.python"
2273 }
2274 },
2275 "patterns": [
2276 {
2277 "include": "#single-one-regexp-expression"
2278 }
2279 ]
2280 },
2281 "single-one-regexp-lookbehind": {
2282 "begin": "(\\()\\?<=",
2283 "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
2284 "beginCaptures": {
2285 "0": {
2286 "name": "keyword.operator.lookbehind.regexp"
2287 },
2288 "1": {
2289 "name": "punctuation.parenthesis.lookbehind.begin.regexp"
2290 }
2291 },
2292 "endCaptures": {
2293 "1": {
2294 "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp"
2295 },
2296 "2": {
2297 "name": "invalid.illegal.newline.python"
2298 }
2299 },
2300 "patterns": [
2301 {
2302 "include": "#single-one-regexp-expression"
2303 }
2304 ]
2305 },
2306 "single-one-regexp-lookbehind-negative": {
2307 "begin": "(\\()\\?<!",
2308 "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
2309 "beginCaptures": {
2310 "0": {
2311 "name": "keyword.operator.lookbehind.negative.regexp"
2312 },
2313 "1": {
2314 "name": "punctuation.parenthesis.lookbehind.begin.regexp"
2315 }
2316 },
2317 "endCaptures": {
2318 "1": {
2319 "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp"
2320 },
2321 "2": {
2322 "name": "invalid.illegal.newline.python"
2323 }
2324 },
2325 "patterns": [
2326 {
2327 "include": "#single-one-regexp-expression"
2328 }
2329 ]
2330 },
2331 "single-one-regexp-conditional": {
2332 "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)",
2333 "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
2334 "beginCaptures": {
2335 "0": {
2336 "name": "keyword.operator.conditional.regexp"
2337 },
2338 "1": {
2339 "name": "punctuation.parenthesis.conditional.begin.regexp"
2340 }
2341 },
2342 "endCaptures": {
2343 "1": {
2344 "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp"
2345 },
2346 "2": {
2347 "name": "invalid.illegal.newline.python"
2348 }
2349 },
2350 "patterns": [
2351 {
2352 "include": "#single-one-regexp-expression"
2353 }
2354 ]
2355 },
2356 "single-one-regexp-parentheses-non-capturing": {
2357 "begin": "\\(\\?:",
2358 "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
2359 "beginCaptures": {
2360 "0": {
2361 "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp"
2362 }
2363 },
2364 "endCaptures": {
2365 "1": {
2366 "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp"
2367 },
2368 "2": {
2369 "name": "invalid.illegal.newline.python"
2370 }
2371 },
2372 "patterns": [
2373 {
2374 "include": "#single-one-regexp-expression"
2375 }
2376 ]
2377 },
2378 "single-one-regexp-parentheses": {
2379 "begin": "\\(",
2380 "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
2381 "beginCaptures": {
2382 "0": {
2383 "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp"
2384 }
2385 },
2386 "endCaptures": {
2387 "1": {
2388 "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp"
2389 },
2390 "2": {
2391 "name": "invalid.illegal.newline.python"
2392 }
2393 },
2394 "patterns": [
2395 {
2396 "include": "#single-one-regexp-expression"
2397 }
2398 ]
2399 },
2400 "single-three-regexp-expression": {
2401 "patterns": [
2402 {
2403 "include": "#regexp-base-expression"
2404 },
2405 {
2406 "include": "#single-three-regexp-character-set"
2407 },
2408 {
2409 "include": "#single-three-regexp-comments"
2410 },
2411 {
2412 "include": "#regexp-flags"
2413 },
2414 {
2415 "include": "#single-three-regexp-named-group"
2416 },
2417 {
2418 "include": "#regexp-backreference"
2419 },
2420 {
2421 "include": "#single-three-regexp-lookahead"
2422 },
2423 {
2424 "include": "#single-three-regexp-lookahead-negative"
2425 },
2426 {
2427 "include": "#single-three-regexp-lookbehind"
2428 },
2429 {
2430 "include": "#single-three-regexp-lookbehind-negative"
2431 },
2432 {
2433 "include": "#single-three-regexp-conditional"
2434 },
2435 {
2436 "include": "#single-three-regexp-parentheses-non-capturing"
2437 },
2438 {
2439 "include": "#single-three-regexp-parentheses"
2440 },
2441 {
2442 "include": "#comments-string-single-three"
2443 }
2444 ]
2445 },
2446 "single-three-regexp-character-set": {
2447 "patterns": [
2448 {
2449 "match": "(?x)\n \\[ \\^? \\] (?! .*?\\])\n"
2450 },
2451 {
2452 "name": "meta.character.set.regexp",
2453 "begin": "(\\[)(\\^)?(\\])?",
2454 "end": "(\\]|(?=\\'\\'\\'))",
2455 "beginCaptures": {
2456 "1": {
2457 "name": "punctuation.character.set.begin.regexp constant.other.set.regexp"
2458 },
2459 "2": {
2460 "name": "keyword.operator.negation.regexp"
2461 },
2462 "3": {
2463 "name": "constant.character.set.regexp"
2464 }
2465 },
2466 "endCaptures": {
2467 "1": {
2468 "name": "punctuation.character.set.end.regexp constant.other.set.regexp"
2469 },
2470 "2": {
2471 "name": "invalid.illegal.newline.python"
2472 }
2473 },
2474 "patterns": [
2475 {
2476 "include": "#regexp-charecter-set-escapes"
2477 },
2478 {
2479 "name": "constant.character.set.regexp",
2480 "match": "[^\\n]"
2481 }
2482 ]
2483 }
2484 ]
2485 },
2486 "single-three-regexp-named-group": {
2487 "name": "meta.named.regexp",
2488 "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n",
2489 "end": "(\\)|(?=\\'\\'\\'))",
2490 "beginCaptures": {
2491 "1": {
2492 "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"
2493 },
2494 "2": {
2495 "name": "entity.name.tag.named.group.regexp"
2496 }
2497 },
2498 "endCaptures": {
2499 "1": {
2500 "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp"
2501 },
2502 "2": {
2503 "name": "invalid.illegal.newline.python"
2504 }
2505 },
2506 "patterns": [
2507 {
2508 "include": "#single-three-regexp-expression"
2509 },
2510 {
2511 "include": "#comments-string-single-three"
2512 }
2513 ]
2514 },
2515 "single-three-regexp-comments": {
2516 "name": "comment.regexp",
2517 "begin": "\\(\\?#",
2518 "end": "(\\)|(?=\\'\\'\\'))",
2519 "beginCaptures": {
2520 "0": {
2521 "name": "punctuation.comment.begin.regexp"
2522 }
2523 },
2524 "endCaptures": {
2525 "1": {
2526 "name": "punctuation.comment.end.regexp"
2527 },
2528 "2": {
2529 "name": "invalid.illegal.newline.python"
2530 }
2531 },
2532 "patterns": [
2533 {
2534 "include": "#codetags"
2535 }
2536 ]
2537 },
2538 "single-three-regexp-lookahead": {
2539 "begin": "(\\()\\?=",
2540 "end": "(\\)|(?=\\'\\'\\'))",
2541 "beginCaptures": {
2542 "0": {
2543 "name": "keyword.operator.lookahead.regexp"
2544 },
2545 "1": {
2546 "name": "punctuation.parenthesis.lookahead.begin.regexp"
2547 }
2548 },
2549 "endCaptures": {
2550 "1": {
2551 "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp"
2552 },
2553 "2": {
2554 "name": "invalid.illegal.newline.python"
2555 }
2556 },
2557 "patterns": [
2558 {
2559 "include": "#single-three-regexp-expression"
2560 },
2561 {
2562 "include": "#comments-string-single-three"
2563 }
2564 ]
2565 },
2566 "single-three-regexp-lookahead-negative": {
2567 "begin": "(\\()\\?!",
2568 "end": "(\\)|(?=\\'\\'\\'))",
2569 "beginCaptures": {
2570 "0": {
2571 "name": "keyword.operator.lookahead.negative.regexp"
2572 },
2573 "1": {
2574 "name": "punctuation.parenthesis.lookahead.begin.regexp"
2575 }
2576 },
2577 "endCaptures": {
2578 "1": {
2579 "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp"
2580 },
2581 "2": {
2582 "name": "invalid.illegal.newline.python"
2583 }
2584 },
2585 "patterns": [
2586 {
2587 "include": "#single-three-regexp-expression"
2588 },
2589 {
2590 "include": "#comments-string-single-three"
2591 }
2592 ]
2593 },
2594 "single-three-regexp-lookbehind": {
2595 "begin": "(\\()\\?<=",
2596 "end": "(\\)|(?=\\'\\'\\'))",
2597 "beginCaptures": {
2598 "0": {
2599 "name": "keyword.operator.lookbehind.regexp"
2600 },
2601 "1": {
2602 "name": "punctuation.parenthesis.lookbehind.begin.regexp"
2603 }
2604 },
2605 "endCaptures": {
2606 "1": {
2607 "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp"
2608 },
2609 "2": {
2610 "name": "invalid.illegal.newline.python"
2611 }
2612 },
2613 "patterns": [
2614 {
2615 "include": "#single-three-regexp-expression"
2616 },
2617 {
2618 "include": "#comments-string-single-three"
2619 }
2620 ]
2621 },
2622 "single-three-regexp-lookbehind-negative": {
2623 "begin": "(\\()\\?<!",
2624 "end": "(\\)|(?=\\'\\'\\'))",
2625 "beginCaptures": {
2626 "0": {
2627 "name": "keyword.operator.lookbehind.negative.regexp"
2628 },
2629 "1": {
2630 "name": "punctuation.parenthesis.lookbehind.begin.regexp"
2631 }
2632 },
2633 "endCaptures": {
2634 "1": {
2635 "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp"
2636 },
2637 "2": {
2638 "name": "invalid.illegal.newline.python"
2639 }
2640 },
2641 "patterns": [
2642 {
2643 "include": "#single-three-regexp-expression"
2644 },
2645 {
2646 "include": "#comments-string-single-three"
2647 }
2648 ]
2649 },
2650 "single-three-regexp-conditional": {
2651 "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)",
2652 "end": "(\\)|(?=\\'\\'\\'))",
2653 "beginCaptures": {
2654 "0": {
2655 "name": "keyword.operator.conditional.regexp"
2656 },
2657 "1": {
2658 "name": "punctuation.parenthesis.conditional.begin.regexp"
2659 }
2660 },
2661 "endCaptures": {
2662 "1": {
2663 "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp"
2664 },
2665 "2": {
2666 "name": "invalid.illegal.newline.python"
2667 }
2668 },
2669 "patterns": [
2670 {
2671 "include": "#single-three-regexp-expression"
2672 },
2673 {
2674 "include": "#comments-string-single-three"
2675 }
2676 ]
2677 },
2678 "single-three-regexp-parentheses-non-capturing": {
2679 "begin": "\\(\\?:",
2680 "end": "(\\)|(?=\\'\\'\\'))",
2681 "beginCaptures": {
2682 "0": {
2683 "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp"
2684 }
2685 },
2686 "endCaptures": {
2687 "1": {
2688 "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp"
2689 },
2690 "2": {
2691 "name": "invalid.illegal.newline.python"
2692 }
2693 },
2694 "patterns": [
2695 {
2696 "include": "#single-three-regexp-expression"
2697 },
2698 {
2699 "include": "#comments-string-single-three"
2700 }
2701 ]
2702 },
2703 "single-three-regexp-parentheses": {
2704 "begin": "\\(",
2705 "end": "(\\)|(?=\\'\\'\\'))",
2706 "beginCaptures": {
2707 "0": {
2708 "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp"
2709 }
2710 },
2711 "endCaptures": {
2712 "1": {
2713 "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp"
2714 },
2715 "2": {
2716 "name": "invalid.illegal.newline.python"
2717 }
2718 },
2719 "patterns": [
2720 {
2721 "include": "#single-three-regexp-expression"
2722 },
2723 {
2724 "include": "#comments-string-single-three"
2725 }
2726 ]
2727 },
2728 "double-one-regexp-expression": {
2729 "patterns": [
2730 {
2731 "include": "#regexp-base-expression"
2732 },
2733 {
2734 "include": "#double-one-regexp-character-set"
2735 },
2736 {
2737 "include": "#double-one-regexp-comments"
2738 },
2739 {
2740 "include": "#regexp-flags"
2741 },
2742 {
2743 "include": "#double-one-regexp-named-group"
2744 },
2745 {
2746 "include": "#regexp-backreference"
2747 },
2748 {
2749 "include": "#double-one-regexp-lookahead"
2750 },
2751 {
2752 "include": "#double-one-regexp-lookahead-negative"
2753 },
2754 {
2755 "include": "#double-one-regexp-lookbehind"
2756 },
2757 {
2758 "include": "#double-one-regexp-lookbehind-negative"
2759 },
2760 {
2761 "include": "#double-one-regexp-conditional"
2762 },
2763 {
2764 "include": "#double-one-regexp-parentheses-non-capturing"
2765 },
2766 {
2767 "include": "#double-one-regexp-parentheses"
2768 }
2769 ]
2770 },
2771 "double-one-regexp-character-set": {
2772 "patterns": [
2773 {
2774 "match": "(?x)\n \\[ \\^? \\] (?! .*?\\])\n"
2775 },
2776 {
2777 "name": "meta.character.set.regexp",
2778 "begin": "(\\[)(\\^)?(\\])?",
2779 "end": "(\\]|(?=\"))|((?=(?<!\\\\)\\n))",
2780 "beginCaptures": {
2781 "1": {
2782 "name": "punctuation.character.set.begin.regexp constant.other.set.regexp"
2783 },
2784 "2": {
2785 "name": "keyword.operator.negation.regexp"
2786 },
2787 "3": {
2788 "name": "constant.character.set.regexp"
2789 }
2790 },
2791 "endCaptures": {
2792 "1": {
2793 "name": "punctuation.character.set.end.regexp constant.other.set.regexp"
2794 },
2795 "2": {
2796 "name": "invalid.illegal.newline.python"
2797 }
2798 },
2799 "patterns": [
2800 {
2801 "include": "#regexp-charecter-set-escapes"
2802 },
2803 {
2804 "name": "constant.character.set.regexp",
2805 "match": "[^\\n]"
2806 }
2807 ]
2808 }
2809 ]
2810 },
2811 "double-one-regexp-named-group": {
2812 "name": "meta.named.regexp",
2813 "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n",
2814 "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
2815 "beginCaptures": {
2816 "1": {
2817 "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"
2818 },
2819 "2": {
2820 "name": "entity.name.tag.named.group.regexp"
2821 }
2822 },
2823 "endCaptures": {
2824 "1": {
2825 "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp"
2826 },
2827 "2": {
2828 "name": "invalid.illegal.newline.python"
2829 }
2830 },
2831 "patterns": [
2832 {
2833 "include": "#double-one-regexp-expression"
2834 }
2835 ]
2836 },
2837 "double-one-regexp-comments": {
2838 "name": "comment.regexp",
2839 "begin": "\\(\\?#",
2840 "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
2841 "beginCaptures": {
2842 "0": {
2843 "name": "punctuation.comment.begin.regexp"
2844 }
2845 },
2846 "endCaptures": {
2847 "1": {
2848 "name": "punctuation.comment.end.regexp"
2849 },
2850 "2": {
2851 "name": "invalid.illegal.newline.python"
2852 }
2853 },
2854 "patterns": [
2855 {
2856 "include": "#codetags"
2857 }
2858 ]
2859 },
2860 "double-one-regexp-lookahead": {
2861 "begin": "(\\()\\?=",
2862 "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
2863 "beginCaptures": {
2864 "0": {
2865 "name": "keyword.operator.lookahead.regexp"
2866 },
2867 "1": {
2868 "name": "punctuation.parenthesis.lookahead.begin.regexp"
2869 }
2870 },
2871 "endCaptures": {
2872 "1": {
2873 "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp"
2874 },
2875 "2": {
2876 "name": "invalid.illegal.newline.python"
2877 }
2878 },
2879 "patterns": [
2880 {
2881 "include": "#double-one-regexp-expression"
2882 }
2883 ]
2884 },
2885 "double-one-regexp-lookahead-negative": {
2886 "begin": "(\\()\\?!",
2887 "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
2888 "beginCaptures": {
2889 "0": {
2890 "name": "keyword.operator.lookahead.negative.regexp"
2891 },
2892 "1": {
2893 "name": "punctuation.parenthesis.lookahead.begin.regexp"
2894 }
2895 },
2896 "endCaptures": {
2897 "1": {
2898 "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp"
2899 },
2900 "2": {
2901 "name": "invalid.illegal.newline.python"
2902 }
2903 },
2904 "patterns": [
2905 {
2906 "include": "#double-one-regexp-expression"
2907 }
2908 ]
2909 },
2910 "double-one-regexp-lookbehind": {
2911 "begin": "(\\()\\?<=",
2912 "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
2913 "beginCaptures": {
2914 "0": {
2915 "name": "keyword.operator.lookbehind.regexp"
2916 },
2917 "1": {
2918 "name": "punctuation.parenthesis.lookbehind.begin.regexp"
2919 }
2920 },
2921 "endCaptures": {
2922 "1": {
2923 "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp"
2924 },
2925 "2": {
2926 "name": "invalid.illegal.newline.python"
2927 }
2928 },
2929 "patterns": [
2930 {
2931 "include": "#double-one-regexp-expression"
2932 }
2933 ]
2934 },
2935 "double-one-regexp-lookbehind-negative": {
2936 "begin": "(\\()\\?<!",
2937 "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
2938 "beginCaptures": {
2939 "0": {
2940 "name": "keyword.operator.lookbehind.negative.regexp"
2941 },
2942 "1": {
2943 "name": "punctuation.parenthesis.lookbehind.begin.regexp"
2944 }
2945 },
2946 "endCaptures": {
2947 "1": {
2948 "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp"
2949 },
2950 "2": {
2951 "name": "invalid.illegal.newline.python"
2952 }
2953 },
2954 "patterns": [
2955 {
2956 "include": "#double-one-regexp-expression"
2957 }
2958 ]
2959 },
2960 "double-one-regexp-conditional": {
2961 "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)",
2962 "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
2963 "beginCaptures": {
2964 "0": {
2965 "name": "keyword.operator.conditional.regexp"
2966 },
2967 "1": {
2968 "name": "punctuation.parenthesis.conditional.begin.regexp"
2969 }
2970 },
2971 "endCaptures": {
2972 "1": {
2973 "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp"
2974 },
2975 "2": {
2976 "name": "invalid.illegal.newline.python"
2977 }
2978 },
2979 "patterns": [
2980 {
2981 "include": "#double-one-regexp-expression"
2982 }
2983 ]
2984 },
2985 "double-one-regexp-parentheses-non-capturing": {
2986 "begin": "\\(\\?:",
2987 "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
2988 "beginCaptures": {
2989 "0": {
2990 "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp"
2991 }
2992 },
2993 "endCaptures": {
2994 "1": {
2995 "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp"
2996 },
2997 "2": {
2998 "name": "invalid.illegal.newline.python"
2999 }
3000 },
3001 "patterns": [
3002 {
3003 "include": "#double-one-regexp-expression"
3004 }
3005 ]
3006 },
3007 "double-one-regexp-parentheses": {
3008 "begin": "\\(",
3009 "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
3010 "beginCaptures": {
3011 "0": {
3012 "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp"
3013 }
3014 },
3015 "endCaptures": {
3016 "1": {
3017 "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp"
3018 },
3019 "2": {
3020 "name": "invalid.illegal.newline.python"
3021 }
3022 },
3023 "patterns": [
3024 {
3025 "include": "#double-one-regexp-expression"
3026 }
3027 ]
3028 },
3029 "double-three-regexp-expression": {
3030 "patterns": [
3031 {
3032 "include": "#regexp-base-expression"
3033 },
3034 {
3035 "include": "#double-three-regexp-character-set"
3036 },
3037 {
3038 "include": "#double-three-regexp-comments"
3039 },
3040 {
3041 "include": "#regexp-flags"
3042 },
3043 {
3044 "include": "#double-three-regexp-named-group"
3045 },
3046 {
3047 "include": "#regexp-backreference"
3048 },
3049 {
3050 "include": "#double-three-regexp-lookahead"
3051 },
3052 {
3053 "include": "#double-three-regexp-lookahead-negative"
3054 },
3055 {
3056 "include": "#double-three-regexp-lookbehind"
3057 },
3058 {
3059 "include": "#double-three-regexp-lookbehind-negative"
3060 },
3061 {
3062 "include": "#double-three-regexp-conditional"
3063 },
3064 {
3065 "include": "#double-three-regexp-parentheses-non-capturing"
3066 },
3067 {
3068 "include": "#double-three-regexp-parentheses"
3069 },
3070 {
3071 "include": "#comments-string-double-three"
3072 }
3073 ]
3074 },
3075 "double-three-regexp-character-set": {
3076 "patterns": [
3077 {
3078 "match": "(?x)\n \\[ \\^? \\] (?! .*?\\])\n"
3079 },
3080 {
3081 "name": "meta.character.set.regexp",
3082 "begin": "(\\[)(\\^)?(\\])?",
3083 "end": "(\\]|(?=\"\"\"))",
3084 "beginCaptures": {
3085 "1": {
3086 "name": "punctuation.character.set.begin.regexp constant.other.set.regexp"
3087 },
3088 "2": {
3089 "name": "keyword.operator.negation.regexp"
3090 },
3091 "3": {
3092 "name": "constant.character.set.regexp"
3093 }
3094 },
3095 "endCaptures": {
3096 "1": {
3097 "name": "punctuation.character.set.end.regexp constant.other.set.regexp"
3098 },
3099 "2": {
3100 "name": "invalid.illegal.newline.python"
3101 }
3102 },
3103 "patterns": [
3104 {
3105 "include": "#regexp-charecter-set-escapes"
3106 },
3107 {
3108 "name": "constant.character.set.regexp",
3109 "match": "[^\\n]"
3110 }
3111 ]
3112 }
3113 ]
3114 },
3115 "double-three-regexp-named-group": {
3116 "name": "meta.named.regexp",
3117 "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n",
3118 "end": "(\\)|(?=\"\"\"))",
3119 "beginCaptures": {
3120 "1": {
3121 "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"
3122 },
3123 "2": {
3124 "name": "entity.name.tag.named.group.regexp"
3125 }
3126 },
3127 "endCaptures": {
3128 "1": {
3129 "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp"
3130 },
3131 "2": {
3132 "name": "invalid.illegal.newline.python"
3133 }
3134 },
3135 "patterns": [
3136 {
3137 "include": "#double-three-regexp-expression"
3138 },
3139 {
3140 "include": "#comments-string-double-three"
3141 }
3142 ]
3143 },
3144 "double-three-regexp-comments": {
3145 "name": "comment.regexp",
3146 "begin": "\\(\\?#",
3147 "end": "(\\)|(?=\"\"\"))",
3148 "beginCaptures": {
3149 "0": {
3150 "name": "punctuation.comment.begin.regexp"
3151 }
3152 },
3153 "endCaptures": {
3154 "1": {
3155 "name": "punctuation.comment.end.regexp"
3156 },
3157 "2": {
3158 "name": "invalid.illegal.newline.python"
3159 }
3160 },
3161 "patterns": [
3162 {
3163 "include": "#codetags"
3164 }
3165 ]
3166 },
3167 "double-three-regexp-lookahead": {
3168 "begin": "(\\()\\?=",
3169 "end": "(\\)|(?=\"\"\"))",
3170 "beginCaptures": {
3171 "0": {
3172 "name": "keyword.operator.lookahead.regexp"
3173 },
3174 "1": {
3175 "name": "punctuation.parenthesis.lookahead.begin.regexp"
3176 }
3177 },
3178 "endCaptures": {
3179 "1": {
3180 "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp"
3181 },
3182 "2": {
3183 "name": "invalid.illegal.newline.python"
3184 }
3185 },
3186 "patterns": [
3187 {
3188 "include": "#double-three-regexp-expression"
3189 },
3190 {
3191 "include": "#comments-string-double-three"
3192 }
3193 ]
3194 },
3195 "double-three-regexp-lookahead-negative": {
3196 "begin": "(\\()\\?!",
3197 "end": "(\\)|(?=\"\"\"))",
3198 "beginCaptures": {
3199 "0": {
3200 "name": "keyword.operator.lookahead.negative.regexp"
3201 },
3202 "1": {
3203 "name": "punctuation.parenthesis.lookahead.begin.regexp"
3204 }
3205 },
3206 "endCaptures": {
3207 "1": {
3208 "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp"
3209 },
3210 "2": {
3211 "name": "invalid.illegal.newline.python"
3212 }
3213 },
3214 "patterns": [
3215 {
3216 "include": "#double-three-regexp-expression"
3217 },
3218 {
3219 "include": "#comments-string-double-three"
3220 }
3221 ]
3222 },
3223 "double-three-regexp-lookbehind": {
3224 "begin": "(\\()\\?<=",
3225 "end": "(\\)|(?=\"\"\"))",
3226 "beginCaptures": {
3227 "0": {
3228 "name": "keyword.operator.lookbehind.regexp"
3229 },
3230 "1": {
3231 "name": "punctuation.parenthesis.lookbehind.begin.regexp"
3232 }
3233 },
3234 "endCaptures": {
3235 "1": {
3236 "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp"
3237 },
3238 "2": {
3239 "name": "invalid.illegal.newline.python"
3240 }
3241 },
3242 "patterns": [
3243 {
3244 "include": "#double-three-regexp-expression"
3245 },
3246 {
3247 "include": "#comments-string-double-three"
3248 }
3249 ]
3250 },
3251 "double-three-regexp-lookbehind-negative": {
3252 "begin": "(\\()\\?<!",
3253 "end": "(\\)|(?=\"\"\"))",
3254 "beginCaptures": {
3255 "0": {
3256 "name": "keyword.operator.lookbehind.negative.regexp"
3257 },
3258 "1": {
3259 "name": "punctuation.parenthesis.lookbehind.begin.regexp"
3260 }
3261 },
3262 "endCaptures": {
3263 "1": {
3264 "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp"
3265 },
3266 "2": {
3267 "name": "invalid.illegal.newline.python"
3268 }
3269 },
3270 "patterns": [
3271 {
3272 "include": "#double-three-regexp-expression"
3273 },
3274 {
3275 "include": "#comments-string-double-three"
3276 }
3277 ]
3278 },
3279 "double-three-regexp-conditional": {
3280 "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)",
3281 "end": "(\\)|(?=\"\"\"))",
3282 "beginCaptures": {
3283 "0": {
3284 "name": "keyword.operator.conditional.regexp"
3285 },
3286 "1": {
3287 "name": "punctuation.parenthesis.conditional.begin.regexp"
3288 }
3289 },
3290 "endCaptures": {
3291 "1": {
3292 "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp"
3293 },
3294 "2": {
3295 "name": "invalid.illegal.newline.python"
3296 }
3297 },
3298 "patterns": [
3299 {
3300 "include": "#double-three-regexp-expression"
3301 },
3302 {
3303 "include": "#comments-string-double-three"
3304 }
3305 ]
3306 },
3307 "double-three-regexp-parentheses-non-capturing": {
3308 "begin": "\\(\\?:",
3309 "end": "(\\)|(?=\"\"\"))",
3310 "beginCaptures": {
3311 "0": {
3312 "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp"
3313 }
3314 },
3315 "endCaptures": {
3316 "1": {
3317 "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp"
3318 },
3319 "2": {
3320 "name": "invalid.illegal.newline.python"
3321 }
3322 },
3323 "patterns": [
3324 {
3325 "include": "#double-three-regexp-expression"
3326 },
3327 {
3328 "include": "#comments-string-double-three"
3329 }
3330 ]
3331 },
3332 "double-three-regexp-parentheses": {
3333 "begin": "\\(",
3334 "end": "(\\)|(?=\"\"\"))",
3335 "beginCaptures": {
3336 "0": {
3337 "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp"
3338 }
3339 },
3340 "endCaptures": {
3341 "1": {
3342 "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp"
3343 },
3344 "2": {
3345 "name": "invalid.illegal.newline.python"
3346 }
3347 },
3348 "patterns": [
3349 {
3350 "include": "#double-three-regexp-expression"
3351 },
3352 {
3353 "include": "#comments-string-double-three"
3354 }
3355 ]
3356 },
3357 "regexp-single-one-line": {
3358 "name": "string.regexp.quoted.single.python",
3359 "begin": "\\b(([uU]r)|([bB]r)|(r[bB]?))(\\')",
3360 "end": "(\\')|(?<!\\\\)(\\n)",
3361 "beginCaptures": {
3362 "2": {
3363 "name": "invalid.deprecated.prefix.python"
3364 },
3365 "3": {
3366 "name": "storage.type.string.python"
3367 },
3368 "4": {
3369 "name": "storage.type.string.python"
3370 },
3371 "5": {
3372 "name": "punctuation.definition.string.begin.python"
3373 }
3374 },
3375 "endCaptures": {
3376 "1": {
3377 "name": "punctuation.definition.string.end.python"
3378 },
3379 "2": {
3380 "name": "invalid.illegal.newline.python"
3381 }
3382 },
3383 "patterns": [
3384 {
3385 "include": "#single-one-regexp-expression"
3386 }
3387 ]
3388 },
3389 "regexp-single-three-line": {
3390 "name": "string.regexp.quoted.multi.python",
3391 "begin": "\\b(([uU]r)|([bB]r)|(r[bB]?))(\\'\\'\\')",
3392 "end": "(\\'\\'\\')",
3393 "beginCaptures": {
3394 "2": {
3395 "name": "invalid.deprecated.prefix.python"
3396 },
3397 "3": {
3398 "name": "storage.type.string.python"
3399 },
3400 "4": {
3401 "name": "storage.type.string.python"
3402 },
3403 "5": {
3404 "name": "punctuation.definition.string.begin.python"
3405 }
3406 },
3407 "endCaptures": {
3408 "1": {
3409 "name": "punctuation.definition.string.end.python"
3410 },
3411 "2": {
3412 "name": "invalid.illegal.newline.python"
3413 }
3414 },
3415 "patterns": [
3416 {
3417 "include": "#single-three-regexp-expression"
3418 }
3419 ]
3420 },
3421 "regexp-double-one-line": {
3422 "name": "string.regexp.quoted.single.python",
3423 "begin": "\\b(([uU]r)|([bB]r)|(r[bB]?))(\")",
3424 "end": "(\")|(?<!\\\\)(\\n)",
3425 "beginCaptures": {
3426 "2": {
3427 "name": "invalid.deprecated.prefix.python"
3428 },
3429 "3": {
3430 "name": "storage.type.string.python"
3431 },
3432 "4": {
3433 "name": "storage.type.string.python"
3434 },
3435 "5": {
3436 "name": "punctuation.definition.string.begin.python"
3437 }
3438 },
3439 "endCaptures": {
3440 "1": {
3441 "name": "punctuation.definition.string.end.python"
3442 },
3443 "2": {
3444 "name": "invalid.illegal.newline.python"
3445 }
3446 },
3447 "patterns": [
3448 {
3449 "include": "#double-one-regexp-expression"
3450 }
3451 ]
3452 },
3453 "regexp-double-three-line": {
3454 "name": "string.regexp.quoted.multi.python",
3455 "begin": "\\b(([uU]r)|([bB]r)|(r[bB]?))(\"\"\")",
3456 "end": "(\"\"\")",
3457 "beginCaptures": {
3458 "2": {
3459 "name": "invalid.deprecated.prefix.python"
3460 },
3461 "3": {
3462 "name": "storage.type.string.python"
3463 },
3464 "4": {
3465 "name": "storage.type.string.python"
3466 },
3467 "5": {
3468 "name": "punctuation.definition.string.begin.python"
3469 }
3470 },
3471 "endCaptures": {
3472 "1": {
3473 "name": "punctuation.definition.string.end.python"
3474 },
3475 "2": {
3476 "name": "invalid.illegal.newline.python"
3477 }
3478 },
3479 "patterns": [
3480 {
3481 "include": "#double-three-regexp-expression"
3482 }
3483 ]
3484 },
3485 "single-one-fregexp-expression": {
3486 "patterns": [
3487 {
3488 "include": "#fregexp-base-expression"
3489 },
3490 {
3491 "include": "#single-one-regexp-character-set"
3492 },
3493 {
3494 "include": "#single-one-regexp-comments"
3495 },
3496 {
3497 "include": "#regexp-flags"
3498 },
3499 {
3500 "include": "#single-one-regexp-named-group"
3501 },
3502 {
3503 "include": "#regexp-backreference"
3504 },
3505 {
3506 "include": "#single-one-fregexp-lookahead"
3507 },
3508 {
3509 "include": "#single-one-fregexp-lookahead-negative"
3510 },
3511 {
3512 "include": "#single-one-fregexp-lookbehind"
3513 },
3514 {
3515 "include": "#single-one-fregexp-lookbehind-negative"
3516 },
3517 {
3518 "include": "#single-one-fregexp-conditional"
3519 },
3520 {
3521 "include": "#single-one-fregexp-parentheses-non-capturing"
3522 },
3523 {
3524 "include": "#single-one-fregexp-parentheses"
3525 }
3526 ]
3527 },
3528 "single-one-fregexp-named-group": {
3529 "name": "meta.named.regexp",
3530 "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n",
3531 "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
3532 "beginCaptures": {
3533 "1": {
3534 "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"
3535 },
3536 "2": {
3537 "name": "entity.name.tag.named.group.regexp"
3538 }
3539 },
3540 "endCaptures": {
3541 "1": {
3542 "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp"
3543 },
3544 "2": {
3545 "name": "invalid.illegal.newline.python"
3546 }
3547 },
3548 "patterns": [
3549 {
3550 "include": "#single-one-fregexp-expression"
3551 }
3552 ]
3553 },
3554 "single-one-fregexp-lookahead": {
3555 "begin": "(\\()\\?=",
3556 "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
3557 "beginCaptures": {
3558 "0": {
3559 "name": "keyword.operator.lookahead.regexp"
3560 },
3561 "1": {
3562 "name": "punctuation.parenthesis.lookahead.begin.regexp"
3563 }
3564 },
3565 "endCaptures": {
3566 "1": {
3567 "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp"
3568 },
3569 "2": {
3570 "name": "invalid.illegal.newline.python"
3571 }
3572 },
3573 "patterns": [
3574 {
3575 "include": "#single-one-fregexp-expression"
3576 }
3577 ]
3578 },
3579 "single-one-fregexp-lookahead-negative": {
3580 "begin": "(\\()\\?!",
3581 "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
3582 "beginCaptures": {
3583 "0": {
3584 "name": "keyword.operator.lookahead.negative.regexp"
3585 },
3586 "1": {
3587 "name": "punctuation.parenthesis.lookahead.begin.regexp"
3588 }
3589 },
3590 "endCaptures": {
3591 "1": {
3592 "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp"
3593 },
3594 "2": {
3595 "name": "invalid.illegal.newline.python"
3596 }
3597 },
3598 "patterns": [
3599 {
3600 "include": "#single-one-fregexp-expression"
3601 }
3602 ]
3603 },
3604 "single-one-fregexp-lookbehind": {
3605 "begin": "(\\()\\?<=",
3606 "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
3607 "beginCaptures": {
3608 "0": {
3609 "name": "keyword.operator.lookbehind.regexp"
3610 },
3611 "1": {
3612 "name": "punctuation.parenthesis.lookbehind.begin.regexp"
3613 }
3614 },
3615 "endCaptures": {
3616 "1": {
3617 "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp"
3618 },
3619 "2": {
3620 "name": "invalid.illegal.newline.python"
3621 }
3622 },
3623 "patterns": [
3624 {
3625 "include": "#single-one-fregexp-expression"
3626 }
3627 ]
3628 },
3629 "single-one-fregexp-lookbehind-negative": {
3630 "begin": "(\\()\\?<!",
3631 "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
3632 "beginCaptures": {
3633 "0": {
3634 "name": "keyword.operator.lookbehind.negative.regexp"
3635 },
3636 "1": {
3637 "name": "punctuation.parenthesis.lookbehind.begin.regexp"
3638 }
3639 },
3640 "endCaptures": {
3641 "1": {
3642 "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp"
3643 },
3644 "2": {
3645 "name": "invalid.illegal.newline.python"
3646 }
3647 },
3648 "patterns": [
3649 {
3650 "include": "#single-one-fregexp-expression"
3651 }
3652 ]
3653 },
3654 "single-one-fregexp-conditional": {
3655 "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)",
3656 "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
3657 "beginCaptures": {
3658 "0": {
3659 "name": "keyword.operator.conditional.regexp"
3660 },
3661 "1": {
3662 "name": "punctuation.parenthesis.conditional.begin.regexp"
3663 }
3664 },
3665 "endCaptures": {
3666 "1": {
3667 "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp"
3668 },
3669 "2": {
3670 "name": "invalid.illegal.newline.python"
3671 }
3672 },
3673 "patterns": [
3674 {
3675 "include": "#single-one-fregexp-expression"
3676 }
3677 ]
3678 },
3679 "single-one-fregexp-parentheses-non-capturing": {
3680 "begin": "\\(\\?:",
3681 "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
3682 "beginCaptures": {
3683 "0": {
3684 "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp"
3685 }
3686 },
3687 "endCaptures": {
3688 "1": {
3689 "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp"
3690 },
3691 "2": {
3692 "name": "invalid.illegal.newline.python"
3693 }
3694 },
3695 "patterns": [
3696 {
3697 "include": "#single-one-fregexp-expression"
3698 }
3699 ]
3700 },
3701 "single-one-fregexp-parentheses": {
3702 "begin": "\\(",
3703 "end": "(\\)|(?=\\'))|((?=(?<!\\\\)\\n))",
3704 "beginCaptures": {
3705 "0": {
3706 "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp"
3707 }
3708 },
3709 "endCaptures": {
3710 "1": {
3711 "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp"
3712 },
3713 "2": {
3714 "name": "invalid.illegal.newline.python"
3715 }
3716 },
3717 "patterns": [
3718 {
3719 "include": "#single-one-fregexp-expression"
3720 }
3721 ]
3722 },
3723 "single-three-fregexp-expression": {
3724 "patterns": [
3725 {
3726 "include": "#fregexp-base-expression"
3727 },
3728 {
3729 "include": "#single-three-regexp-character-set"
3730 },
3731 {
3732 "include": "#single-three-regexp-comments"
3733 },
3734 {
3735 "include": "#regexp-flags"
3736 },
3737 {
3738 "include": "#single-three-regexp-named-group"
3739 },
3740 {
3741 "include": "#regexp-backreference"
3742 },
3743 {
3744 "include": "#single-three-fregexp-lookahead"
3745 },
3746 {
3747 "include": "#single-three-fregexp-lookahead-negative"
3748 },
3749 {
3750 "include": "#single-three-fregexp-lookbehind"
3751 },
3752 {
3753 "include": "#single-three-fregexp-lookbehind-negative"
3754 },
3755 {
3756 "include": "#single-three-fregexp-conditional"
3757 },
3758 {
3759 "include": "#single-three-fregexp-parentheses-non-capturing"
3760 },
3761 {
3762 "include": "#single-three-fregexp-parentheses"
3763 },
3764 {
3765 "include": "#comments-string-single-three"
3766 }
3767 ]
3768 },
3769 "single-three-fregexp-named-group": {
3770 "name": "meta.named.regexp",
3771 "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n",
3772 "end": "(\\)|(?=\\'\\'\\'))",
3773 "beginCaptures": {
3774 "1": {
3775 "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"
3776 },
3777 "2": {
3778 "name": "entity.name.tag.named.group.regexp"
3779 }
3780 },
3781 "endCaptures": {
3782 "1": {
3783 "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp"
3784 },
3785 "2": {
3786 "name": "invalid.illegal.newline.python"
3787 }
3788 },
3789 "patterns": [
3790 {
3791 "include": "#single-three-fregexp-expression"
3792 },
3793 {
3794 "include": "#comments-string-single-three"
3795 }
3796 ]
3797 },
3798 "single-three-fregexp-lookahead": {
3799 "begin": "(\\()\\?=",
3800 "end": "(\\)|(?=\\'\\'\\'))",
3801 "beginCaptures": {
3802 "0": {
3803 "name": "keyword.operator.lookahead.regexp"
3804 },
3805 "1": {
3806 "name": "punctuation.parenthesis.lookahead.begin.regexp"
3807 }
3808 },
3809 "endCaptures": {
3810 "1": {
3811 "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp"
3812 },
3813 "2": {
3814 "name": "invalid.illegal.newline.python"
3815 }
3816 },
3817 "patterns": [
3818 {
3819 "include": "#single-three-fregexp-expression"
3820 },
3821 {
3822 "include": "#comments-string-single-three"
3823 }
3824 ]
3825 },
3826 "single-three-fregexp-lookahead-negative": {
3827 "begin": "(\\()\\?!",
3828 "end": "(\\)|(?=\\'\\'\\'))",
3829 "beginCaptures": {
3830 "0": {
3831 "name": "keyword.operator.lookahead.negative.regexp"
3832 },
3833 "1": {
3834 "name": "punctuation.parenthesis.lookahead.begin.regexp"
3835 }
3836 },
3837 "endCaptures": {
3838 "1": {
3839 "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp"
3840 },
3841 "2": {
3842 "name": "invalid.illegal.newline.python"
3843 }
3844 },
3845 "patterns": [
3846 {
3847 "include": "#single-three-fregexp-expression"
3848 },
3849 {
3850 "include": "#comments-string-single-three"
3851 }
3852 ]
3853 },
3854 "single-three-fregexp-lookbehind": {
3855 "begin": "(\\()\\?<=",
3856 "end": "(\\)|(?=\\'\\'\\'))",
3857 "beginCaptures": {
3858 "0": {
3859 "name": "keyword.operator.lookbehind.regexp"
3860 },
3861 "1": {
3862 "name": "punctuation.parenthesis.lookbehind.begin.regexp"
3863 }
3864 },
3865 "endCaptures": {
3866 "1": {
3867 "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp"
3868 },
3869 "2": {
3870 "name": "invalid.illegal.newline.python"
3871 }
3872 },
3873 "patterns": [
3874 {
3875 "include": "#single-three-fregexp-expression"
3876 },
3877 {
3878 "include": "#comments-string-single-three"
3879 }
3880 ]
3881 },
3882 "single-three-fregexp-lookbehind-negative": {
3883 "begin": "(\\()\\?<!",
3884 "end": "(\\)|(?=\\'\\'\\'))",
3885 "beginCaptures": {
3886 "0": {
3887 "name": "keyword.operator.lookbehind.negative.regexp"
3888 },
3889 "1": {
3890 "name": "punctuation.parenthesis.lookbehind.begin.regexp"
3891 }
3892 },
3893 "endCaptures": {
3894 "1": {
3895 "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp"
3896 },
3897 "2": {
3898 "name": "invalid.illegal.newline.python"
3899 }
3900 },
3901 "patterns": [
3902 {
3903 "include": "#single-three-fregexp-expression"
3904 },
3905 {
3906 "include": "#comments-string-single-three"
3907 }
3908 ]
3909 },
3910 "single-three-fregexp-conditional": {
3911 "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)",
3912 "end": "(\\)|(?=\\'\\'\\'))",
3913 "beginCaptures": {
3914 "0": {
3915 "name": "keyword.operator.conditional.regexp"
3916 },
3917 "1": {
3918 "name": "punctuation.parenthesis.conditional.begin.regexp"
3919 }
3920 },
3921 "endCaptures": {
3922 "1": {
3923 "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp"
3924 },
3925 "2": {
3926 "name": "invalid.illegal.newline.python"
3927 }
3928 },
3929 "patterns": [
3930 {
3931 "include": "#single-three-fregexp-expression"
3932 },
3933 {
3934 "include": "#comments-string-single-three"
3935 }
3936 ]
3937 },
3938 "single-three-fregexp-parentheses-non-capturing": {
3939 "begin": "\\(\\?:",
3940 "end": "(\\)|(?=\\'\\'\\'))",
3941 "beginCaptures": {
3942 "0": {
3943 "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp"
3944 }
3945 },
3946 "endCaptures": {
3947 "1": {
3948 "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp"
3949 },
3950 "2": {
3951 "name": "invalid.illegal.newline.python"
3952 }
3953 },
3954 "patterns": [
3955 {
3956 "include": "#single-three-fregexp-expression"
3957 },
3958 {
3959 "include": "#comments-string-single-three"
3960 }
3961 ]
3962 },
3963 "single-three-fregexp-parentheses": {
3964 "begin": "\\(",
3965 "end": "(\\)|(?=\\'\\'\\'))",
3966 "beginCaptures": {
3967 "0": {
3968 "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp"
3969 }
3970 },
3971 "endCaptures": {
3972 "1": {
3973 "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp"
3974 },
3975 "2": {
3976 "name": "invalid.illegal.newline.python"
3977 }
3978 },
3979 "patterns": [
3980 {
3981 "include": "#single-three-fregexp-expression"
3982 },
3983 {
3984 "include": "#comments-string-single-three"
3985 }
3986 ]
3987 },
3988 "double-one-fregexp-expression": {
3989 "patterns": [
3990 {
3991 "include": "#fregexp-base-expression"
3992 },
3993 {
3994 "include": "#double-one-regexp-character-set"
3995 },
3996 {
3997 "include": "#double-one-regexp-comments"
3998 },
3999 {
4000 "include": "#regexp-flags"
4001 },
4002 {
4003 "include": "#double-one-regexp-named-group"
4004 },
4005 {
4006 "include": "#regexp-backreference"
4007 },
4008 {
4009 "include": "#double-one-fregexp-lookahead"
4010 },
4011 {
4012 "include": "#double-one-fregexp-lookahead-negative"
4013 },
4014 {
4015 "include": "#double-one-fregexp-lookbehind"
4016 },
4017 {
4018 "include": "#double-one-fregexp-lookbehind-negative"
4019 },
4020 {
4021 "include": "#double-one-fregexp-conditional"
4022 },
4023 {
4024 "include": "#double-one-fregexp-parentheses-non-capturing"
4025 },
4026 {
4027 "include": "#double-one-fregexp-parentheses"
4028 }
4029 ]
4030 },
4031 "double-one-fregexp-named-group": {
4032 "name": "meta.named.regexp",
4033 "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n",
4034 "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
4035 "beginCaptures": {
4036 "1": {
4037 "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"
4038 },
4039 "2": {
4040 "name": "entity.name.tag.named.group.regexp"
4041 }
4042 },
4043 "endCaptures": {
4044 "1": {
4045 "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp"
4046 },
4047 "2": {
4048 "name": "invalid.illegal.newline.python"
4049 }
4050 },
4051 "patterns": [
4052 {
4053 "include": "#double-one-fregexp-expression"
4054 }
4055 ]
4056 },
4057 "double-one-fregexp-lookahead": {
4058 "begin": "(\\()\\?=",
4059 "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
4060 "beginCaptures": {
4061 "0": {
4062 "name": "keyword.operator.lookahead.regexp"
4063 },
4064 "1": {
4065 "name": "punctuation.parenthesis.lookahead.begin.regexp"
4066 }
4067 },
4068 "endCaptures": {
4069 "1": {
4070 "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp"
4071 },
4072 "2": {
4073 "name": "invalid.illegal.newline.python"
4074 }
4075 },
4076 "patterns": [
4077 {
4078 "include": "#double-one-fregexp-expression"
4079 }
4080 ]
4081 },
4082 "double-one-fregexp-lookahead-negative": {
4083 "begin": "(\\()\\?!",
4084 "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
4085 "beginCaptures": {
4086 "0": {
4087 "name": "keyword.operator.lookahead.negative.regexp"
4088 },
4089 "1": {
4090 "name": "punctuation.parenthesis.lookahead.begin.regexp"
4091 }
4092 },
4093 "endCaptures": {
4094 "1": {
4095 "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp"
4096 },
4097 "2": {
4098 "name": "invalid.illegal.newline.python"
4099 }
4100 },
4101 "patterns": [
4102 {
4103 "include": "#double-one-fregexp-expression"
4104 }
4105 ]
4106 },
4107 "double-one-fregexp-lookbehind": {
4108 "begin": "(\\()\\?<=",
4109 "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
4110 "beginCaptures": {
4111 "0": {
4112 "name": "keyword.operator.lookbehind.regexp"
4113 },
4114 "1": {
4115 "name": "punctuation.parenthesis.lookbehind.begin.regexp"
4116 }
4117 },
4118 "endCaptures": {
4119 "1": {
4120 "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp"
4121 },
4122 "2": {
4123 "name": "invalid.illegal.newline.python"
4124 }
4125 },
4126 "patterns": [
4127 {
4128 "include": "#double-one-fregexp-expression"
4129 }
4130 ]
4131 },
4132 "double-one-fregexp-lookbehind-negative": {
4133 "begin": "(\\()\\?<!",
4134 "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
4135 "beginCaptures": {
4136 "0": {
4137 "name": "keyword.operator.lookbehind.negative.regexp"
4138 },
4139 "1": {
4140 "name": "punctuation.parenthesis.lookbehind.begin.regexp"
4141 }
4142 },
4143 "endCaptures": {
4144 "1": {
4145 "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp"
4146 },
4147 "2": {
4148 "name": "invalid.illegal.newline.python"
4149 }
4150 },
4151 "patterns": [
4152 {
4153 "include": "#double-one-fregexp-expression"
4154 }
4155 ]
4156 },
4157 "double-one-fregexp-conditional": {
4158 "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)",
4159 "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
4160 "beginCaptures": {
4161 "0": {
4162 "name": "keyword.operator.conditional.regexp"
4163 },
4164 "1": {
4165 "name": "punctuation.parenthesis.conditional.begin.regexp"
4166 }
4167 },
4168 "endCaptures": {
4169 "1": {
4170 "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp"
4171 },
4172 "2": {
4173 "name": "invalid.illegal.newline.python"
4174 }
4175 },
4176 "patterns": [
4177 {
4178 "include": "#double-one-fregexp-expression"
4179 }
4180 ]
4181 },
4182 "double-one-fregexp-parentheses-non-capturing": {
4183 "begin": "\\(\\?:",
4184 "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
4185 "beginCaptures": {
4186 "0": {
4187 "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp"
4188 }
4189 },
4190 "endCaptures": {
4191 "1": {
4192 "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp"
4193 },
4194 "2": {
4195 "name": "invalid.illegal.newline.python"
4196 }
4197 },
4198 "patterns": [
4199 {
4200 "include": "#double-one-fregexp-expression"
4201 }
4202 ]
4203 },
4204 "double-one-fregexp-parentheses": {
4205 "begin": "\\(",
4206 "end": "(\\)|(?=\"))|((?=(?<!\\\\)\\n))",
4207 "beginCaptures": {
4208 "0": {
4209 "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp"
4210 }
4211 },
4212 "endCaptures": {
4213 "1": {
4214 "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp"
4215 },
4216 "2": {
4217 "name": "invalid.illegal.newline.python"
4218 }
4219 },
4220 "patterns": [
4221 {
4222 "include": "#double-one-fregexp-expression"
4223 }
4224 ]
4225 },
4226 "double-three-fregexp-expression": {
4227 "patterns": [
4228 {
4229 "include": "#fregexp-base-expression"
4230 },
4231 {
4232 "include": "#double-three-regexp-character-set"
4233 },
4234 {
4235 "include": "#double-three-regexp-comments"
4236 },
4237 {
4238 "include": "#regexp-flags"
4239 },
4240 {
4241 "include": "#double-three-regexp-named-group"
4242 },
4243 {
4244 "include": "#regexp-backreference"
4245 },
4246 {
4247 "include": "#double-three-fregexp-lookahead"
4248 },
4249 {
4250 "include": "#double-three-fregexp-lookahead-negative"
4251 },
4252 {
4253 "include": "#double-three-fregexp-lookbehind"
4254 },
4255 {
4256 "include": "#double-three-fregexp-lookbehind-negative"
4257 },
4258 {
4259 "include": "#double-three-fregexp-conditional"
4260 },
4261 {
4262 "include": "#double-three-fregexp-parentheses-non-capturing"
4263 },
4264 {
4265 "include": "#double-three-fregexp-parentheses"
4266 },
4267 {
4268 "include": "#comments-string-double-three"
4269 }
4270 ]
4271 },
4272 "double-three-fregexp-named-group": {
4273 "name": "meta.named.regexp",
4274 "begin": "(?x)\n (\\() (\\?P <\\w+(?:\\s+[[:alnum:]]+)?>)\n",
4275 "end": "(\\)|(?=\"\"\"))",
4276 "beginCaptures": {
4277 "1": {
4278 "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"
4279 },
4280 "2": {
4281 "name": "entity.name.tag.named.group.regexp"
4282 }
4283 },
4284 "endCaptures": {
4285 "1": {
4286 "name": "support.other.parenthesis.regexp punctuation.parenthesis.named.end.regexp"
4287 },
4288 "2": {
4289 "name": "invalid.illegal.newline.python"
4290 }
4291 },
4292 "patterns": [
4293 {
4294 "include": "#double-three-fregexp-expression"
4295 },
4296 {
4297 "include": "#comments-string-double-three"
4298 }
4299 ]
4300 },
4301 "double-three-fregexp-lookahead": {
4302 "begin": "(\\()\\?=",
4303 "end": "(\\)|(?=\"\"\"))",
4304 "beginCaptures": {
4305 "0": {
4306 "name": "keyword.operator.lookahead.regexp"
4307 },
4308 "1": {
4309 "name": "punctuation.parenthesis.lookahead.begin.regexp"
4310 }
4311 },
4312 "endCaptures": {
4313 "1": {
4314 "name": "keyword.operator.lookahead.regexp punctuation.parenthesis.lookahead.end.regexp"
4315 },
4316 "2": {
4317 "name": "invalid.illegal.newline.python"
4318 }
4319 },
4320 "patterns": [
4321 {
4322 "include": "#double-three-fregexp-expression"
4323 },
4324 {
4325 "include": "#comments-string-double-three"
4326 }
4327 ]
4328 },
4329 "double-three-fregexp-lookahead-negative": {
4330 "begin": "(\\()\\?!",
4331 "end": "(\\)|(?=\"\"\"))",
4332 "beginCaptures": {
4333 "0": {
4334 "name": "keyword.operator.lookahead.negative.regexp"
4335 },
4336 "1": {
4337 "name": "punctuation.parenthesis.lookahead.begin.regexp"
4338 }
4339 },
4340 "endCaptures": {
4341 "1": {
4342 "name": "keyword.operator.lookahead.negative.regexp punctuation.parenthesis.lookahead.end.regexp"
4343 },
4344 "2": {
4345 "name": "invalid.illegal.newline.python"
4346 }
4347 },
4348 "patterns": [
4349 {
4350 "include": "#double-three-fregexp-expression"
4351 },
4352 {
4353 "include": "#comments-string-double-three"
4354 }
4355 ]
4356 },
4357 "double-three-fregexp-lookbehind": {
4358 "begin": "(\\()\\?<=",
4359 "end": "(\\)|(?=\"\"\"))",
4360 "beginCaptures": {
4361 "0": {
4362 "name": "keyword.operator.lookbehind.regexp"
4363 },
4364 "1": {
4365 "name": "punctuation.parenthesis.lookbehind.begin.regexp"
4366 }
4367 },
4368 "endCaptures": {
4369 "1": {
4370 "name": "keyword.operator.lookbehind.regexp punctuation.parenthesis.lookbehind.end.regexp"
4371 },
4372 "2": {
4373 "name": "invalid.illegal.newline.python"
4374 }
4375 },
4376 "patterns": [
4377 {
4378 "include": "#double-three-fregexp-expression"
4379 },
4380 {
4381 "include": "#comments-string-double-three"
4382 }
4383 ]
4384 },
4385 "double-three-fregexp-lookbehind-negative": {
4386 "begin": "(\\()\\?<!",
4387 "end": "(\\)|(?=\"\"\"))",
4388 "beginCaptures": {
4389 "0": {
4390 "name": "keyword.operator.lookbehind.negative.regexp"
4391 },
4392 "1": {
4393 "name": "punctuation.parenthesis.lookbehind.begin.regexp"
4394 }
4395 },
4396 "endCaptures": {
4397 "1": {
4398 "name": "keyword.operator.lookbehind.negative.regexp punctuation.parenthesis.lookbehind.end.regexp"
4399 },
4400 "2": {
4401 "name": "invalid.illegal.newline.python"
4402 }
4403 },
4404 "patterns": [
4405 {
4406 "include": "#double-three-fregexp-expression"
4407 },
4408 {
4409 "include": "#comments-string-double-three"
4410 }
4411 ]
4412 },
4413 "double-three-fregexp-conditional": {
4414 "begin": "(\\()\\?\\((\\w+(?:\\s+[[:alnum:]]+)?|\\d+)\\)",
4415 "end": "(\\)|(?=\"\"\"))",
4416 "beginCaptures": {
4417 "0": {
4418 "name": "keyword.operator.conditional.regexp"
4419 },
4420 "1": {
4421 "name": "punctuation.parenthesis.conditional.begin.regexp"
4422 }
4423 },
4424 "endCaptures": {
4425 "1": {
4426 "name": "keyword.operator.conditional.negative.regexp punctuation.parenthesis.conditional.end.regexp"
4427 },
4428 "2": {
4429 "name": "invalid.illegal.newline.python"
4430 }
4431 },
4432 "patterns": [
4433 {
4434 "include": "#double-three-fregexp-expression"
4435 },
4436 {
4437 "include": "#comments-string-double-three"
4438 }
4439 ]
4440 },
4441 "double-three-fregexp-parentheses-non-capturing": {
4442 "begin": "\\(\\?:",
4443 "end": "(\\)|(?=\"\"\"))",
4444 "beginCaptures": {
4445 "0": {
4446 "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.begin.regexp"
4447 }
4448 },
4449 "endCaptures": {
4450 "1": {
4451 "name": "support.other.parenthesis.regexp punctuation.parenthesis.non-capturing.end.regexp"
4452 },
4453 "2": {
4454 "name": "invalid.illegal.newline.python"
4455 }
4456 },
4457 "patterns": [
4458 {
4459 "include": "#double-three-fregexp-expression"
4460 },
4461 {
4462 "include": "#comments-string-double-three"
4463 }
4464 ]
4465 },
4466 "double-three-fregexp-parentheses": {
4467 "begin": "\\(",
4468 "end": "(\\)|(?=\"\"\"))",
4469 "beginCaptures": {
4470 "0": {
4471 "name": "support.other.parenthesis.regexp punctuation.parenthesis.begin.regexp"
4472 }
4473 },
4474 "endCaptures": {
4475 "1": {
4476 "name": "support.other.parenthesis.regexp punctuation.parenthesis.end.regexp"
4477 },
4478 "2": {
4479 "name": "invalid.illegal.newline.python"
4480 }
4481 },
4482 "patterns": [
4483 {
4484 "include": "#double-three-fregexp-expression"
4485 },
4486 {
4487 "include": "#comments-string-double-three"
4488 }
4489 ]
4490 },
4491 "fregexp-single-one-line": {
4492 "name": "string.interpolated.python string.regexp.quoted.single.python",
4493 "begin": "\\b(([uU]r)|([fF]r)|(r[fF]?))(\\')",
4494 "end": "(\\')|(?<!\\\\)(\\n)",
4495 "beginCaptures": {
4496 "2": {
4497 "name": "invalid.deprecated.prefix.python"
4498 },
4499 "3": {
4500 "name": "storage.type.string.python"
4501 },
4502 "4": {
4503 "name": "storage.type.string.python"
4504 },
4505 "5": {
4506 "name": "punctuation.definition.string.begin.python"
4507 }
4508 },
4509 "endCaptures": {
4510 "1": {
4511 "name": "punctuation.definition.string.end.python"
4512 },
4513 "2": {
4514 "name": "invalid.illegal.newline.python"
4515 }
4516 },
4517 "patterns": [
4518 {
4519 "include": "#single-one-fregexp-expression"
4520 }
4521 ]
4522 },
4523 "fregexp-single-three-line": {
4524 "name": "string.interpolated.python string.regexp.quoted.multi.python",
4525 "begin": "\\b(([uU]r)|([fF]r)|(r[fF]?))(\\'\\'\\')",
4526 "end": "(\\'\\'\\')",
4527 "beginCaptures": {
4528 "2": {
4529 "name": "invalid.deprecated.prefix.python"
4530 },
4531 "3": {
4532 "name": "storage.type.string.python"
4533 },
4534 "4": {
4535 "name": "storage.type.string.python"
4536 },
4537 "5": {
4538 "name": "punctuation.definition.string.begin.python"
4539 }
4540 },
4541 "endCaptures": {
4542 "1": {
4543 "name": "punctuation.definition.string.end.python"
4544 },
4545 "2": {
4546 "name": "invalid.illegal.newline.python"
4547 }
4548 },
4549 "patterns": [
4550 {
4551 "include": "#single-three-fregexp-expression"
4552 }
4553 ]
4554 },
4555 "fregexp-double-one-line": {
4556 "name": "string.interpolated.python string.regexp.quoted.single.python",
4557 "begin": "\\b(([uU]r)|([fF]r)|(r[fF]?))(\")",
4558 "end": "(\")|(?<!\\\\)(\\n)",
4559 "beginCaptures": {
4560 "2": {
4561 "name": "invalid.deprecated.prefix.python"
4562 },
4563 "3": {
4564 "name": "storage.type.string.python"
4565 },
4566 "4": {
4567 "name": "storage.type.string.python"
4568 },
4569 "5": {
4570 "name": "punctuation.definition.string.begin.python"
4571 }
4572 },
4573 "endCaptures": {
4574 "1": {
4575 "name": "punctuation.definition.string.end.python"
4576 },
4577 "2": {
4578 "name": "invalid.illegal.newline.python"
4579 }
4580 },
4581 "patterns": [
4582 {
4583 "include": "#double-one-fregexp-expression"
4584 }
4585 ]
4586 },
4587 "fregexp-double-three-line": {
4588 "name": "string.interpolated.python string.regexp.quoted.multi.python",
4589 "begin": "\\b(([uU]r)|([fF]r)|(r[fF]?))(\"\"\")",
4590 "end": "(\"\"\")",
4591 "beginCaptures": {
4592 "2": {
4593 "name": "invalid.deprecated.prefix.python"
4594 },
4595 "3": {
4596 "name": "storage.type.string.python"
4597 },
4598 "4": {
4599 "name": "storage.type.string.python"
4600 },
4601 "5": {
4602 "name": "punctuation.definition.string.begin.python"
4603 }
4604 },
4605 "endCaptures": {
4606 "1": {
4607 "name": "punctuation.definition.string.end.python"
4608 },
4609 "2": {
4610 "name": "invalid.illegal.newline.python"
4611 }
4612 },
4613 "patterns": [
4614 {
4615 "include": "#double-three-fregexp-expression"
4616 }
4617 ]
4618 },
4619 "string-raw-quoted-single-line": {
4620 "name": "string.quoted.raw.single.python",
4621 "begin": "\\b(([uU]R)|(R))((['\"]))",
4622 "end": "(\\4)|((?<!\\\\)\\n)",
4623 "beginCaptures": {
4624 "2": {
4625 "name": "invalid.deprecated.prefix.python"
4626 },
4627 "3": {
4628 "name": "storage.type.string.python"
4629 },
4630 "4": {
4631 "name": "punctuation.definition.string.begin.python"
4632 }
4633 },
4634 "endCaptures": {
4635 "1": {
4636 "name": "punctuation.definition.string.end.python"
4637 },
4638 "2": {
4639 "name": "invalid.illegal.newline.python"
4640 }
4641 },
4642 "patterns": [
4643 {
4644 "include": "#string-single-bad-brace1-formatting-raw"
4645 },
4646 {
4647 "include": "#string-single-bad-brace2-formatting-raw"
4648 },
4649 {
4650 "include": "#string-raw-guts"
4651 }
4652 ]
4653 },
4654 "string-bin-quoted-single-line": {
4655 "name": "string.quoted.binary.single.python",
4656 "begin": "(\\b[bB])((['\"]))",
4657 "end": "(\\2)|((?<!\\\\)\\n)",
4658 "beginCaptures": {
4659 "1": {
4660 "name": "storage.type.string.python"
4661 },
4662 "2": {
4663 "name": "punctuation.definition.string.begin.python"
4664 }
4665 },
4666 "endCaptures": {
4667 "1": {
4668 "name": "punctuation.definition.string.end.python"
4669 },
4670 "2": {
4671 "name": "invalid.illegal.newline.python"
4672 }
4673 },
4674 "patterns": [
4675 {
4676 "include": "#string-entity"
4677 }
4678 ]
4679 },
4680 "string-raw-bin-quoted-single-line": {
4681 "name": "string.quoted.raw.binary.single.python",
4682 "begin": "(\\b(?:R[bB]|[bB]R))((['\"]))",
4683 "end": "(\\2)|((?<!\\\\)\\n)",
4684 "beginCaptures": {
4685 "1": {
4686 "name": "storage.type.string.python"
4687 },
4688 "2": {
4689 "name": "punctuation.definition.string.begin.python"
4690 }
4691 },
4692 "endCaptures": {
4693 "1": {
4694 "name": "punctuation.definition.string.end.python"
4695 },
4696 "2": {
4697 "name": "invalid.illegal.newline.python"
4698 }
4699 },
4700 "patterns": [
4701 {
4702 "include": "#string-raw-bin-guts"
4703 }
4704 ]
4705 },
4706 "string-quoted-single-line": {
4707 "name": "string.quoted.single.python",
4708 "begin": "(?:\\b([rR])(?=[uU]))?([uU])?((['\"]))",
4709 "end": "(\\3)|((?<!\\\\)\\n)",
4710 "beginCaptures": {
4711 "1": {
4712 "name": "invalid.illegal.prefix.python"
4713 },
4714 "2": {
4715 "name": "storage.type.string.python"
4716 },
4717 "3": {
4718 "name": "punctuation.definition.string.begin.python"
4719 }
4720 },
4721 "endCaptures": {
4722 "1": {
4723 "name": "punctuation.definition.string.end.python"
4724 },
4725 "2": {
4726 "name": "invalid.illegal.newline.python"
4727 }
4728 },
4729 "patterns": [
4730 {
4731 "include": "#string-single-bad-brace1-formatting-unicode"
4732 },
4733 {
4734 "include": "#string-single-bad-brace2-formatting-unicode"
4735 },
4736 {
4737 "include": "#string-unicode-guts"
4738 }
4739 ]
4740 },
4741 "string-single-bad-brace1-formatting-unicode": {
4742 "comment": "template using {% ... %}",
4743 "begin": "(?x)\n (?= \\{%\n ( .*? (?!(['\"])|((?<!\\\\)\\n)) )\n %\\}\n )\n",
4744 "end": "(?=(['\"])|((?<!\\\\)\\n))",
4745 "patterns": [
4746 {
4747 "include": "#escape-sequence-unicode"
4748 },
4749 {
4750 "include": "#escape-sequence"
4751 },
4752 {
4753 "include": "#string-line-continuation"
4754 }
4755 ]
4756 },
4757 "string-single-bad-brace1-formatting-raw": {
4758 "comment": "template using {% ... %}",
4759 "begin": "(?x)\n (?= \\{%\n ( .*? (?!(['\"])|((?<!\\\\)\\n)) )\n %\\}\n )\n",
4760 "end": "(?=(['\"])|((?<!\\\\)\\n))",
4761 "patterns": [
4762 {
4763 "include": "#string-consume-escape"
4764 }
4765 ]
4766 },
4767 "string-single-bad-brace2-formatting-unicode": {
4768 "comment": "odd format or format-like syntax",
4769 "begin": "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!(['\"])|((?<!\\\\)\\n)) [^!:\\.\\[}\\w]\n )\n .*?(?!(['\"])|((?<!\\\\)\\n))\n \\}\n )\n",
4770 "end": "(?=(['\"])|((?<!\\\\)\\n))",
4771 "patterns": [
4772 {
4773 "include": "#escape-sequence-unicode"
4774 },
4775 {
4776 "include": "#string-entity"
4777 }
4778 ]
4779 },
4780 "string-single-bad-brace2-formatting-raw": {
4781 "comment": "odd format or format-like syntax",
4782 "begin": "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!(['\"])|((?<!\\\\)\\n)) [^!:\\.\\[}\\w]\n )\n .*?(?!(['\"])|((?<!\\\\)\\n))\n \\}\n )\n",
4783 "end": "(?=(['\"])|((?<!\\\\)\\n))",
4784 "patterns": [
4785 {
4786 "include": "#string-consume-escape"
4787 },
4788 {
4789 "include": "#string-formatting"
4790 }
4791 ]
4792 },
4793 "string-raw-quoted-multi-line": {
4794 "name": "string.quoted.raw.multi.python",
4795 "begin": "\\b(([uU]R)|(R))('''|\"\"\")",
4796 "end": "(\\4)",
4797 "beginCaptures": {
4798 "2": {
4799 "name": "invalid.deprecated.prefix.python"
4800 },
4801 "3": {
4802 "name": "storage.type.string.python"
4803 },
4804 "4": {
4805 "name": "punctuation.definition.string.begin.python"
4806 }
4807 },
4808 "endCaptures": {
4809 "1": {
4810 "name": "punctuation.definition.string.end.python"
4811 },
4812 "2": {
4813 "name": "invalid.illegal.newline.python"
4814 }
4815 },
4816 "patterns": [
4817 {
4818 "include": "#string-multi-bad-brace1-formatting-raw"
4819 },
4820 {
4821 "include": "#string-multi-bad-brace2-formatting-raw"
4822 },
4823 {
4824 "include": "#string-raw-guts"
4825 }
4826 ]
4827 },
4828 "string-bin-quoted-multi-line": {
4829 "name": "string.quoted.binary.multi.python",
4830 "begin": "(\\b[bB])('''|\"\"\")",
4831 "end": "(\\2)",
4832 "beginCaptures": {
4833 "1": {
4834 "name": "storage.type.string.python"
4835 },
4836 "2": {
4837 "name": "punctuation.definition.string.begin.python"
4838 }
4839 },
4840 "endCaptures": {
4841 "1": {
4842 "name": "punctuation.definition.string.end.python"
4843 },
4844 "2": {
4845 "name": "invalid.illegal.newline.python"
4846 }
4847 },
4848 "patterns": [
4849 {
4850 "include": "#string-entity"
4851 }
4852 ]
4853 },
4854 "string-raw-bin-quoted-multi-line": {
4855 "name": "string.quoted.raw.binary.multi.python",
4856 "begin": "(\\b(?:R[bB]|[bB]R))('''|\"\"\")",
4857 "end": "(\\2)",
4858 "beginCaptures": {
4859 "1": {
4860 "name": "storage.type.string.python"
4861 },
4862 "2": {
4863 "name": "punctuation.definition.string.begin.python"
4864 }
4865 },
4866 "endCaptures": {
4867 "1": {
4868 "name": "punctuation.definition.string.end.python"
4869 },
4870 "2": {
4871 "name": "invalid.illegal.newline.python"
4872 }
4873 },
4874 "patterns": [
4875 {
4876 "include": "#string-raw-bin-guts"
4877 }
4878 ]
4879 },
4880 "string-quoted-multi-line": {
4881 "name": "string.quoted.multi.python",
4882 "begin": "(?:\\b([rR])(?=[uU]))?([uU])?('''|\"\"\")",
4883 "end": "(\\3)",
4884 "beginCaptures": {
4885 "1": {
4886 "name": "invalid.illegal.prefix.python"
4887 },
4888 "2": {
4889 "name": "storage.type.string.python"
4890 },
4891 "3": {
4892 "name": "punctuation.definition.string.begin.python"
4893 }
4894 },
4895 "endCaptures": {
4896 "1": {
4897 "name": "punctuation.definition.string.end.python"
4898 },
4899 "2": {
4900 "name": "invalid.illegal.newline.python"
4901 }
4902 },
4903 "patterns": [
4904 {
4905 "include": "#string-multi-bad-brace1-formatting-unicode"
4906 },
4907 {
4908 "include": "#string-multi-bad-brace2-formatting-unicode"
4909 },
4910 {
4911 "include": "#string-unicode-guts"
4912 }
4913 ]
4914 },
4915 "string-multi-bad-brace1-formatting-unicode": {
4916 "comment": "template using {% ... %}",
4917 "begin": "(?x)\n (?= \\{%\n ( .*? (?!'''|\"\"\") )\n %\\}\n )\n",
4918 "end": "(?='''|\"\"\")",
4919 "patterns": [
4920 {
4921 "include": "#escape-sequence-unicode"
4922 },
4923 {
4924 "include": "#escape-sequence"
4925 },
4926 {
4927 "include": "#string-line-continuation"
4928 }
4929 ]
4930 },
4931 "string-multi-bad-brace1-formatting-raw": {
4932 "comment": "template using {% ... %}",
4933 "begin": "(?x)\n (?= \\{%\n ( .*? (?!'''|\"\"\") )\n %\\}\n )\n",
4934 "end": "(?='''|\"\"\")",
4935 "patterns": [
4936 {
4937 "include": "#string-consume-escape"
4938 }
4939 ]
4940 },
4941 "string-multi-bad-brace2-formatting-unicode": {
4942 "comment": "odd format or format-like syntax",
4943 "begin": "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!'''|\"\"\") [^!:\\.\\[}\\w]\n )\n .*?(?!'''|\"\"\")\n \\}\n )\n",
4944 "end": "(?='''|\"\"\")",
4945 "patterns": [
4946 {
4947 "include": "#escape-sequence-unicode"
4948 },
4949 {
4950 "include": "#string-entity"
4951 }
4952 ]
4953 },
4954 "string-multi-bad-brace2-formatting-raw": {
4955 "comment": "odd format or format-like syntax",
4956 "begin": "(?x)\n (?!\\{\\{)\n (?= \\{ (\n \\w*? (?!'''|\"\"\") [^!:\\.\\[}\\w]\n )\n .*?(?!'''|\"\"\")\n \\}\n )\n",
4957 "end": "(?='''|\"\"\")",
4958 "patterns": [
4959 {
4960 "include": "#string-consume-escape"
4961 },
4962 {
4963 "include": "#string-formatting"
4964 }
4965 ]
4966 },
4967 "fstring-fnorm-quoted-single-line": {
4968 "name": "meta.fstring.python",
4969 "begin": "(\\b[fF])([bBuU])?((['\"]))",
4970 "end": "(\\3)|((?<!\\\\)\\n)",
4971 "beginCaptures": {
4972 "1": {
4973 "name": "string.interpolated.python string.quoted.single.python storage.type.string.python"
4974 },
4975 "2": {
4976 "name": "invalid.illegal.prefix.python"
4977 },
4978 "3": {
4979 "name": "punctuation.definition.string.begin.python string.interpolated.python string.quoted.single.python"
4980 }
4981 },
4982 "endCaptures": {
4983 "1": {
4984 "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.single.python"
4985 },
4986 "2": {
4987 "name": "invalid.illegal.newline.python"
4988 }
4989 },
4990 "patterns": [
4991 {
4992 "include": "#fstring-guts"
4993 },
4994 {
4995 "include": "#fstring-illegal-single-brace"
4996 },
4997 {
4998 "include": "#fstring-single-brace"
4999 },
5000 {
5001 "include": "#fstring-single-core"
5002 }
5003 ]
5004 },
5005 "fstring-normf-quoted-single-line": {
5006 "name": "meta.fstring.python",
5007 "begin": "(\\b[bBuU])([fF])((['\"]))",
5008 "end": "(\\3)|((?<!\\\\)\\n)",
5009 "beginCaptures": {
5010 "1": {
5011 "name": "invalid.illegal.prefix.python"
5012 },
5013 "2": {
5014 "name": "string.interpolated.python string.quoted.single.python storage.type.string.python"
5015 },
5016 "3": {
5017 "name": "punctuation.definition.string.begin.python string.quoted.single.python"
5018 }
5019 },
5020 "endCaptures": {
5021 "1": {
5022 "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.single.python"
5023 },
5024 "2": {
5025 "name": "invalid.illegal.newline.python"
5026 }
5027 },
5028 "patterns": [
5029 {
5030 "include": "#fstring-guts"
5031 },
5032 {
5033 "include": "#fstring-illegal-single-brace"
5034 },
5035 {
5036 "include": "#fstring-single-brace"
5037 },
5038 {
5039 "include": "#fstring-single-core"
5040 }
5041 ]
5042 },
5043 "fstring-raw-quoted-single-line": {
5044 "name": "meta.fstring.python",
5045 "begin": "(\\b(?:[R][fF]|[fF][R]))((['\"]))",
5046 "end": "(\\2)|((?<!\\\\)\\n)",
5047 "beginCaptures": {
5048 "1": {
5049 "name": "string.interpolated.python string.quoted.raw.single.python storage.type.string.python"
5050 },
5051 "2": {
5052 "name": "punctuation.definition.string.begin.python string.quoted.raw.single.python"
5053 }
5054 },
5055 "endCaptures": {
5056 "1": {
5057 "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.raw.single.python"
5058 },
5059 "2": {
5060 "name": "invalid.illegal.newline.python"
5061 }
5062 },
5063 "patterns": [
5064 {
5065 "include": "#fstring-raw-guts"
5066 },
5067 {
5068 "include": "#fstring-illegal-single-brace"
5069 },
5070 {
5071 "include": "#fstring-single-brace"
5072 },
5073 {
5074 "include": "#fstring-raw-single-core"
5075 }
5076 ]
5077 },
5078 "fstring-single-core": {
5079 "name": "string.interpolated.python string.quoted.single.python",
5080 "match": "(?x)\n (.+?)\n (\n (?# .* and .*? in multi-line match need special handling of\n newlines otherwise SublimeText and Atom will match slightly\n differently.\n\n The guard for newlines has to be separate from the\n lookahead because of special $ matching rule.)\n ($\\n?)\n |\n (?=[\\\\\\}\\{]|(['\"])|((?<!\\\\)\\n))\n )\n (?# due to how multiline regexps are matched we need a special case\n for matching a newline character)\n | \\n\n"
5081 },
5082 "fstring-raw-single-core": {
5083 "name": "string.interpolated.python string.quoted.raw.single.python",
5084 "match": "(?x)\n (.+?)\n (\n (?# .* and .*? in multi-line match need special handling of\n newlines otherwise SublimeText and Atom will match slightly\n differently.\n\n The guard for newlines has to be separate from the\n lookahead because of special $ matching rule.)\n ($\\n?)\n |\n (?=[\\\\\\}\\{]|(['\"])|((?<!\\\\)\\n))\n )\n (?# due to how multiline regexps are matched we need a special case\n for matching a newline character)\n | \\n\n"
5085 },
5086 "fstring-single-brace": {
5087 "comment": "value interpolation using { ... }",
5088 "begin": "(\\{)",
5089 "end": "(?x)\n (\\})|(?=\\n)\n",
5090 "beginCaptures": {
5091 "1": {
5092 "name": "constant.character.format.placeholder.other.python"
5093 }
5094 },
5095 "endCaptures": {
5096 "1": {
5097 "name": "constant.character.format.placeholder.other.python"
5098 }
5099 },
5100 "patterns": [
5101 {
5102 "include": "#fstring-terminator-single"
5103 },
5104 {
5105 "include": "#f-expression"
5106 }
5107 ]
5108 },
5109 "fstring-terminator-single": {
5110 "patterns": [
5111 {
5112 "name": "storage.type.format.python",
5113 "match": "(![rsa])(?=})"
5114 },
5115 {
5116 "match": "(?x)\n (![rsa])?\n ( : \\w? [<>=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )(?=})\n",
5117 "captures": {
5118 "1": {
5119 "name": "storage.type.format.python"
5120 },
5121 "2": {
5122 "name": "storage.type.format.python"
5123 }
5124 }
5125 },
5126 {
5127 "include": "#fstring-terminator-single-tail"
5128 }
5129 ]
5130 },
5131 "fstring-terminator-single-tail": {
5132 "begin": "(![rsa])?(:)(?=.*?{)",
5133 "end": "(?=})|(?=\\n)",
5134 "beginCaptures": {
5135 "1": {
5136 "name": "storage.type.format.python"
5137 },
5138 "2": {
5139 "name": "storage.type.format.python"
5140 }
5141 },
5142 "patterns": [
5143 {
5144 "include": "#fstring-illegal-single-brace"
5145 },
5146 {
5147 "include": "#fstring-single-brace"
5148 },
5149 {
5150 "name": "storage.type.format.python",
5151 "match": "([bcdeEfFgGnosxX%])(?=})"
5152 },
5153 {
5154 "name": "storage.type.format.python",
5155 "match": "(\\.\\d+)"
5156 },
5157 {
5158 "name": "storage.type.format.python",
5159 "match": "(,)"
5160 },
5161 {
5162 "name": "storage.type.format.python",
5163 "match": "(\\d+)"
5164 },
5165 {
5166 "name": "storage.type.format.python",
5167 "match": "(\\#)"
5168 },
5169 {
5170 "name": "storage.type.format.python",
5171 "match": "([-+ ])"
5172 },
5173 {
5174 "name": "storage.type.format.python",
5175 "match": "([<>=^])"
5176 },
5177 {
5178 "name": "storage.type.format.python",
5179 "match": "(\\w)"
5180 }
5181 ]
5182 },
5183 "fstring-fnorm-quoted-multi-line": {
5184 "name": "meta.fstring.python",
5185 "begin": "(\\b[fF])([bBuU])?('''|\"\"\")",
5186 "end": "(\\3)",
5187 "beginCaptures": {
5188 "1": {
5189 "name": "string.interpolated.python string.quoted.multi.python storage.type.string.python"
5190 },
5191 "2": {
5192 "name": "invalid.illegal.prefix.python"
5193 },
5194 "3": {
5195 "name": "punctuation.definition.string.begin.python string.interpolated.python string.quoted.multi.python"
5196 }
5197 },
5198 "endCaptures": {
5199 "1": {
5200 "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.multi.python"
5201 },
5202 "2": {
5203 "name": "invalid.illegal.newline.python"
5204 }
5205 },
5206 "patterns": [
5207 {
5208 "include": "#fstring-guts"
5209 },
5210 {
5211 "include": "#fstring-illegal-multi-brace"
5212 },
5213 {
5214 "include": "#fstring-multi-brace"
5215 },
5216 {
5217 "include": "#fstring-multi-core"
5218 }
5219 ]
5220 },
5221 "fstring-normf-quoted-multi-line": {
5222 "name": "meta.fstring.python",
5223 "begin": "(\\b[bBuU])([fF])('''|\"\"\")",
5224 "end": "(\\3)",
5225 "beginCaptures": {
5226 "1": {
5227 "name": "invalid.illegal.prefix.python"
5228 },
5229 "2": {
5230 "name": "string.interpolated.python string.quoted.multi.python storage.type.string.python"
5231 },
5232 "3": {
5233 "name": "punctuation.definition.string.begin.python string.quoted.multi.python"
5234 }
5235 },
5236 "endCaptures": {
5237 "1": {
5238 "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.multi.python"
5239 },
5240 "2": {
5241 "name": "invalid.illegal.newline.python"
5242 }
5243 },
5244 "patterns": [
5245 {
5246 "include": "#fstring-guts"
5247 },
5248 {
5249 "include": "#fstring-illegal-multi-brace"
5250 },
5251 {
5252 "include": "#fstring-multi-brace"
5253 },
5254 {
5255 "include": "#fstring-multi-core"
5256 }
5257 ]
5258 },
5259 "fstring-raw-quoted-multi-line": {
5260 "name": "meta.fstring.python",
5261 "begin": "(\\b(?:[R][fF]|[fF][R]))('''|\"\"\")",
5262 "end": "(\\2)",
5263 "beginCaptures": {
5264 "1": {
5265 "name": "string.interpolated.python string.quoted.raw.multi.python storage.type.string.python"
5266 },
5267 "2": {
5268 "name": "punctuation.definition.string.begin.python string.quoted.raw.multi.python"
5269 }
5270 },
5271 "endCaptures": {
5272 "1": {
5273 "name": "punctuation.definition.string.end.python string.interpolated.python string.quoted.raw.multi.python"
5274 },
5275 "2": {
5276 "name": "invalid.illegal.newline.python"
5277 }
5278 },
5279 "patterns": [
5280 {
5281 "include": "#fstring-raw-guts"
5282 },
5283 {
5284 "include": "#fstring-illegal-multi-brace"
5285 },
5286 {
5287 "include": "#fstring-multi-brace"
5288 },
5289 {
5290 "include": "#fstring-raw-multi-core"
5291 }
5292 ]
5293 },
5294 "fstring-multi-core": {
5295 "name": "string.interpolated.python string.quoted.multi.python",
5296 "match": "(?x)\n (.+?)\n (\n (?# .* and .*? in multi-line match need special handling of\n newlines otherwise SublimeText and Atom will match slightly\n differently.\n\n The guard for newlines has to be separate from the\n lookahead because of special $ matching rule.)\n ($\\n?)\n |\n (?=[\\\\\\}\\{]|'''|\"\"\")\n )\n (?# due to how multiline regexps are matched we need a special case\n for matching a newline character)\n | \\n\n"
5297 },
5298 "fstring-raw-multi-core": {
5299 "name": "string.interpolated.python string.quoted.raw.multi.python",
5300 "match": "(?x)\n (.+?)\n (\n (?# .* and .*? in multi-line match need special handling of\n newlines otherwise SublimeText and Atom will match slightly\n differently.\n\n The guard for newlines has to be separate from the\n lookahead because of special $ matching rule.)\n ($\\n?)\n |\n (?=[\\\\\\}\\{]|'''|\"\"\")\n )\n (?# due to how multiline regexps are matched we need a special case\n for matching a newline character)\n | \\n\n"
5301 },
5302 "fstring-multi-brace": {
5303 "comment": "value interpolation using { ... }",
5304 "begin": "(\\{)",
5305 "end": "(?x)\n (\\})\n",
5306 "beginCaptures": {
5307 "1": {
5308 "name": "constant.character.format.placeholder.other.python"
5309 }
5310 },
5311 "endCaptures": {
5312 "1": {
5313 "name": "constant.character.format.placeholder.other.python"
5314 }
5315 },
5316 "patterns": [
5317 {
5318 "include": "#fstring-terminator-multi"
5319 },
5320 {
5321 "include": "#f-expression"
5322 }
5323 ]
5324 },
5325 "fstring-terminator-multi": {
5326 "patterns": [
5327 {
5328 "name": "storage.type.format.python",
5329 "match": "(![rsa])(?=})"
5330 },
5331 {
5332 "match": "(?x)\n (![rsa])?\n ( : \\w? [<>=^]? [-+ ]? \\#?\n \\d* ,? (\\.\\d+)? [bcdeEfFgGnosxX%]? )(?=})\n",
5333 "captures": {
5334 "1": {
5335 "name": "storage.type.format.python"
5336 },
5337 "2": {
5338 "name": "storage.type.format.python"
5339 }
5340 }
5341 },
5342 {
5343 "include": "#fstring-terminator-multi-tail"
5344 }
5345 ]
5346 },
5347 "fstring-terminator-multi-tail": {
5348 "begin": "(![rsa])?(:)(?=.*?{)",
5349 "end": "(?=})",
5350 "beginCaptures": {
5351 "1": {
5352 "name": "storage.type.format.python"
5353 },
5354 "2": {
5355 "name": "storage.type.format.python"
5356 }
5357 },
5358 "patterns": [
5359 {
5360 "include": "#fstring-illegal-multi-brace"
5361 },
5362 {
5363 "include": "#fstring-multi-brace"
5364 },
5365 {
5366 "name": "storage.type.format.python",
5367 "match": "([bcdeEfFgGnosxX%])(?=})"
5368 },
5369 {
5370 "name": "storage.type.format.python",
5371 "match": "(\\.\\d+)"
5372 },
5373 {
5374 "name": "storage.type.format.python",
5375 "match": "(,)"
5376 },
5377 {
5378 "name": "storage.type.format.python",
5379 "match": "(\\d+)"
5380 },
5381 {
5382 "name": "storage.type.format.python",
5383 "match": "(\\#)"
5384 },
5385 {
5386 "name": "storage.type.format.python",
5387 "match": "([-+ ])"
5388 },
5389 {
5390 "name": "storage.type.format.python",
5391 "match": "([<>=^])"
5392 },
5393 {
5394 "name": "storage.type.format.python",
5395 "match": "(\\w)"
5396 }
5397 ]
5398 },
5399 "special-variables-types": {
5400 "patterns": [
5401 {
5402 "name": "variable.language.special.log.vyper",
5403 "match": "(?x)\n (?<!\\.) \\b(\n log )\\b\n"
5404 },
5405 {
5406 "name": "variable.language.special.msg.vyper",
5407 "match": "(?x)\n (?<!\\.) \\b(\n msg )\\b\n"
5408 },
5409 {
5410 "name": "variable.language.special.block.vyper",
5411 "match": "(?x)\n (?<!\\.) \\b(\n block )\\b\n"
5412 }
5413 ]
5414 },
5415 "reserved-names-vyper": {
5416 "name": "name.reserved.vyper",
5417 "match": "(?x)\n \\b (finney | gwei | range | def | ____init____ | timedelta | babbage | zero_address | raise | external | empty_bytes32 | assert | continue | wei | ada | min_int256 | min_int128 | chainid | max_decimal | default | indexed | selfdestruct | lovelace | immutable | throw | kwei | max_int128 | while | constant | ___default___ | balance | twei | codesize | false | max_int256 | _default_ | init | mwei | if | ____default____ | true | payable | internal | until | this | nonpayable | pass | public | nonreentrant | blockhash | max_uint256 | shannon | none | units | _init_ | ___init___ | is_contract | for | zero_wei | min_decimal | szabo | timestamp | ether | pwei | send) \\b\n"
5418 }
5419 }
5420 }
5421