tm-grammars 1.17.4 → 1.17.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +86 -86
- package/grammars/actionscript-3.json +12 -12
- package/grammars/angular-expression.json +20 -20
- package/grammars/angular-let-declaration.json +1 -1
- package/grammars/angular-ts.json +244 -244
- package/grammars/apex.json +61 -61
- package/grammars/apl.json +8 -8
- package/grammars/applescript.json +1 -1
- package/grammars/ara.json +6 -6
- package/grammars/asm.json +10 -10
- package/grammars/astro.json +2 -2
- package/grammars/ballerina.json +72 -72
- package/grammars/bicep.json +5 -5
- package/grammars/blade.json +16 -16
- package/grammars/c.json +11 -11
- package/grammars/clarity.json +25 -25
- package/grammars/codeql.json +182 -182
- package/grammars/coffee.json +9 -9
- package/grammars/common-lisp.json +2 -2
- package/grammars/cpp.json +3 -3
- package/grammars/crystal.json +4 -4
- package/grammars/csharp.json +93 -93
- package/grammars/css.json +15 -15
- package/grammars/dax.json +7 -7
- package/grammars/dream-maker.json +6 -6
- package/grammars/elixir.json +1 -1
- package/grammars/emacs-lisp.json +74 -74
- package/grammars/fsharp.json +48 -48
- package/grammars/gdscript.json +12 -12
- package/grammars/gleam.json +5 -5
- package/grammars/glimmer-js.json +1 -1
- package/grammars/glimmer-ts.json +1 -1
- package/grammars/gnuplot.json +1 -1
- package/grammars/go.json +1 -1
- package/grammars/groovy.json +2 -2
- package/grammars/hack.json +8 -8
- package/grammars/haskell.json +64 -62
- package/grammars/haxe.json +1 -1
- package/grammars/hcl.json +4 -4
- package/grammars/html.json +1 -1
- package/grammars/imba.json +57 -57
- package/grammars/java.json +5 -5
- package/grammars/javascript.json +252 -252
- package/grammars/jison.json +7 -7
- package/grammars/json.json +2 -2
- package/grammars/jsonc.json +2 -2
- package/grammars/jsonl.json +2 -2
- package/grammars/jsx.json +252 -252
- package/grammars/julia.json +20 -20
- package/grammars/lean.json +1 -1
- package/grammars/less.json +8 -8
- package/grammars/markdown.json +5 -5
- package/grammars/marko.json +1 -1
- package/grammars/matlab.json +7 -7
- package/grammars/mdc.json +6 -6
- package/grammars/mdx.json +2 -2
- package/grammars/mojo.json +93 -93
- package/grammars/narrat.json +2 -2
- package/grammars/nim.json +5 -5
- package/grammars/objective-c.json +7 -7
- package/grammars/objective-cpp.json +13 -13
- package/grammars/ocaml.json +93 -93
- package/grammars/php.json +10 -10
- package/grammars/puppet.json +4 -4
- package/grammars/purescript.json +1 -1
- package/grammars/python.json +92 -92
- package/grammars/r.json +5 -5
- package/grammars/racket.json +18 -15
- package/grammars/razor.json +15 -15
- package/grammars/regexp.json +8 -8
- package/grammars/rel.json +1 -1
- package/grammars/riscv.json +1 -1
- package/grammars/ruby.json +4 -4
- package/grammars/scala.json +2 -2
- package/grammars/scheme.json +11 -11
- package/grammars/scss.json +4 -4
- package/grammars/shellsession.json +1 -1
- package/grammars/stylus.json +4 -4
- package/grammars/svelte.json +6 -6
- package/grammars/swift.json +32 -32
- package/grammars/system-verilog.json +1 -1
- package/grammars/terraform.json +4 -4
- package/grammars/toml.json +3 -3
- package/grammars/tsx.json +252 -252
- package/grammars/twig.json +4 -4
- package/grammars/typescript.json +244 -244
- package/grammars/typespec.json +30 -30
- package/grammars/typst.json +11 -11
- package/grammars/vhdl.json +37 -37
- package/grammars/vue.json +2 -2
- package/grammars/vyper.json +112 -112
- package/grammars/wolfram.json +329 -329
- package/grammars/yaml.json +17 -17
- package/index.js +91 -91
- package/package.json +1 -1
package/grammars/vyper.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"repository": {
|
|
16
16
|
"annotated-parameter": {
|
|
17
|
-
"begin": "
|
|
17
|
+
"begin": "\\b([A-Za-z_]\\w*)\\s*(:)",
|
|
18
18
|
"beginCaptures": {
|
|
19
19
|
"1": {
|
|
20
20
|
"name": "variable.parameter.function.language.python"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
]
|
|
41
41
|
},
|
|
42
42
|
"assignment-operator": {
|
|
43
|
-
"match": "(
|
|
43
|
+
"match": "<<=|>>=|//=|\\*\\*=|\\+=|-=|/=|@=|\\*=|%=|~=|\\^=|&=|\\|=|=(?!=)",
|
|
44
44
|
"name": "keyword.operator.assignment.python"
|
|
45
45
|
},
|
|
46
46
|
"backticks": {
|
|
@@ -73,37 +73,37 @@
|
|
|
73
73
|
]
|
|
74
74
|
},
|
|
75
75
|
"builtin-exceptions": {
|
|
76
|
-
"match": "(
|
|
76
|
+
"match": "(?<!\\.)\\b((Arithmetic|Assertion|Attribute|Buffer|BlockingIO|BrokenPipe|ChildProcess|(Connection(Aborted|Refused|Reset)?)|EOF|Environment|FileExists|FileNotFound|FloatingPoint|IO|Import|Indentation|Index|Interrupted|IsADirectory|NotADirectory|Permission|ProcessLookup|Timeout|Key|Lookup|Memory|Name|NotImplemented|OS|Overflow|Reference|Runtime|Recursion|Syntax|System|Tab|Type|UnboundLocal|Unicode(Encode|Decode|Translate)?|Value|Windows|ZeroDivision|ModuleNotFound)Error|((Pending)?Deprecation|Runtime|Syntax|User|Future|Import|Unicode|Bytes|Resource)?Warning|SystemExit|Stop(Async)?Iteration|KeyboardInterrupt|GeneratorExit|(Base)?Exception)\\b",
|
|
77
77
|
"name": "support.type.exception.python"
|
|
78
78
|
},
|
|
79
79
|
"builtin-functions": {
|
|
80
80
|
"patterns": [
|
|
81
81
|
{
|
|
82
|
-
"match": "(
|
|
82
|
+
"match": "(?<!\\.)\\b(__import__|abs|aiter|all|any|anext|ascii|bin|breakpoint|callable|chr|compile|copyright|credits|delattr|dir|divmod|enumerate|eval|exec|exit|filter|format|getattr|globals|hasattr|hash|help|hex|id|input|isinstance|issubclass|iter|len|license|locals|map|max|memoryview|min|next|oct|open|ord|pow|print|quit|range|reload|repr|reversed|round|setattr|sorted|sum|vars|zip)\\b",
|
|
83
83
|
"name": "support.function.builtin.python"
|
|
84
84
|
},
|
|
85
85
|
{
|
|
86
|
-
"match": "(
|
|
86
|
+
"match": "(?<!\\.)\\b(file|reduce|intern|raw_input|unicode|cmp|basestring|execfile|long|xrange)\\b",
|
|
87
87
|
"name": "variable.legacy.builtin.python"
|
|
88
88
|
},
|
|
89
89
|
{
|
|
90
|
-
"match": "(
|
|
90
|
+
"match": "(?<!\\.)\\b(abi_encode|abi_decode|_abi_encode|_abi_decode|floor|ceil|convert|slice|len|concat|sha256|method_id|keccak256|ecrecover|ecadd|ecmul|extract32|as_wei_value|raw_call|blockhash|blobhash|bitwise_and|bitwise_or|bitwise_xor|bitwise_not|uint256_addmod|uint256_mulmod|unsafe_add|unsafe_sub|unsafe_mul|unsafe_div|pow_mod256|uint2str|isqrt|sqrt|shift|create_minimal_proxy_to|create_forwarder_to|create_copy_of|create_from_blueprint|min|max|empty|abs|min_value|max_value|epsilon)\\b",
|
|
91
91
|
"name": "support.function.builtin.vyper"
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
|
-
"match": "(
|
|
94
|
+
"match": "(?<!\\.)\\b(send|print|breakpoint|selfdestruct|raw_call|raw_log|raw_revert|create_minimal_proxy_to|create_forwarder_to|create_copy_of|create_from_blueprint)\\b",
|
|
95
95
|
"name": "support.function.builtin.lowlevel.vyper"
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
|
-
"match": "(
|
|
98
|
+
"match": "(?<!\\.)\\b(struct|enum|flag|event|interface|HashMap|DynArray|Bytes|String)\\b",
|
|
99
99
|
"name": "support.type.reference.vyper"
|
|
100
100
|
},
|
|
101
101
|
{
|
|
102
|
-
"match": "(
|
|
102
|
+
"match": "(?<!\\.)\\b(nonreentrant|internal|view|pure|private|immutable|constant)\\b",
|
|
103
103
|
"name": "support.function.builtin.modifiers.safe.vyper"
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
|
-
"match": "(
|
|
106
|
+
"match": "(?<!\\.)\\b(deploy|nonpayable|payable|external|modifying)\\b",
|
|
107
107
|
"name": "support.function.builtin.modifiers.unsafe.vyper"
|
|
108
108
|
}
|
|
109
109
|
]
|
|
@@ -121,29 +121,29 @@
|
|
|
121
121
|
"builtin-types": {
|
|
122
122
|
"patterns": [
|
|
123
123
|
{
|
|
124
|
-
"match": "(
|
|
124
|
+
"match": "(?<!\\.)\\b(bool|bytearray|bytes|classmethod|complex|dict|float|frozenset|int|list|object|property|set|slice|staticmethod|str|tuple|type(?#Although'super'isnotatype,it'srelatedtotypes,andisspecialenoughtobehighlighteddifferentlyfromotherbuilt-ins)|super)\\b",
|
|
125
125
|
"name": "support.type.python"
|
|
126
126
|
},
|
|
127
127
|
{
|
|
128
|
-
"match": "(
|
|
128
|
+
"match": "(?<!\\.)\\b(uint248|HashMap|bytes22|int88|bytes24|bytes11|int24|bytes28|bytes19|uint136|decimal|uint40|uint168|uint120|int112|bytes4|uint192|String|int104|bytes29|int120|uint232|bytes8|bool|bytes14|int56|uint32|int232|uint48|bytes17|bytes12|uint24|int160|int72|int256|uint56|uint80|uint104|uint144|uint200|bytes20|uint160|bytes18|bytes16|uint8|int40|Bytes|uint72|bytes2|bytes23|int48|bytes6|bytes13|int192|bytes15|uint96|address|uint64|uint88|bytes7|int64|bytes32|bytes30|int176|int248|uint128|int8|int136|int216|bytes31|int144|bytes1|int168|bytes5|uint216|int200|bytes25|uint112|int128|bytes10|uint16|DynArray|int16|int32|int208|int184|bytes9|int224|bytes3|int80|uint152|bytes21|int96|uint256|uint176|uint240|bytes27|bytes26|int240|uint224|uint184|uint208|int152)\\b",
|
|
129
129
|
"name": "support.type.basetype.vyper"
|
|
130
130
|
},
|
|
131
131
|
{
|
|
132
|
-
"match": "(
|
|
132
|
+
"match": "(?<!\\.)\\b(max_int128|min_int128|nonlocal|babbage|_default_|___init___|await|indexed|____init____|true|constant|with|from|nonpayable|finally|enum|zero_wei|del|for|____default____|if|none|or|global|def|not|class|twei|struct|mwei|empty_bytes32|nonreentrant|transient|false|assert|event|pass|finney|init|lovelace|min_decimal|shannon|public|external|internal|flagunreachable|_init_|return|in|and|raise|try|gwei|break|zero_address|pwei|range|wei|while|ada|yield|as|immutable|continue|async|lambda|default|is|szabo|kwei|import|max_uint256|elif|___default___|else|except|max_decimal|interface|payable|ether)\\b",
|
|
133
133
|
"name": "support.type.keywords.vyper"
|
|
134
134
|
},
|
|
135
135
|
{
|
|
136
|
-
"match": "(
|
|
136
|
+
"match": "(?<!\\.)\\b(ZERO_ADDRESS|EMPTY_BYTES32|MAX_INT128|MIN_INT128|MAX_DECIMAL|MIN_DECIMAL|MIN_UINT256|MAX_UINT256(?#Although'super'isnotatype,it'srelatedtotypes,andisspecialenoughtobehighlighteddifferentlyfromotherbuilt-ins)|super)\\b",
|
|
137
137
|
"name": "support.type.constant.vyper"
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
|
-
"match": "(
|
|
140
|
+
"match": "(?<!\\.)\\b(implements|uses|initializes|exports)\\b",
|
|
141
141
|
"name": "entity.other.inherited-class.modules.vyper"
|
|
142
142
|
}
|
|
143
143
|
]
|
|
144
144
|
},
|
|
145
145
|
"call-wrapper-inheritance": {
|
|
146
|
-
"begin": "
|
|
146
|
+
"begin": "\\b(?=([A-Za-z_]\\w*)\\s*(\\())",
|
|
147
147
|
"comment": "same as a function call, but in inheritance context",
|
|
148
148
|
"end": "(\\))",
|
|
149
149
|
"endCaptures": {
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
"class-declaration": {
|
|
165
165
|
"patterns": [
|
|
166
166
|
{
|
|
167
|
-
"begin": "
|
|
167
|
+
"begin": "\\s*(class)\\s+(?=[A-Za-z_]\\w*\\s*(:|\\())",
|
|
168
168
|
"beginCaptures": {
|
|
169
169
|
"1": {
|
|
170
170
|
"name": "storage.type.class.python"
|
|
@@ -248,7 +248,7 @@
|
|
|
248
248
|
"name": "keyword.operator.assignment.python"
|
|
249
249
|
}
|
|
250
250
|
},
|
|
251
|
-
"match": "
|
|
251
|
+
"match": "\\b([A-Za-z_]\\w*)\\s*(=)(?!=)"
|
|
252
252
|
},
|
|
253
253
|
"class-name": {
|
|
254
254
|
"patterns": [
|
|
@@ -259,7 +259,7 @@
|
|
|
259
259
|
"include": "#builtin-possible-callables"
|
|
260
260
|
},
|
|
261
261
|
{
|
|
262
|
-
"match": "
|
|
262
|
+
"match": "\\b([A-Za-z_]\\w*)\\b",
|
|
263
263
|
"name": "entity.name.type.class.python"
|
|
264
264
|
}
|
|
265
265
|
]
|
|
@@ -275,7 +275,7 @@
|
|
|
275
275
|
"comments": {
|
|
276
276
|
"patterns": [
|
|
277
277
|
{
|
|
278
|
-
"begin": "(
|
|
278
|
+
"begin": "(?:\\#\\s*(type:)\\s*+(?#wewant`\\s*+`whichispossessivequantifiersincewedonotactuallywanttobacktrackwhenmatchingwhitespacehere)(?!$|\\#))",
|
|
279
279
|
"beginCaptures": {
|
|
280
280
|
"0": {
|
|
281
281
|
"name": "meta.typehint.comment.python"
|
|
@@ -289,11 +289,11 @@
|
|
|
289
289
|
"name": "comment.line.number-sign.python",
|
|
290
290
|
"patterns": [
|
|
291
291
|
{
|
|
292
|
-
"match": "
|
|
292
|
+
"match": "\\Gignore(?=\\s*(?:$|\\#))",
|
|
293
293
|
"name": "comment.typehint.ignore.notation.python"
|
|
294
294
|
},
|
|
295
295
|
{
|
|
296
|
-
"match": "(
|
|
296
|
+
"match": "(?<!\\.)\\b(bool|bytes|float|int|object|str|List|Dict|Iterable|Sequence|Set|FrozenSet|Callable|Union|Tuple|Any|None)\\b",
|
|
297
297
|
"name": "comment.typehint.type.notation.python"
|
|
298
298
|
},
|
|
299
299
|
{
|
|
@@ -301,7 +301,7 @@
|
|
|
301
301
|
"name": "comment.typehint.punctuation.notation.python"
|
|
302
302
|
},
|
|
303
303
|
{
|
|
304
|
-
"match": "([
|
|
304
|
+
"match": "([A-Za-z_]\\w*)",
|
|
305
305
|
"name": "comment.typehint.variable.notation.python"
|
|
306
306
|
}
|
|
307
307
|
]
|
|
@@ -380,7 +380,7 @@
|
|
|
380
380
|
]
|
|
381
381
|
},
|
|
382
382
|
"decorator": {
|
|
383
|
-
"begin": "
|
|
383
|
+
"begin": "^\\s*((@))\\s*(?=[A-Za-z_]\\w*)",
|
|
384
384
|
"beginCaptures": {
|
|
385
385
|
"1": {
|
|
386
386
|
"name": "entity.name.function.decorator.python"
|
|
@@ -389,7 +389,7 @@
|
|
|
389
389
|
"name": "punctuation.definition.decorator.python"
|
|
390
390
|
}
|
|
391
391
|
},
|
|
392
|
-
"end": "(
|
|
392
|
+
"end": "(\\))(?:(.*?)(?=\\s*(?:\\#|$)))|(?=\\n|\\#)",
|
|
393
393
|
"endCaptures": {
|
|
394
394
|
"1": {
|
|
395
395
|
"name": "punctuation.definition.arguments.end.python"
|
|
@@ -422,7 +422,7 @@
|
|
|
422
422
|
"name": "punctuation.separator.period.python"
|
|
423
423
|
}
|
|
424
424
|
},
|
|
425
|
-
"match": "(
|
|
425
|
+
"match": "([A-Za-z_]\\w*)|(\\.)",
|
|
426
426
|
"name": "entity.name.function.decorator.python"
|
|
427
427
|
},
|
|
428
428
|
{
|
|
@@ -434,7 +434,7 @@
|
|
|
434
434
|
"name": "invalid.illegal.decorator.python"
|
|
435
435
|
}
|
|
436
436
|
},
|
|
437
|
-
"match": "
|
|
437
|
+
"match": "\\s*([^(A-Za-z\\s_\\.#\\\\].*?)(?=\\#|$)",
|
|
438
438
|
"name": "invalid.illegal.decorator.python"
|
|
439
439
|
}
|
|
440
440
|
]
|
|
@@ -572,7 +572,7 @@
|
|
|
572
572
|
"name": "keyword.control.flow.python"
|
|
573
573
|
}
|
|
574
574
|
},
|
|
575
|
-
"match": "(
|
|
575
|
+
"match": "(?:(?:^|\\G)\\s*(?#'\\G'isnecessaryforST)((?:>>>|\\.\\.\\.)\\s)(?=\\s*\\S))"
|
|
576
576
|
},
|
|
577
577
|
"docstring-statement": {
|
|
578
578
|
"begin": "^(?=\\s*[rR]?(\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))",
|
|
@@ -587,7 +587,7 @@
|
|
|
587
587
|
"double-one-regexp-character-set": {
|
|
588
588
|
"patterns": [
|
|
589
589
|
{
|
|
590
|
-
"match": "
|
|
590
|
+
"match": "\\[\\s\\^?\\s\\](?!.*?\\])"
|
|
591
591
|
},
|
|
592
592
|
{
|
|
593
593
|
"begin": "(\\[)(\\^)?(\\])?",
|
|
@@ -648,7 +648,7 @@
|
|
|
648
648
|
]
|
|
649
649
|
},
|
|
650
650
|
"double-one-regexp-conditional": {
|
|
651
|
-
"begin": "(\\()\\?\\((\\w+(?:\\s+[
|
|
651
|
+
"begin": "(\\()\\?\\((\\w+(?:\\s+[0-9A-Za-z]+)?|\\d+)\\)",
|
|
652
652
|
"beginCaptures": {
|
|
653
653
|
"0": {
|
|
654
654
|
"name": "keyword.operator.conditional.regexp"
|
|
@@ -816,7 +816,7 @@
|
|
|
816
816
|
]
|
|
817
817
|
},
|
|
818
818
|
"double-one-regexp-named-group": {
|
|
819
|
-
"begin": "(
|
|
819
|
+
"begin": "(\\()(\\?P<\\w+(?:\\s+[0-9A-Za-z]+)?>)",
|
|
820
820
|
"beginCaptures": {
|
|
821
821
|
"1": {
|
|
822
822
|
"name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"
|
|
@@ -888,7 +888,7 @@
|
|
|
888
888
|
"double-three-regexp-character-set": {
|
|
889
889
|
"patterns": [
|
|
890
890
|
{
|
|
891
|
-
"match": "
|
|
891
|
+
"match": "\\[\\s\\^?\\s\\](?!.*?\\])"
|
|
892
892
|
},
|
|
893
893
|
{
|
|
894
894
|
"begin": "(\\[)(\\^)?(\\])?",
|
|
@@ -949,7 +949,7 @@
|
|
|
949
949
|
]
|
|
950
950
|
},
|
|
951
951
|
"double-three-regexp-conditional": {
|
|
952
|
-
"begin": "(\\()\\?\\((\\w+(?:\\s+[
|
|
952
|
+
"begin": "(\\()\\?\\((\\w+(?:\\s+[0-9A-Za-z]+)?|\\d+)\\)",
|
|
953
953
|
"beginCaptures": {
|
|
954
954
|
"0": {
|
|
955
955
|
"name": "keyword.operator.conditional.regexp"
|
|
@@ -1135,7 +1135,7 @@
|
|
|
1135
1135
|
]
|
|
1136
1136
|
},
|
|
1137
1137
|
"double-three-regexp-named-group": {
|
|
1138
|
-
"begin": "(
|
|
1138
|
+
"begin": "(\\()(\\?P<\\w+(?:\\s+[0-9A-Za-z]+)?>)",
|
|
1139
1139
|
"beginCaptures": {
|
|
1140
1140
|
"1": {
|
|
1141
1141
|
"name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"
|
|
@@ -1218,13 +1218,13 @@
|
|
|
1218
1218
|
"name": "constant.other.ellipsis.python"
|
|
1219
1219
|
},
|
|
1220
1220
|
"escape-sequence": {
|
|
1221
|
-
"match": "(
|
|
1221
|
+
"match": "\\\\(x[0-9A-Fa-f]{2}|[0-7]{1,3}|[\\\\\"'abfnrtv])",
|
|
1222
1222
|
"name": "constant.character.escape.python"
|
|
1223
1223
|
},
|
|
1224
1224
|
"escape-sequence-unicode": {
|
|
1225
1225
|
"patterns": [
|
|
1226
1226
|
{
|
|
1227
|
-
"match": "
|
|
1227
|
+
"match": "\\\\(u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8}|N\\{[\\w\\s]+?\\})",
|
|
1228
1228
|
"name": "constant.character.escape.python"
|
|
1229
1229
|
}
|
|
1230
1230
|
]
|
|
@@ -1240,7 +1240,7 @@
|
|
|
1240
1240
|
},
|
|
1241
1241
|
{
|
|
1242
1242
|
"comment": "Tokenize identifiers to help linters",
|
|
1243
|
-
"match": "
|
|
1243
|
+
"match": "\\b([A-Za-z_]\\w*)\\b"
|
|
1244
1244
|
}
|
|
1245
1245
|
]
|
|
1246
1246
|
},
|
|
@@ -1352,7 +1352,7 @@
|
|
|
1352
1352
|
},
|
|
1353
1353
|
{
|
|
1354
1354
|
"comment": "Tokenize identifiers to help linters",
|
|
1355
|
-
"match": "
|
|
1355
|
+
"match": "\\b([A-Za-z_]\\w*)\\b"
|
|
1356
1356
|
}
|
|
1357
1357
|
]
|
|
1358
1358
|
},
|
|
@@ -1373,7 +1373,7 @@
|
|
|
1373
1373
|
]
|
|
1374
1374
|
},
|
|
1375
1375
|
"fregexp-quantifier": {
|
|
1376
|
-
"match": "
|
|
1376
|
+
"match": "\\{\\{(\\d+|\\d+,(\\d+)?|,\\d+)\\}\\}",
|
|
1377
1377
|
"name": "keyword.operator.quantifier.regexp"
|
|
1378
1378
|
},
|
|
1379
1379
|
"fstring-fnorm-quoted-multi-line": {
|
|
@@ -1543,7 +1543,7 @@
|
|
|
1543
1543
|
}
|
|
1544
1544
|
},
|
|
1545
1545
|
"comment": "value interpolation using { ... }",
|
|
1546
|
-
"end": "(
|
|
1546
|
+
"end": "(\\})",
|
|
1547
1547
|
"endCaptures": {
|
|
1548
1548
|
"1": {
|
|
1549
1549
|
"name": "constant.character.format.placeholder.other.python"
|
|
@@ -1559,7 +1559,7 @@
|
|
|
1559
1559
|
]
|
|
1560
1560
|
},
|
|
1561
1561
|
"fstring-multi-core": {
|
|
1562
|
-
"match": "(
|
|
1562
|
+
"match": "(.+?)((?#.*and.*?inmulti-linematchneedspecialhandlingofnewlinesotherwiseSublimeTextandAtomwillmatchslightlydifferently.Theguardfornewlineshastobeseparatefromthelookaheadbecauseofspecial$matchingrule.)($\\n?)|(?=[\\\\\\}\\{]|'''|\"\"\"))(?#duetohowmultilineregexpsarematchedweneedaspecialcaseformatchinganewlinecharacter)|\\n",
|
|
1563
1563
|
"name": "string.interpolated.python string.quoted.multi.python"
|
|
1564
1564
|
},
|
|
1565
1565
|
"fstring-normf-quoted-multi-line": {
|
|
@@ -1649,7 +1649,7 @@
|
|
|
1649
1649
|
]
|
|
1650
1650
|
},
|
|
1651
1651
|
"fstring-raw-multi-core": {
|
|
1652
|
-
"match": "(
|
|
1652
|
+
"match": "(.+?)((?#.*and.*?inmulti-linematchneedspecialhandlingofnewlinesotherwiseSublimeTextandAtomwillmatchslightlydifferently.Theguardfornewlineshastobeseparatefromthelookaheadbecauseofspecial$matchingrule.)($\\n?)|(?=[\\\\\\}\\{]|'''|\"\"\"))(?#duetohowmultilineregexpsarematchedweneedaspecialcaseformatchinganewlinecharacter)|\\n",
|
|
1653
1653
|
"name": "string.interpolated.python string.quoted.raw.multi.python"
|
|
1654
1654
|
},
|
|
1655
1655
|
"fstring-raw-quoted-multi-line": {
|
|
@@ -1723,7 +1723,7 @@
|
|
|
1723
1723
|
]
|
|
1724
1724
|
},
|
|
1725
1725
|
"fstring-raw-single-core": {
|
|
1726
|
-
"match": "(
|
|
1726
|
+
"match": "(.+?)((?#.*and.*?inmulti-linematchneedspecialhandlingofnewlinesotherwiseSublimeTextandAtomwillmatchslightlydifferently.Theguardfornewlineshastobeseparatefromthelookaheadbecauseofspecial$matchingrule.)($\\n?)|(?=[\\\\\\}\\{]|(['\"])|((?<!\\\\)\\n)))(?#duetohowmultilineregexpsarematchedweneedaspecialcaseformatchinganewlinecharacter)|\\n",
|
|
1727
1727
|
"name": "string.interpolated.python string.quoted.raw.single.python"
|
|
1728
1728
|
},
|
|
1729
1729
|
"fstring-single-brace": {
|
|
@@ -1734,7 +1734,7 @@
|
|
|
1734
1734
|
}
|
|
1735
1735
|
},
|
|
1736
1736
|
"comment": "value interpolation using { ... }",
|
|
1737
|
-
"end": "(
|
|
1737
|
+
"end": "(\\})|(?=\\n)",
|
|
1738
1738
|
"endCaptures": {
|
|
1739
1739
|
"1": {
|
|
1740
1740
|
"name": "constant.character.format.placeholder.other.python"
|
|
@@ -1750,7 +1750,7 @@
|
|
|
1750
1750
|
]
|
|
1751
1751
|
},
|
|
1752
1752
|
"fstring-single-core": {
|
|
1753
|
-
"match": "(
|
|
1753
|
+
"match": "(.+?)((?#.*and.*?inmulti-linematchneedspecialhandlingofnewlinesotherwiseSublimeTextandAtomwillmatchslightlydifferently.Theguardfornewlineshastobeseparatefromthelookaheadbecauseofspecial$matchingrule.)($\\n?)|(?=[\\\\\\}\\{]|(['\"])|((?<!\\\\)\\n)))(?#duetohowmultilineregexpsarematchedweneedaspecialcaseformatchinganewlinecharacter)|\\n",
|
|
1754
1754
|
"name": "string.interpolated.python string.quoted.single.python"
|
|
1755
1755
|
},
|
|
1756
1756
|
"fstring-terminator-multi": {
|
|
@@ -1772,7 +1772,7 @@
|
|
|
1772
1772
|
"name": "storage.type.format.python"
|
|
1773
1773
|
}
|
|
1774
1774
|
},
|
|
1775
|
-
"match": "(
|
|
1775
|
+
"match": "((?:=?)(?:![rsa])?)(:\\w?[<>=^]?[-+\\s]?\\#?\\d*,?(\\.\\d+)?[bcdeEfFgGnosxX%]?)(?=})"
|
|
1776
1776
|
},
|
|
1777
1777
|
{
|
|
1778
1778
|
"include": "#fstring-terminator-multi-tail"
|
|
@@ -1850,7 +1850,7 @@
|
|
|
1850
1850
|
"name": "storage.type.format.python"
|
|
1851
1851
|
}
|
|
1852
1852
|
},
|
|
1853
|
-
"match": "(
|
|
1853
|
+
"match": "((?:=?)(?:![rsa])?)(:\\w?[<>=^]?[-+\\s]?\\#?\\d*,?(\\.\\d+)?[bcdeEfFgGnosxX%]?)(?=})"
|
|
1854
1854
|
},
|
|
1855
1855
|
{
|
|
1856
1856
|
"include": "#fstring-terminator-single-tail"
|
|
@@ -1929,7 +1929,7 @@
|
|
|
1929
1929
|
"name": "keyword.operator.unpacking.arguments.python"
|
|
1930
1930
|
}
|
|
1931
1931
|
},
|
|
1932
|
-
"match": "(
|
|
1932
|
+
"match": "(?:(?<=[,(])|^)\\s*(\\*{1,2})"
|
|
1933
1933
|
},
|
|
1934
1934
|
{
|
|
1935
1935
|
"include": "#lambda-incomplete"
|
|
@@ -1946,7 +1946,7 @@
|
|
|
1946
1946
|
"name": "keyword.operator.assignment.python"
|
|
1947
1947
|
}
|
|
1948
1948
|
},
|
|
1949
|
-
"match": "\\b([
|
|
1949
|
+
"match": "\\b([A-Za-z_]\\w*)\\s*(=)(?!=)"
|
|
1950
1950
|
},
|
|
1951
1951
|
{
|
|
1952
1952
|
"match": "=(?!=)",
|
|
@@ -1969,7 +1969,7 @@
|
|
|
1969
1969
|
]
|
|
1970
1970
|
},
|
|
1971
1971
|
"function-call": {
|
|
1972
|
-
"begin": "
|
|
1972
|
+
"begin": "\\b(?=([A-Za-z_]\\w*)\\s*(\\())",
|
|
1973
1973
|
"comment": "Regular function call of the type \"name(args)\"",
|
|
1974
1974
|
"end": "(\\))",
|
|
1975
1975
|
"endCaptures": {
|
|
@@ -1991,7 +1991,7 @@
|
|
|
1991
1991
|
]
|
|
1992
1992
|
},
|
|
1993
1993
|
"function-declaration": {
|
|
1994
|
-
"begin": "
|
|
1994
|
+
"begin": "\\s*(?:\\b(async)\\s+)?\\b(def)\\s+(?=[A-Za-z_][\\w]*\\s*\\()",
|
|
1995
1995
|
"beginCaptures": {
|
|
1996
1996
|
"1": {
|
|
1997
1997
|
"name": "storage.type.function.async.python"
|
|
@@ -2025,11 +2025,11 @@
|
|
|
2025
2025
|
"function-def-name": {
|
|
2026
2026
|
"patterns": [
|
|
2027
2027
|
{
|
|
2028
|
-
"match": "
|
|
2028
|
+
"match": "\\b(__default__)\\b",
|
|
2029
2029
|
"name": "entity.name.function.fallback.vyper"
|
|
2030
2030
|
},
|
|
2031
2031
|
{
|
|
2032
|
-
"match": "
|
|
2032
|
+
"match": "\\b(__init__)\\b",
|
|
2033
2033
|
"name": "entity.name.function.constructor.vyper"
|
|
2034
2034
|
},
|
|
2035
2035
|
{
|
|
@@ -2039,7 +2039,7 @@
|
|
|
2039
2039
|
"include": "#builtin-possible-callables"
|
|
2040
2040
|
},
|
|
2041
2041
|
{
|
|
2042
|
-
"match": "
|
|
2042
|
+
"match": "\\b([A-Za-z_]\\w*)\\b",
|
|
2043
2043
|
"name": "entity.name.function.python"
|
|
2044
2044
|
}
|
|
2045
2045
|
]
|
|
@@ -2051,7 +2051,7 @@
|
|
|
2051
2051
|
},
|
|
2052
2052
|
{
|
|
2053
2053
|
"comment": "Some color schemas support meta.function-call.generic scope",
|
|
2054
|
-
"match": "
|
|
2054
|
+
"match": "\\b([A-Za-z_]\\w*)\\b",
|
|
2055
2055
|
"name": "meta.function-call.generic.python"
|
|
2056
2056
|
}
|
|
2057
2057
|
]
|
|
@@ -2089,7 +2089,7 @@
|
|
|
2089
2089
|
"name": "keyword.control.import.python"
|
|
2090
2090
|
}
|
|
2091
2091
|
},
|
|
2092
|
-
"match": "
|
|
2092
|
+
"match": "\\b(?:(and|assert|async|await|break|class|continue|def|del|elif|else|except|finally|for|from|global|if|in|is|(?<=\\.)lambda|lambda(?=\\s*[\\.=])|nonlocal|not|or|pass|raise|return|try|while|with|yield)|(as|import))\\b"
|
|
2093
2093
|
},
|
|
2094
2094
|
"illegal-object-name": {
|
|
2095
2095
|
"comment": "It's illegal to name class or function \"True\"",
|
|
@@ -2164,7 +2164,7 @@
|
|
|
2164
2164
|
"name": "entity.other.inherited-class.python"
|
|
2165
2165
|
}
|
|
2166
2166
|
},
|
|
2167
|
-
"match": "
|
|
2167
|
+
"match": "\\b([A-Za-z_]\\w*)\\b"
|
|
2168
2168
|
},
|
|
2169
2169
|
"inheritance-name": {
|
|
2170
2170
|
"patterns": [
|
|
@@ -2182,7 +2182,7 @@
|
|
|
2182
2182
|
"item-access": {
|
|
2183
2183
|
"patterns": [
|
|
2184
2184
|
{
|
|
2185
|
-
"begin": "
|
|
2185
|
+
"begin": "\\b(?=[A-Za-z_]\\w*\\s*\\[)",
|
|
2186
2186
|
"end": "(\\])",
|
|
2187
2187
|
"endCaptures": {
|
|
2188
2188
|
"1": {
|
|
@@ -2235,7 +2235,7 @@
|
|
|
2235
2235
|
"include": "#special-names"
|
|
2236
2236
|
},
|
|
2237
2237
|
{
|
|
2238
|
-
"match": "
|
|
2238
|
+
"match": "\\b([A-Za-z_]\\w*)\\b",
|
|
2239
2239
|
"name": "meta.indexed-name.python"
|
|
2240
2240
|
},
|
|
2241
2241
|
{
|
|
@@ -2262,7 +2262,7 @@
|
|
|
2262
2262
|
"match": "\\b(lambda)\\s*?(?=[,\\n]|$)"
|
|
2263
2263
|
},
|
|
2264
2264
|
{
|
|
2265
|
-
"begin": "
|
|
2265
|
+
"begin": "\\b(lambda)\\b",
|
|
2266
2266
|
"beginCaptures": {
|
|
2267
2267
|
"1": {
|
|
2268
2268
|
"name": "storage.type.function.lambda.python"
|
|
@@ -2300,7 +2300,7 @@
|
|
|
2300
2300
|
"name": "punctuation.separator.parameters.python"
|
|
2301
2301
|
}
|
|
2302
2302
|
},
|
|
2303
|
-
"match": "([
|
|
2303
|
+
"match": "([A-Za-z_]\\w*)\\s*(?:(,)|(?=:|$))"
|
|
2304
2304
|
},
|
|
2305
2305
|
{
|
|
2306
2306
|
"include": "#comments"
|
|
@@ -2333,7 +2333,7 @@
|
|
|
2333
2333
|
"name": "storage.type.function.lambda.python"
|
|
2334
2334
|
},
|
|
2335
2335
|
"lambda-parameter-with-default": {
|
|
2336
|
-
"begin": "
|
|
2336
|
+
"begin": "\\b([A-Za-z_]\\w*)\\s*(=)",
|
|
2337
2337
|
"beginCaptures": {
|
|
2338
2338
|
"1": {
|
|
2339
2339
|
"name": "variable.parameter.function.language.python"
|
|
@@ -2374,7 +2374,7 @@
|
|
|
2374
2374
|
"name": "punctuation.separator.continuation.line.python"
|
|
2375
2375
|
}
|
|
2376
2376
|
},
|
|
2377
|
-
"end": "(
|
|
2377
|
+
"end": "(?=^\\s*$)|(?!(\\s*[rR]?(\\'\\'\\'|\\\"\\\"\\\"|\\'|\\\"))|(\\G$)(?#'\\G'isnecessaryforST))",
|
|
2378
2378
|
"patterns": [
|
|
2379
2379
|
{
|
|
2380
2380
|
"include": "#regexp"
|
|
@@ -2442,7 +2442,7 @@
|
|
|
2442
2442
|
}
|
|
2443
2443
|
},
|
|
2444
2444
|
"comment": "these methods have magic interpretation by python and are generally called\nindirectly through syntactic constructs\n",
|
|
2445
|
-
"match": "
|
|
2445
|
+
"match": "\\b(__(?:abs|add|aenter|aexit|aiter|and|anext|await|bool|call|ceil|class_getitem|cmp|coerce|complex|contains|copy|deepcopy|del|delattr|delete|delitem|delslice|dir|div|divmod|enter|eq|exit|float|floor|floordiv|format|ge|get|getattr|getattribute|getinitargs|getitem|getnewargs|getslice|getstate|gt|hash|hex|iadd|iand|idiv|ifloordiv||ilshift|imod|imul|index|init|instancecheck|int|invert|ior|ipow|irshift|isub|iter|itruediv|ixor|le|len|long|lshift|lt|missing|mod|mul|ne|neg|new|next|nonzero|oct|or|pos|pow|radd|rand|rdiv|rdivmod|reduce|reduce_ex|repr|reversed|rfloordiv||rlshift|rmod|rmul|ror|round|rpow|rrshift|rshift|rsub|rtruediv|rxor|set|setattr|setitem|set_name|setslice|setstate|sizeof|str|sub|subclasscheck|truediv|trunc|unicode|xor|matmul|rmatmul|imatmul|init_subclass|set_name|fspath|bytes|prepare|length_hint)__)\\b"
|
|
2446
2446
|
},
|
|
2447
2447
|
"magic-names": {
|
|
2448
2448
|
"patterns": [
|
|
@@ -2461,7 +2461,7 @@
|
|
|
2461
2461
|
}
|
|
2462
2462
|
},
|
|
2463
2463
|
"comment": "magic variables which a class/module may have.",
|
|
2464
|
-
"match": "
|
|
2464
|
+
"match": "\\b(__(?:all|annotations|bases|builtins|class|closure|code|debug|defaults|dict|doc|file|func|globals|kwdefaults|match_args|members|metaclass|methods|module|mro|mro_entries|name|qualname|post_init|self|signature|slots|subclasses|version|weakref|wrapped|classcell|spec|path|package|future|traceback)__)\\b"
|
|
2465
2465
|
},
|
|
2466
2466
|
"member-access": {
|
|
2467
2467
|
"begin": "(\\.)\\s*(?!\\.)",
|
|
@@ -2470,7 +2470,7 @@
|
|
|
2470
2470
|
"name": "punctuation.separator.period.python"
|
|
2471
2471
|
}
|
|
2472
2472
|
},
|
|
2473
|
-
"end": "(
|
|
2473
|
+
"end": "(?<=\\S)(?=\\W)|(^|(?<=\\s))(?=[^\\\\\\w\\s])|$",
|
|
2474
2474
|
"name": "meta.member.access.python",
|
|
2475
2475
|
"patterns": [
|
|
2476
2476
|
{
|
|
@@ -2486,7 +2486,7 @@
|
|
|
2486
2486
|
},
|
|
2487
2487
|
"member-access-attribute": {
|
|
2488
2488
|
"comment": "Highlight attribute access in otherwise non-specialized cases.",
|
|
2489
|
-
"match": "
|
|
2489
|
+
"match": "\\b([A-Za-z_]\\w*)\\b",
|
|
2490
2490
|
"name": "meta.attribute.python"
|
|
2491
2491
|
},
|
|
2492
2492
|
"member-access-base": {
|
|
@@ -2568,7 +2568,7 @@
|
|
|
2568
2568
|
"name": "storage.type.number.python"
|
|
2569
2569
|
}
|
|
2570
2570
|
},
|
|
2571
|
-
"match": "(
|
|
2571
|
+
"match": "(?<![\\w\\.])(0[bB])(_?[01])+\\b",
|
|
2572
2572
|
"name": "constant.numeric.bin.python"
|
|
2573
2573
|
},
|
|
2574
2574
|
"number-dec": {
|
|
@@ -2580,7 +2580,7 @@
|
|
|
2580
2580
|
"name": "invalid.illegal.dec.python"
|
|
2581
2581
|
}
|
|
2582
2582
|
},
|
|
2583
|
-
"match": "(
|
|
2583
|
+
"match": "(?<![\\w\\.])(?:[1-9](?:_?[0-9])*|0+|[0-9](?:_?[0-9])*([jJ])|0([0-9]+)(?![eE\\.]))\\b",
|
|
2584
2584
|
"name": "constant.numeric.dec.python"
|
|
2585
2585
|
},
|
|
2586
2586
|
"number-float": {
|
|
@@ -2589,7 +2589,7 @@
|
|
|
2589
2589
|
"name": "storage.type.imaginary.number.python"
|
|
2590
2590
|
}
|
|
2591
2591
|
},
|
|
2592
|
-
"match": "(
|
|
2592
|
+
"match": "(?<!\\w)(?:(?:\\.[0-9](?:_?[0-9])*|[0-9](?:_?[0-9])*\\.[0-9](?:_?[0-9])*|[0-9](?:_?[0-9])*\\.)(?:[eE][+-]?[0-9](?:_?[0-9])*)?|[0-9](?:_?[0-9])*(?:[eE][+-]?[0-9](?:_?[0-9])*))([jJ])?\\b",
|
|
2593
2593
|
"name": "constant.numeric.float.python"
|
|
2594
2594
|
},
|
|
2595
2595
|
"number-hex": {
|
|
@@ -2598,7 +2598,7 @@
|
|
|
2598
2598
|
"name": "storage.type.number.python"
|
|
2599
2599
|
}
|
|
2600
2600
|
},
|
|
2601
|
-
"match": "(
|
|
2601
|
+
"match": "(?<![\\w\\.])(0[xX])(_?[0-9a-fA-F])+\\b",
|
|
2602
2602
|
"name": "constant.numeric.hex.python"
|
|
2603
2603
|
},
|
|
2604
2604
|
"number-long": {
|
|
@@ -2608,7 +2608,7 @@
|
|
|
2608
2608
|
}
|
|
2609
2609
|
},
|
|
2610
2610
|
"comment": "this is to support python2 syntax for long ints",
|
|
2611
|
-
"match": "(
|
|
2611
|
+
"match": "(?<![\\w\\.])([1-9][0-9]*|0)([lL])\\b",
|
|
2612
2612
|
"name": "constant.numeric.bin.python"
|
|
2613
2613
|
},
|
|
2614
2614
|
"number-oct": {
|
|
@@ -2617,11 +2617,11 @@
|
|
|
2617
2617
|
"name": "storage.type.number.python"
|
|
2618
2618
|
}
|
|
2619
2619
|
},
|
|
2620
|
-
"match": "(
|
|
2620
|
+
"match": "(?<![\\w\\.])(0[oO])(_?[0-7])+\\b",
|
|
2621
2621
|
"name": "constant.numeric.oct.python"
|
|
2622
2622
|
},
|
|
2623
2623
|
"odd-function-call": {
|
|
2624
|
-
"begin": "(
|
|
2624
|
+
"begin": "(?<=\\]|\\))\\s*(?=\\()",
|
|
2625
2625
|
"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",
|
|
2626
2626
|
"end": "(\\))",
|
|
2627
2627
|
"endCaptures": {
|
|
@@ -2656,7 +2656,7 @@
|
|
|
2656
2656
|
"name": "keyword.operator.assignment.python"
|
|
2657
2657
|
}
|
|
2658
2658
|
},
|
|
2659
|
-
"match": "
|
|
2659
|
+
"match": "\\b(?<!\\.)(?:(and|or|not|in|is)(?#1)|(for|if|else|await|(?:yield(?:\\s+from)?))(?#2))(?!\\s*:)\\b|(<<|>>|&|\\||\\^|~)(?#3)|(\\*\\*|\\*|\\+|-|%|//|/|@)(?#4)|(!=|==|>=|<=|<|>)(?#5)|(:=)(?#6)"
|
|
2660
2660
|
},
|
|
2661
2661
|
"parameter-special": {
|
|
2662
2662
|
"captures": {
|
|
@@ -2673,7 +2673,7 @@
|
|
|
2673
2673
|
"name": "punctuation.separator.parameters.python"
|
|
2674
2674
|
}
|
|
2675
2675
|
},
|
|
2676
|
-
"match": "
|
|
2676
|
+
"match": "\\b((self)|(cls))\\b\\s*(?:(,)|(?=\\)))"
|
|
2677
2677
|
},
|
|
2678
2678
|
"parameters": {
|
|
2679
2679
|
"begin": "(\\()",
|
|
@@ -2719,7 +2719,7 @@
|
|
|
2719
2719
|
"name": "punctuation.separator.parameters.python"
|
|
2720
2720
|
}
|
|
2721
2721
|
},
|
|
2722
|
-
"match": "(
|
|
2722
|
+
"match": "([A-Za-z_]\\w*)\\s*(?:(,)|(?=[)#\\n=]))"
|
|
2723
2723
|
},
|
|
2724
2724
|
{
|
|
2725
2725
|
"include": "#comments"
|
|
@@ -2772,7 +2772,7 @@
|
|
|
2772
2772
|
"name": "support.other.parenthesis.regexp punctuation.parenthesis.backreference.named.end.regexp"
|
|
2773
2773
|
}
|
|
2774
2774
|
},
|
|
2775
|
-
"match": "(
|
|
2775
|
+
"match": "(\\()(\\?P=\\w+(?:\\s+[0-9A-Za-z]+)?)(\\))",
|
|
2776
2776
|
"name": "meta.backreference.named.regexp"
|
|
2777
2777
|
},
|
|
2778
2778
|
"regexp-backreference-number": {
|
|
@@ -2914,7 +2914,7 @@
|
|
|
2914
2914
|
"name": "constant.character.escape.regexp"
|
|
2915
2915
|
},
|
|
2916
2916
|
"regexp-escape-character": {
|
|
2917
|
-
"match": "(
|
|
2917
|
+
"match": "\\\\(x[0-9A-Fa-f]{2}|0[0-7]{1,2}|[0-7]{3})",
|
|
2918
2918
|
"name": "constant.character.escape.regexp"
|
|
2919
2919
|
},
|
|
2920
2920
|
"regexp-escape-sequence": {
|
|
@@ -2941,7 +2941,7 @@
|
|
|
2941
2941
|
"name": "support.other.escape.special.regexp"
|
|
2942
2942
|
},
|
|
2943
2943
|
"regexp-escape-unicode": {
|
|
2944
|
-
"match": "
|
|
2944
|
+
"match": "\\\\(u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})",
|
|
2945
2945
|
"name": "constant.character.unicode.regexp"
|
|
2946
2946
|
},
|
|
2947
2947
|
"regexp-flags": {
|
|
@@ -2949,7 +2949,7 @@
|
|
|
2949
2949
|
"name": "storage.modifier.flag.regexp"
|
|
2950
2950
|
},
|
|
2951
2951
|
"regexp-quantifier": {
|
|
2952
|
-
"match": "
|
|
2952
|
+
"match": "\\{(\\d+|\\d+,(\\d+)?|,\\d+)\\}",
|
|
2953
2953
|
"name": "keyword.operator.quantifier.regexp"
|
|
2954
2954
|
},
|
|
2955
2955
|
"regexp-single-one-line": {
|
|
@@ -3017,7 +3017,7 @@
|
|
|
3017
3017
|
]
|
|
3018
3018
|
},
|
|
3019
3019
|
"reserved-names-vyper": {
|
|
3020
|
-
"match": "
|
|
3020
|
+
"match": "\\b(max_int128|min_int128|nonlocal|babbage|_default_|___init___|await|indexed|____init____|true|constant|with|from|nonpayable|finally|enum|zero_wei|del|for|____default____|if|none|or|global|def|not|class|twei|struct|mwei|empty_bytes32|nonreentrant|transient|false|assert|event|pass|finney|init|lovelace|min_decimal|shannon|public|external|internal|flagunreachable|_init_|return|in|and|raise|try|gwei|break|zero_address|pwei|range|wei|while|ada|yield|as|immutable|continue|async|lambda|default|is|szabo|kwei|import|max_uint256|elif|___default___|else|except|max_decimal|interface|payable|ether)\\b",
|
|
3021
3021
|
"name": "name.reserved.vyper"
|
|
3022
3022
|
},
|
|
3023
3023
|
"return-annotation": {
|
|
@@ -3064,7 +3064,7 @@
|
|
|
3064
3064
|
"single-one-regexp-character-set": {
|
|
3065
3065
|
"patterns": [
|
|
3066
3066
|
{
|
|
3067
|
-
"match": "
|
|
3067
|
+
"match": "\\[\\s\\^?\\s\\](?!.*?\\])"
|
|
3068
3068
|
},
|
|
3069
3069
|
{
|
|
3070
3070
|
"begin": "(\\[)(\\^)?(\\])?",
|
|
@@ -3125,7 +3125,7 @@
|
|
|
3125
3125
|
]
|
|
3126
3126
|
},
|
|
3127
3127
|
"single-one-regexp-conditional": {
|
|
3128
|
-
"begin": "(\\()\\?\\((\\w+(?:\\s+[
|
|
3128
|
+
"begin": "(\\()\\?\\((\\w+(?:\\s+[0-9A-Za-z]+)?|\\d+)\\)",
|
|
3129
3129
|
"beginCaptures": {
|
|
3130
3130
|
"0": {
|
|
3131
3131
|
"name": "keyword.operator.conditional.regexp"
|
|
@@ -3293,7 +3293,7 @@
|
|
|
3293
3293
|
]
|
|
3294
3294
|
},
|
|
3295
3295
|
"single-one-regexp-named-group": {
|
|
3296
|
-
"begin": "(
|
|
3296
|
+
"begin": "(\\()(\\?P<\\w+(?:\\s+[0-9A-Za-z]+)?>)",
|
|
3297
3297
|
"beginCaptures": {
|
|
3298
3298
|
"1": {
|
|
3299
3299
|
"name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"
|
|
@@ -3365,7 +3365,7 @@
|
|
|
3365
3365
|
"single-three-regexp-character-set": {
|
|
3366
3366
|
"patterns": [
|
|
3367
3367
|
{
|
|
3368
|
-
"match": "
|
|
3368
|
+
"match": "\\[\\s\\^?\\s\\](?!.*?\\])"
|
|
3369
3369
|
},
|
|
3370
3370
|
{
|
|
3371
3371
|
"begin": "(\\[)(\\^)?(\\])?",
|
|
@@ -3426,7 +3426,7 @@
|
|
|
3426
3426
|
]
|
|
3427
3427
|
},
|
|
3428
3428
|
"single-three-regexp-conditional": {
|
|
3429
|
-
"begin": "(\\()\\?\\((\\w+(?:\\s+[
|
|
3429
|
+
"begin": "(\\()\\?\\((\\w+(?:\\s+[0-9A-Za-z]+)?|\\d+)\\)",
|
|
3430
3430
|
"beginCaptures": {
|
|
3431
3431
|
"0": {
|
|
3432
3432
|
"name": "keyword.operator.conditional.regexp"
|
|
@@ -3612,7 +3612,7 @@
|
|
|
3612
3612
|
]
|
|
3613
3613
|
},
|
|
3614
3614
|
"single-three-regexp-named-group": {
|
|
3615
|
-
"begin": "(
|
|
3615
|
+
"begin": "(\\()(\\?P<\\w+(?:\\s+[0-9A-Za-z]+)?>)",
|
|
3616
3616
|
"beginCaptures": {
|
|
3617
3617
|
"1": {
|
|
3618
3618
|
"name": "support.other.parenthesis.regexp punctuation.parenthesis.named.begin.regexp"
|
|
@@ -3691,7 +3691,7 @@
|
|
|
3691
3691
|
]
|
|
3692
3692
|
},
|
|
3693
3693
|
"special-names": {
|
|
3694
|
-
"match": "
|
|
3694
|
+
"match": "\\b(_*[A-Z][_\\d]*[A-Z])[A-Z\\d]*(_\\w*)?\\b",
|
|
3695
3695
|
"name": "constant.other.caps.python"
|
|
3696
3696
|
},
|
|
3697
3697
|
"special-variables": {
|
|
@@ -3703,40 +3703,40 @@
|
|
|
3703
3703
|
"name": "variable.language.special.cls.python"
|
|
3704
3704
|
}
|
|
3705
3705
|
},
|
|
3706
|
-
"match": "
|
|
3706
|
+
"match": "\\b(?<!\\.)(?:(self)|(cls))\\b"
|
|
3707
3707
|
},
|
|
3708
3708
|
"special-variables-types": {
|
|
3709
3709
|
"patterns": [
|
|
3710
3710
|
{
|
|
3711
|
-
"match": "(
|
|
3711
|
+
"match": "(?<!\\.)\\b(log)\\b",
|
|
3712
3712
|
"name": "variable.language.special.log.vyper"
|
|
3713
3713
|
},
|
|
3714
3714
|
{
|
|
3715
|
-
"match": "(
|
|
3715
|
+
"match": "(?<!\\.)\\b(msg)\\b",
|
|
3716
3716
|
"name": "variable.language.special.msg.vyper"
|
|
3717
3717
|
},
|
|
3718
3718
|
{
|
|
3719
|
-
"match": "(
|
|
3719
|
+
"match": "(?<!\\.)\\b(block)\\b",
|
|
3720
3720
|
"name": "variable.language.special.block.vyper"
|
|
3721
3721
|
},
|
|
3722
3722
|
{
|
|
3723
|
-
"match": "(
|
|
3723
|
+
"match": "(?<!\\.)\\b(tx)\\b",
|
|
3724
3724
|
"name": "variable.language.special.tx.vyper"
|
|
3725
3725
|
},
|
|
3726
3726
|
{
|
|
3727
|
-
"match": "(
|
|
3727
|
+
"match": "(?<!\\.)\\b(chain)\\b",
|
|
3728
3728
|
"name": "variable.language.special.chain.vyper"
|
|
3729
3729
|
},
|
|
3730
3730
|
{
|
|
3731
|
-
"match": "(
|
|
3731
|
+
"match": "(?<!\\.)\\b(extcall)\\b",
|
|
3732
3732
|
"name": "variable.language.special.extcall.vyper"
|
|
3733
3733
|
},
|
|
3734
3734
|
{
|
|
3735
|
-
"match": "(
|
|
3735
|
+
"match": "(?<!\\.)\\b(staticcall)\\b",
|
|
3736
3736
|
"name": "variable.language.special.staticcall.vyper"
|
|
3737
3737
|
},
|
|
3738
3738
|
{
|
|
3739
|
-
"match": "
|
|
3739
|
+
"match": "\\b(__interface__)\\b",
|
|
3740
3740
|
"name": "variable.language.special.__interface__.vyper"
|
|
3741
3741
|
}
|
|
3742
3742
|
]
|
|
@@ -3789,11 +3789,11 @@
|
|
|
3789
3789
|
"name": "keyword.control.import.python"
|
|
3790
3790
|
},
|
|
3791
3791
|
{
|
|
3792
|
-
"match": "
|
|
3792
|
+
"match": "\\b(?<!\\.)(async|continue|del|assert|break|finally|for|from|elif|else|if|except|pass|raise|return|try|while|with)\\b",
|
|
3793
3793
|
"name": "keyword.control.flow.python"
|
|
3794
3794
|
},
|
|
3795
3795
|
{
|
|
3796
|
-
"match": "
|
|
3796
|
+
"match": "\\b(?<!\\.)(global|nonlocal)\\b",
|
|
3797
3797
|
"name": "storage.modifier.declaration.python"
|
|
3798
3798
|
},
|
|
3799
3799
|
{
|
|
@@ -3806,7 +3806,7 @@
|
|
|
3806
3806
|
"name": "keyword.control.flow.python"
|
|
3807
3807
|
}
|
|
3808
3808
|
},
|
|
3809
|
-
"match": "
|
|
3809
|
+
"match": "^\\s*(case|match)(?=\\s*([-+\\w\\d(\\[{'\":#]|$))\\b"
|
|
3810
3810
|
}
|
|
3811
3811
|
]
|
|
3812
3812
|
},
|
|
@@ -3922,7 +3922,7 @@
|
|
|
3922
3922
|
"name": "storage.type.format.python"
|
|
3923
3923
|
}
|
|
3924
3924
|
},
|
|
3925
|
-
"match": "(
|
|
3925
|
+
"match": "({{|}}|(?:{\\w*(\\.[A-Za-z_]\\w*|\\[[^\\]'\"]+\\])*(![rsa])?(:\\w?[<>=^]?[-+\\s]?\\#?\\d*,?(\\.\\d+)?[bcdeEfFgGnosxX%]?)?}))",
|
|
3926
3926
|
"name": "meta.format.brace.python"
|
|
3927
3927
|
},
|
|
3928
3928
|
{
|
|
@@ -3937,7 +3937,7 @@
|
|
|
3937
3937
|
"name": "storage.type.format.python"
|
|
3938
3938
|
}
|
|
3939
3939
|
},
|
|
3940
|
-
"match": "(
|
|
3940
|
+
"match": "({\\w*(\\.[A-Za-z_]\\w*|\\[[^\\]'\"]+\\])*(![rsa])?(:)[^'\"{}\\n]*(?:\\{[^'\"}\\n]*?\\}[^'\"{}\\n]*)*})",
|
|
3941
3941
|
"name": "meta.format.brace.python"
|
|
3942
3942
|
}
|
|
3943
3943
|
]
|
|
@@ -3964,7 +3964,7 @@
|
|
|
3964
3964
|
"name": "constant.character.format.placeholder.other.python"
|
|
3965
3965
|
}
|
|
3966
3966
|
},
|
|
3967
|
-
"match": "(
|
|
3967
|
+
"match": "(%(\\([\\w\\s]*\\))?[-+#0\\s]*(\\d+|\\*)?(\\.(\\d+|\\*))?([hlL])?[diouxXeEfFgGcrsab%])",
|
|
3968
3968
|
"name": "meta.format.percent.python"
|
|
3969
3969
|
},
|
|
3970
3970
|
"string-line-continuation": {
|
|
@@ -3972,7 +3972,7 @@
|
|
|
3972
3972
|
"name": "constant.language.python"
|
|
3973
3973
|
},
|
|
3974
3974
|
"string-multi-bad-brace1-formatting-raw": {
|
|
3975
|
-
"begin": "(
|
|
3975
|
+
"begin": "(?=\\{%(.*?(?!'''|\"\"\"))%\\})",
|
|
3976
3976
|
"comment": "template using {% ... %}",
|
|
3977
3977
|
"end": "(?='''|\"\"\")",
|
|
3978
3978
|
"patterns": [
|
|
@@ -3982,7 +3982,7 @@
|
|
|
3982
3982
|
]
|
|
3983
3983
|
},
|
|
3984
3984
|
"string-multi-bad-brace1-formatting-unicode": {
|
|
3985
|
-
"begin": "(
|
|
3985
|
+
"begin": "(?=\\{%(.*?(?!'''|\"\"\"))%\\})",
|
|
3986
3986
|
"comment": "template using {% ... %}",
|
|
3987
3987
|
"end": "(?='''|\"\"\")",
|
|
3988
3988
|
"patterns": [
|
|
@@ -3998,7 +3998,7 @@
|
|
|
3998
3998
|
]
|
|
3999
3999
|
},
|
|
4000
4000
|
"string-multi-bad-brace2-formatting-raw": {
|
|
4001
|
-
"begin": "(
|
|
4001
|
+
"begin": "(?!\\{\\{)(?=\\{(\\w*?(?!'''|\"\"\")[^!:\\.\\[}\\w]).*?(?!'''|\"\"\")\\})",
|
|
4002
4002
|
"comment": "odd format or format-like syntax",
|
|
4003
4003
|
"end": "(?='''|\"\"\")",
|
|
4004
4004
|
"patterns": [
|
|
@@ -4011,7 +4011,7 @@
|
|
|
4011
4011
|
]
|
|
4012
4012
|
},
|
|
4013
4013
|
"string-multi-bad-brace2-formatting-unicode": {
|
|
4014
|
-
"begin": "(
|
|
4014
|
+
"begin": "(?!\\{\\{)(?=\\{(\\w*?(?!'''|\"\"\")[^!:\\.\\[}\\w]).*?(?!'''|\"\"\")\\})",
|
|
4015
4015
|
"comment": "odd format or format-like syntax",
|
|
4016
4016
|
"end": "(?='''|\"\"\")",
|
|
4017
4017
|
"patterns": [
|
|
@@ -4239,7 +4239,7 @@
|
|
|
4239
4239
|
]
|
|
4240
4240
|
},
|
|
4241
4241
|
"string-single-bad-brace1-formatting-raw": {
|
|
4242
|
-
"begin": "(
|
|
4242
|
+
"begin": "(?=\\{%(.*?(?!(['\"])|((?<!\\\\)\\n)))%\\})",
|
|
4243
4243
|
"comment": "template using {% ... %}",
|
|
4244
4244
|
"end": "(?=(['\"])|((?<!\\\\)\\n))",
|
|
4245
4245
|
"patterns": [
|
|
@@ -4249,7 +4249,7 @@
|
|
|
4249
4249
|
]
|
|
4250
4250
|
},
|
|
4251
4251
|
"string-single-bad-brace1-formatting-unicode": {
|
|
4252
|
-
"begin": "(
|
|
4252
|
+
"begin": "(?=\\{%(.*?(?!(['\"])|((?<!\\\\)\\n)))%\\})",
|
|
4253
4253
|
"comment": "template using {% ... %}",
|
|
4254
4254
|
"end": "(?=(['\"])|((?<!\\\\)\\n))",
|
|
4255
4255
|
"patterns": [
|
|
@@ -4265,7 +4265,7 @@
|
|
|
4265
4265
|
]
|
|
4266
4266
|
},
|
|
4267
4267
|
"string-single-bad-brace2-formatting-raw": {
|
|
4268
|
-
"begin": "(
|
|
4268
|
+
"begin": "(?!\\{\\{)(?=\\{(\\w*?(?!(['\"])|((?<!\\\\)\\n))[^!:\\.\\[}\\w]).*?(?!(['\"])|((?<!\\\\)\\n))\\})",
|
|
4269
4269
|
"comment": "odd format or format-like syntax",
|
|
4270
4270
|
"end": "(?=(['\"])|((?<!\\\\)\\n))",
|
|
4271
4271
|
"patterns": [
|
|
@@ -4278,7 +4278,7 @@
|
|
|
4278
4278
|
]
|
|
4279
4279
|
},
|
|
4280
4280
|
"string-single-bad-brace2-formatting-unicode": {
|
|
4281
|
-
"begin": "(
|
|
4281
|
+
"begin": "(?!\\{\\{)(?=\\{(\\w*?(?!(['\"])|((?<!\\\\)\\n))[^!:\\.\\[}\\w]).*?(?!(['\"])|((?<!\\\\)\\n))\\})",
|
|
4282
4282
|
"comment": "odd format or format-like syntax",
|
|
4283
4283
|
"end": "(?=(['\"])|((?<!\\\\)\\n))",
|
|
4284
4284
|
"patterns": [
|