tm-grammars 1.0.3 → 1.0.4
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 +1 -1
- package/grammars/gdscript.json +175 -185
- package/index.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -68,7 +68,7 @@ import { grammars } from 'tm-grammars'
|
|
|
68
68
|
| `fish` | | [bmalehorn/vscode-fish](https://github.com/bmalehorn/vscode-fish/blob/2fe4ccc72fdcd9b9f54fbb2c05fe9b350c32d718/syntaxes/fish.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/bmalehorn/vscode-fish/master/LICENSE) | | 5.13 kB |
|
|
69
69
|
| `fsharp` | `f#` `fs` | [microsoft/vscode](https://github.com/microsoft/vscode/blob/3c86ede5f554f6e196c832394e126b291a1de606/extensions/fsharp/syntaxes/fsharp.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | `markdown` | 24.01 kB |
|
|
70
70
|
| `gdresource` | | [godotengine/godot-vscode-plugin](https://github.com/godotengine/godot-vscode-plugin/blob/e7e2d0439dea0fb3a568378554c81e0a17348a84/syntaxes/GDResource.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/godotengine/godot-vscode-plugin/master/LICENSE) | `gdshader` `gdscript` | 4.90 kB |
|
|
71
|
-
| `gdscript` | | [godotengine/godot-vscode-plugin](https://github.com/godotengine/godot-vscode-plugin/blob/
|
|
71
|
+
| `gdscript` | | [godotengine/godot-vscode-plugin](https://github.com/godotengine/godot-vscode-plugin/blob/0a794ebc1b09b334c5f77816bc708d1cc330bf8f/syntaxes/GDScript.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/godotengine/godot-vscode-plugin/master/LICENSE) | | 15.45 kB |
|
|
72
72
|
| `gdshader` | | [godotengine/godot-vscode-plugin](https://github.com/godotengine/godot-vscode-plugin/blob/e7e2d0439dea0fb3a568378554c81e0a17348a84/syntaxes/GDShader.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/godotengine/godot-vscode-plugin/master/LICENSE) | | 5.95 kB |
|
|
73
73
|
| `gherkin` | | [alexkrechik/VSCucumberAutoComplete](https://github.com/alexkrechik/VSCucumberAutoComplete/blob/fc8da969b1c83e13ef5124b1ec90ba5211bc1e5f/gclient/syntaxes/feature.tmLanguage) | [MIT](https://raw.githubusercontent.com/alexkrechik/VSCucumberAutoComplete/master/LICENSE) | | 12.13 kB |
|
|
74
74
|
| `git-commit` | | [microsoft/vscode](https://github.com/microsoft/vscode/blob/f8c3f89468fea14103d8790d59ea8594d6e644eb/extensions/git-base/syntaxes/git-commit.tmLanguage.json) | [MIT](https://raw.githubusercontent.com/microsoft/vscode/main/LICENSE.txt) | `diff` | 1.36 kB |
|
package/grammars/gdscript.json
CHANGED
|
@@ -6,111 +6,24 @@
|
|
|
6
6
|
"name": "gdscript",
|
|
7
7
|
"patterns": [
|
|
8
8
|
{
|
|
9
|
-
"include": "#
|
|
9
|
+
"include": "#statement"
|
|
10
10
|
},
|
|
11
11
|
{
|
|
12
|
-
"include": "#
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"include": "#logic_op"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"include": "#in_keyword"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"include": "#getter_setter_godot4"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"include": "#compare_op"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"include": "#arithmetic_op"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"include": "#assignment_op"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"include": "#lambda_declaration"
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"include": "#control_flow"
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
"include": "#annotations"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"include": "#keywords"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"include": "#self"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"include": "#class_definition"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
"include": "#variable_definition"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"include": "#class_name"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"include": "#builtin_func"
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
"include": "#builtin_get_node_shorthand"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"include": "#builtin_classes"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"include": "#const_vars"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"include": "#pascal_case_class"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"include": "#class_new"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"include": "#class_is"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"include": "#class_enum"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"include": "#signal_declaration_bare"
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
"include": "#signal_declaration"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"include": "#function_declaration"
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
"include": "#function_keyword"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"include": "#any_method"
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
"include": "#any_variable"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"include": "#any_property"
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
"include": "#extends"
|
|
12
|
+
"include": "#expression"
|
|
103
13
|
}
|
|
104
14
|
],
|
|
105
15
|
"repository": {
|
|
106
16
|
"annotated_parameter": {
|
|
107
|
-
"begin": "(?x)\n
|
|
17
|
+
"begin": "(?x)\n \\s* ([a-zA-Z_]\\w*) \\s* (:)\\s* ([a-zA-Z_]\\w*)? \n",
|
|
108
18
|
"beginCaptures": {
|
|
109
19
|
"1": {
|
|
110
20
|
"name": "variable.parameter.function.language.gdscript"
|
|
111
21
|
},
|
|
112
22
|
"2": {
|
|
113
23
|
"name": "punctuation.separator.annotation.gdscript"
|
|
24
|
+
},
|
|
25
|
+
"3": {
|
|
26
|
+
"name": "entity.name.type.class.builtin.gdscript"
|
|
114
27
|
}
|
|
115
28
|
},
|
|
116
29
|
"end": "(,)|(?=\\))",
|
|
@@ -150,20 +63,23 @@
|
|
|
150
63
|
"name": "punctuation.accessor.gdscript"
|
|
151
64
|
},
|
|
152
65
|
"2": {
|
|
66
|
+
"name": "constant.language.gdscript"
|
|
67
|
+
},
|
|
68
|
+
"3": {
|
|
153
69
|
"name": "variable.other.property.gdscript"
|
|
154
70
|
}
|
|
155
71
|
},
|
|
156
|
-
"match": "\\b(\\.)\\s*(?<![@\\$#%])([A-Za-z_]\\w*)\\b(?![(])"
|
|
72
|
+
"match": "\\b(\\.)\\s*(?<![@\\$#%])(?:(\\b[A-Z_][A-Z_0-9]*\\b)|([A-Za-z_]\\w*))\\b(?![(])"
|
|
157
73
|
},
|
|
158
74
|
"any_variable": {
|
|
159
75
|
"match": "\\b(?<![@\\$#%])([A-Za-z_]\\w*)\\b(?![(])",
|
|
160
76
|
"name": "variable.other.gdscript"
|
|
161
77
|
},
|
|
162
|
-
"
|
|
163
|
-
"match": "
|
|
78
|
+
"arithmetic_operator": {
|
|
79
|
+
"match": "->|\\+=|-=|\\*=|/=|%=|&=|\\|=|\\*|/|%|\\+|-|<<|>>|&|\\||\\^|~|!",
|
|
164
80
|
"name": "keyword.operator.arithmetic.gdscript"
|
|
165
81
|
},
|
|
166
|
-
"
|
|
82
|
+
"assignment_operator": {
|
|
167
83
|
"match": "=",
|
|
168
84
|
"name": "keyword.operator.assignment.gdscript"
|
|
169
85
|
},
|
|
@@ -181,15 +97,45 @@
|
|
|
181
97
|
{
|
|
182
98
|
"include": "#strings"
|
|
183
99
|
},
|
|
100
|
+
{
|
|
101
|
+
"include": "#const_vars"
|
|
102
|
+
},
|
|
184
103
|
{
|
|
185
104
|
"include": "#keywords"
|
|
186
105
|
},
|
|
187
106
|
{
|
|
188
|
-
"include": "#
|
|
107
|
+
"include": "#logic_operator"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
"include": "#compare_operator"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"include": "#arithmetic_operator"
|
|
189
114
|
},
|
|
190
115
|
{
|
|
191
116
|
"include": "#lambda_declaration"
|
|
192
117
|
},
|
|
118
|
+
{
|
|
119
|
+
"include": "#class_declaration"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"include": "#variable_declaration"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"include": "#signal_declaration_bare"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"include": "#signal_declaration"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"include": "#function_declaration"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"include": "#statement_keyword"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"include": "#assignment_operator"
|
|
138
|
+
},
|
|
193
139
|
{
|
|
194
140
|
"include": "#in_keyword"
|
|
195
141
|
},
|
|
@@ -214,15 +160,9 @@
|
|
|
214
160
|
{
|
|
215
161
|
"include": "#numbers"
|
|
216
162
|
},
|
|
217
|
-
{
|
|
218
|
-
"include": "#builtin_func"
|
|
219
|
-
},
|
|
220
163
|
{
|
|
221
164
|
"include": "#builtin_classes"
|
|
222
165
|
},
|
|
223
|
-
{
|
|
224
|
-
"include": "#const_vars"
|
|
225
|
-
},
|
|
226
166
|
{
|
|
227
167
|
"include": "#pascal_case_class"
|
|
228
168
|
},
|
|
@@ -235,10 +175,6 @@
|
|
|
235
175
|
"match": "(?<![^.]\\.|:)\\b(OS|GDScript|Vector2|Vector2i|Vector3|Vector3i|Color|Rect2|Rect2i|Array|Basis|Dictionary|Plane|Quat|RID|Rect3|Transform|Transform2D|Transform3D|AABB|String|Color|NodePath|Object|PoolByteArray|PoolIntArray|PoolRealArray|PoolStringArray|PoolVector2Array|PoolVector3Array|PoolColorArray|bool|int|float|StringName|Quaternion|PackedByteArray|PackedInt32Array|PackedInt64Array|PackedFloat32Array|PackedFloat64Array|PackedStringArray|PackedVector2Array|PackedVector2iArray|PackedVector3Array|PackedVector3iArray|PackedColorArray|super)\\b",
|
|
236
176
|
"name": "entity.name.type.class.builtin.gdscript"
|
|
237
177
|
},
|
|
238
|
-
"builtin_func": {
|
|
239
|
-
"match": "(?<![^.]\\.|:)\\b(abs|absf|absi|acos|asin|assert|atan|atan2|bytes2var|bytes2var_with_objects|ceil|char|clamp|clampf|clampi|Color8|convert|cos|cosh|cubic_interpolate|db2linear|decimals|dectime|deg2rad|dict2inst|ease|error_string|exp|floor|fmod|fposmod|funcref|get_stack|hash|inst2dict|instance_from_id|inverse_lerp|is_equal_approx|is_inf|is_instance_id_valid|is_instance_valid|is_nan|is_zero_approx|len|lerp|lerp_angle|linear2db|load|log|max|maxf|maxi|min|minf|mini|move_toward|nearest_po2|pingpong|posmod|pow|preload|print|printerr|printraw|prints|printt|print_debug|print_stack|print_verbose|push_error|push_warning|rad2deg|randf|randfn|randf_range|randi|randi_range|randomize|rand_from_seed|rand_range|rand_seed|range|range_lerp|range_step_decimals|rid_allocate_id|rid_from_int64|round|seed|sign|signf|signi|sin|sinh|smoothstep|snapped|sqrt|stepify|step_decimals|str|str2var|tan|tanh|typeof|type_exists|var2bytes|var2bytes_with_objects|var2str|weakref|wrapf|wrapi|yield)\\b(?=(\\()([^)]*)(\\)))",
|
|
240
|
-
"name": "support.function.builtin.gdscript"
|
|
241
|
-
},
|
|
242
178
|
"builtin_get_node_shorthand": {
|
|
243
179
|
"patterns": [
|
|
244
180
|
{
|
|
@@ -259,7 +195,7 @@
|
|
|
259
195
|
"name": "constant.character.escape.gdscript"
|
|
260
196
|
}
|
|
261
197
|
},
|
|
262
|
-
"end": "[
|
|
198
|
+
"end": "(?!%?\\s*[a-zA-Z_]\\w*)\\s*/?*",
|
|
263
199
|
"name": "meta.literal.nodepath.gdscript",
|
|
264
200
|
"patterns": [
|
|
265
201
|
{
|
|
@@ -271,7 +207,7 @@
|
|
|
271
207
|
"name": "constant.character.escape.gdscript"
|
|
272
208
|
}
|
|
273
209
|
},
|
|
274
|
-
"match": "(%)
|
|
210
|
+
"match": "(%)?\\s*([a-zA-Z_]\\w*)\\s*/?"
|
|
275
211
|
}
|
|
276
212
|
]
|
|
277
213
|
},
|
|
@@ -286,7 +222,7 @@
|
|
|
286
222
|
}
|
|
287
223
|
},
|
|
288
224
|
"end": "(\\3)",
|
|
289
|
-
"name": "meta.literal.nodepath.gdscript constant.character.escape.gdscript",
|
|
225
|
+
"name": "string.quoted.gdscript meta.literal.nodepath.gdscript constant.character.escape.gdscript",
|
|
290
226
|
"patterns": [
|
|
291
227
|
{
|
|
292
228
|
"match": "%",
|
|
@@ -294,7 +230,7 @@
|
|
|
294
230
|
}
|
|
295
231
|
]
|
|
296
232
|
},
|
|
297
|
-
"
|
|
233
|
+
"class_declaration": {
|
|
298
234
|
"captures": {
|
|
299
235
|
"1": {
|
|
300
236
|
"name": "entity.name.type.class.gdscript"
|
|
@@ -361,7 +297,7 @@
|
|
|
361
297
|
"match": "(#).*$\\n?",
|
|
362
298
|
"name": "comment.line.number-sign.gdscript"
|
|
363
299
|
},
|
|
364
|
-
"
|
|
300
|
+
"compare_operator": {
|
|
365
301
|
"match": "<=|>=|==|<|>|!=",
|
|
366
302
|
"name": "keyword.operator.comparison.gdscript"
|
|
367
303
|
},
|
|
@@ -373,9 +309,56 @@
|
|
|
373
309
|
"match": "\\b(?:if|elif|else|while|break|continue|pass|return|match|yield|await)\\b",
|
|
374
310
|
"name": "keyword.control.gdscript"
|
|
375
311
|
},
|
|
376
|
-
"
|
|
377
|
-
"
|
|
378
|
-
|
|
312
|
+
"expression": {
|
|
313
|
+
"patterns": [
|
|
314
|
+
{
|
|
315
|
+
"include": "#base_expression"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"include": "#getter_setter_godot4"
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
"include": "#assignment_operator"
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"include": "#annotations"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"include": "#class_name"
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"include": "#builtin_classes"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"include": "#class_new"
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"include": "#class_is"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"include": "#class_enum"
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
"include": "#any_method"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"include": "#any_variable"
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"include": "#any_property"
|
|
349
|
+
}
|
|
350
|
+
]
|
|
351
|
+
},
|
|
352
|
+
"extends_statement": {
|
|
353
|
+
"captures": {
|
|
354
|
+
"1": {
|
|
355
|
+
"name": "keyword.language.gdscript"
|
|
356
|
+
},
|
|
357
|
+
"2": {
|
|
358
|
+
"name": "entity.other.inherited-class.gdscript"
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
"match": "(extends)\\s+([a-zA-Z_]\\w*\\.[a-zA-Z_]\\w*)?"
|
|
379
362
|
},
|
|
380
363
|
"function_arguments": {
|
|
381
364
|
"begin": "(\\()",
|
|
@@ -436,6 +419,11 @@
|
|
|
436
419
|
},
|
|
437
420
|
"function_call": {
|
|
438
421
|
"begin": "(?x)\n \\b(?=\n ([a-zA-Z_]\\w*) \\s* (\\()\n )\n",
|
|
422
|
+
"beginCaptures": {
|
|
423
|
+
"2": {
|
|
424
|
+
"name": "punctuation.definition.arguments.begin.gdscript"
|
|
425
|
+
}
|
|
426
|
+
},
|
|
439
427
|
"comment": "Regular function call of the type \"name(args)\"",
|
|
440
428
|
"end": "(\\))",
|
|
441
429
|
"endCaptures": {
|
|
@@ -463,10 +451,17 @@
|
|
|
463
451
|
"name": "entity.name.function.gdscript"
|
|
464
452
|
}
|
|
465
453
|
},
|
|
466
|
-
"end": "((
|
|
467
|
-
"
|
|
454
|
+
"end": "(:|(?=[#'\"\\n]))",
|
|
455
|
+
"end2": "(\\s*(\\-\\>)\\s*(void\\w*)|([a-zA-Z_]\\w*)\\s*\\:)",
|
|
456
|
+
"endCaptures2": {
|
|
468
457
|
"1": {
|
|
469
|
-
"name": "punctuation.
|
|
458
|
+
"name": "punctuation.separator.annotation.result.gdscript"
|
|
459
|
+
},
|
|
460
|
+
"2": {
|
|
461
|
+
"name": "keyword.language.void.gdscript"
|
|
462
|
+
},
|
|
463
|
+
"3": {
|
|
464
|
+
"name": "entity.name.type.class.gdscript markup.italic"
|
|
470
465
|
}
|
|
471
466
|
},
|
|
472
467
|
"name": "meta.function.gdscript",
|
|
@@ -477,31 +472,13 @@
|
|
|
477
472
|
{
|
|
478
473
|
"include": "#line_continuation"
|
|
479
474
|
},
|
|
480
|
-
{
|
|
481
|
-
"captures": {
|
|
482
|
-
"1": {
|
|
483
|
-
"name": "keyword.language.void.gdscript"
|
|
484
|
-
},
|
|
485
|
-
"2": {
|
|
486
|
-
"name": "entity.name.type.class.gdscript"
|
|
487
|
-
}
|
|
488
|
-
},
|
|
489
|
-
"match": "\\s*(?:\\-\\>)\\s*(void\\w*)|([a-zA-Z_]\\w*)\\s*\\:"
|
|
490
|
-
},
|
|
491
475
|
{
|
|
492
476
|
"include": "#base_expression"
|
|
493
477
|
}
|
|
494
478
|
]
|
|
495
479
|
},
|
|
496
|
-
"function_keyword": {
|
|
497
|
-
"match": "func",
|
|
498
|
-
"name": "keyword.language.gdscript"
|
|
499
|
-
},
|
|
500
480
|
"function_name": {
|
|
501
481
|
"patterns": [
|
|
502
|
-
{
|
|
503
|
-
"include": "#builtin_func"
|
|
504
|
-
},
|
|
505
482
|
{
|
|
506
483
|
"include": "#builtin_classes"
|
|
507
484
|
},
|
|
@@ -537,16 +514,6 @@
|
|
|
537
514
|
},
|
|
538
515
|
{
|
|
539
516
|
"include": "#line_continuation"
|
|
540
|
-
},
|
|
541
|
-
{
|
|
542
|
-
"captures": {
|
|
543
|
-
"1": {
|
|
544
|
-
},
|
|
545
|
-
"2": {
|
|
546
|
-
"name": "entity.name.type.class.gdscript"
|
|
547
|
-
}
|
|
548
|
-
},
|
|
549
|
-
"match": "\\s*(\\-\\>)\\s*([a-zA-Z_]\\w*)\\s*\\:"
|
|
550
517
|
}
|
|
551
518
|
]
|
|
552
519
|
}
|
|
@@ -585,7 +552,7 @@
|
|
|
585
552
|
]
|
|
586
553
|
},
|
|
587
554
|
"keywords": {
|
|
588
|
-
"match": "\\b(?:class|class_name|
|
|
555
|
+
"match": "\\b(?:class|class_name|is|onready|tool|static|export|as|void|enum|preload|assert|breakpoint|rpc|sync|remote|master|puppet|slave|remotesync|mastersync|puppetsync|trait|namespace)\\b",
|
|
589
556
|
"name": "keyword.language.gdscript"
|
|
590
557
|
},
|
|
591
558
|
"lambda_declaration": {
|
|
@@ -599,6 +566,18 @@
|
|
|
599
566
|
}
|
|
600
567
|
},
|
|
601
568
|
"end": "(:|(?=[#'\"\\n]))",
|
|
569
|
+
"end2": "(\\s*(\\-\\>)\\s*(void\\w*)|([a-zA-Z_]\\w*)\\s*\\:)",
|
|
570
|
+
"endCaptures2": {
|
|
571
|
+
"1": {
|
|
572
|
+
"name": "punctuation.separator.annotation.result.gdscript"
|
|
573
|
+
},
|
|
574
|
+
"2": {
|
|
575
|
+
"name": "keyword.language.void.gdscript"
|
|
576
|
+
},
|
|
577
|
+
"3": {
|
|
578
|
+
"name": "entity.name.type.class.gdscript markup.italic"
|
|
579
|
+
}
|
|
580
|
+
},
|
|
602
581
|
"name": "meta.function.gdscript",
|
|
603
582
|
"patterns": [
|
|
604
583
|
{
|
|
@@ -607,17 +586,6 @@
|
|
|
607
586
|
{
|
|
608
587
|
"include": "#line_continuation"
|
|
609
588
|
},
|
|
610
|
-
{
|
|
611
|
-
"captures": {
|
|
612
|
-
"1": {
|
|
613
|
-
"name": "keyword.language.void.gdscript"
|
|
614
|
-
},
|
|
615
|
-
"2": {
|
|
616
|
-
"name": "entity.name.type.class.gdscript"
|
|
617
|
-
}
|
|
618
|
-
},
|
|
619
|
-
"match": "\\s*(?:\\-\\>)\\s*(void\\w*)|([a-zA-Z_]\\w*)\\s*\\:"
|
|
620
|
-
},
|
|
621
589
|
{
|
|
622
590
|
"include": "#base_expression"
|
|
623
591
|
},
|
|
@@ -662,7 +630,7 @@
|
|
|
662
630
|
}
|
|
663
631
|
]
|
|
664
632
|
},
|
|
665
|
-
"
|
|
633
|
+
"logic_operator": {
|
|
666
634
|
"match": "\\b(and|or|not|!)\\b",
|
|
667
635
|
"name": "keyword.operator.wordlike.gdscript"
|
|
668
636
|
},
|
|
@@ -705,7 +673,7 @@
|
|
|
705
673
|
{
|
|
706
674
|
"begin": "(\"|')",
|
|
707
675
|
"end": "\\1",
|
|
708
|
-
"name": "meta.literal.nodepath.gdscript constant.character.escape",
|
|
676
|
+
"name": "string.quoted.gdscript meta.literal.nodepath.gdscript constant.character.escape",
|
|
709
677
|
"patterns": [
|
|
710
678
|
{
|
|
711
679
|
"match": "%",
|
|
@@ -728,7 +696,7 @@
|
|
|
728
696
|
{
|
|
729
697
|
"begin": "(\"|')",
|
|
730
698
|
"end": "\\1",
|
|
731
|
-
"name": "constant.character.escape.gdscript",
|
|
699
|
+
"name": "string.quoted.gdscript constant.character.escape.gdscript",
|
|
732
700
|
"patterns": [
|
|
733
701
|
{
|
|
734
702
|
"match": "%",
|
|
@@ -749,19 +717,19 @@
|
|
|
749
717
|
"name": "constant.numeric.integer.hexadecimal.gdscript"
|
|
750
718
|
},
|
|
751
719
|
{
|
|
752
|
-
"match": "[-]?([0-9_]+\\.[0-9_]*(e[\\-\\+]?[0-9_]+)?)",
|
|
720
|
+
"match": "[-]?([0-9][0-9_]+\\.[0-9_]*(e[\\-\\+]?[0-9_]+)?)",
|
|
753
721
|
"name": "constant.numeric.float.gdscript"
|
|
754
722
|
},
|
|
755
723
|
{
|
|
756
|
-
"match": "[-]?(\\.[0-9_]
|
|
724
|
+
"match": "[-]?(\\.[0-9][0-9_]*(e[\\-\\+]?[0-9_]+)?)",
|
|
757
725
|
"name": "constant.numeric.float.gdscript"
|
|
758
726
|
},
|
|
759
727
|
{
|
|
760
|
-
"match": "[-]?([0-9_]
|
|
728
|
+
"match": "[-]?([0-9][0-9_]*e[\\-\\+]?\\[0-9_])",
|
|
761
729
|
"name": "constant.numeric.float.gdscript"
|
|
762
730
|
},
|
|
763
731
|
{
|
|
764
|
-
"match": "[-]?[0-9_]
|
|
732
|
+
"match": "[-]?[0-9][0-9_]*",
|
|
765
733
|
"name": "constant.numeric.integer.gdscript"
|
|
766
734
|
}
|
|
767
735
|
]
|
|
@@ -851,16 +819,6 @@
|
|
|
851
819
|
},
|
|
852
820
|
{
|
|
853
821
|
"include": "#line_continuation"
|
|
854
|
-
},
|
|
855
|
-
{
|
|
856
|
-
"captures": {
|
|
857
|
-
"1": {
|
|
858
|
-
},
|
|
859
|
-
"2": {
|
|
860
|
-
"name": "entity.name.type.class.gdscript"
|
|
861
|
-
}
|
|
862
|
-
},
|
|
863
|
-
"match": "\\s*(\\-\\>)\\s*([a-zA-Z_]\\w*)\\s*\\:"
|
|
864
822
|
}
|
|
865
823
|
]
|
|
866
824
|
},
|
|
@@ -873,7 +831,35 @@
|
|
|
873
831
|
"name": "entity.name.function.gdscript"
|
|
874
832
|
}
|
|
875
833
|
},
|
|
876
|
-
"match": "(?x) \\s*\n (signal) \\s+\n ([a-zA-Z_]\\w*)(?=[\\n\\s])"
|
|
834
|
+
"match": "(?x) \\s*\n (signal) \\s+\n ([a-zA-Z_]\\w*)(?=[\\n\\s])",
|
|
835
|
+
"name": "meta.signal.gdscript"
|
|
836
|
+
},
|
|
837
|
+
"statement": {
|
|
838
|
+
"patterns": [
|
|
839
|
+
{
|
|
840
|
+
"include": "#extends_statement"
|
|
841
|
+
}
|
|
842
|
+
]
|
|
843
|
+
},
|
|
844
|
+
"statement_keyword": {
|
|
845
|
+
"patterns": [
|
|
846
|
+
{
|
|
847
|
+
"match": "(?x)\n \\b(?<!\\.)(\n continue | assert | break | elif | else | if | pass | return | while )\\b\n",
|
|
848
|
+
"name": "keyword.control.flow.gdscript"
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
"match": "\\b(?<!\\.)(class)\\b",
|
|
852
|
+
"name": "storage.type.class.gdscript"
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
"captures": {
|
|
856
|
+
"1": {
|
|
857
|
+
"name": "keyword.control.flow.gdscript"
|
|
858
|
+
}
|
|
859
|
+
},
|
|
860
|
+
"match": "(?x)\n ^\\s*(\n case | match\n )(?=\\s*([-+\\w\\d(\\[{'\":#]|$))\\b\n"
|
|
861
|
+
}
|
|
862
|
+
]
|
|
877
863
|
},
|
|
878
864
|
"string_formatting": {
|
|
879
865
|
"captures": {
|
|
@@ -881,7 +867,7 @@
|
|
|
881
867
|
"name": "constant.character.format.placeholder.other.gdscript"
|
|
882
868
|
}
|
|
883
869
|
},
|
|
884
|
-
"match": "(?x)\n (\n
|
|
870
|
+
"match": "(?x)\n (\n % (\\([\\w\\s]*\\))?\n [-+#0 ]*\n (\\d+|\\*)? (\\.(\\d+|\\*))?\n ([hlL])?\n [diouxXeEfFgGcrsab%]\n )\n",
|
|
885
871
|
"name": "meta.format.percent.gdscript"
|
|
886
872
|
},
|
|
887
873
|
"strings": {
|
|
@@ -903,8 +889,8 @@
|
|
|
903
889
|
}
|
|
904
890
|
]
|
|
905
891
|
},
|
|
906
|
-
"
|
|
907
|
-
"begin": "\\b(?:(var)|(const))\\s+([
|
|
892
|
+
"variable_declaration": {
|
|
893
|
+
"begin": "\\b(?:(var)|(const))\\s+(?:(\\b[A-Z_][A-Z_0-9]*\\b)|([A-Za-z_]\\w*))\\s*",
|
|
908
894
|
"beginCaptures": {
|
|
909
895
|
"1": {
|
|
910
896
|
"name": "keyword.language.gdscript storage.type.var.gdscript"
|
|
@@ -913,11 +899,19 @@
|
|
|
913
899
|
"name": "keyword.language.gdscript storage.type.const.gdscript"
|
|
914
900
|
},
|
|
915
901
|
"3": {
|
|
902
|
+
"name": "constant.language.gdscript"
|
|
903
|
+
},
|
|
904
|
+
"4": {
|
|
916
905
|
"name": "variable.other.gdscript"
|
|
917
906
|
}
|
|
918
907
|
},
|
|
919
908
|
"end": "$|;",
|
|
909
|
+
"name": "meta.variable.gdscript",
|
|
920
910
|
"patterns": [
|
|
911
|
+
{
|
|
912
|
+
"match": ":=|=(?!=)",
|
|
913
|
+
"name": "keyword.operator.assignment.gdscript"
|
|
914
|
+
},
|
|
921
915
|
{
|
|
922
916
|
"captures": {
|
|
923
917
|
"1": {
|
|
@@ -929,10 +923,6 @@
|
|
|
929
923
|
},
|
|
930
924
|
"match": "(:)\\s*([a-zA-Z_]\\w*)?"
|
|
931
925
|
},
|
|
932
|
-
{
|
|
933
|
-
"match": "=(?!=)",
|
|
934
|
-
"name": "keyword.operator.assignment.gdscript"
|
|
935
|
-
},
|
|
936
926
|
{
|
|
937
927
|
"captures": {
|
|
938
928
|
"1": {
|
|
@@ -948,7 +938,7 @@
|
|
|
948
938
|
"match": "(setget)\\s+([a-zA-Z_]\\w*)(?:[,]\\s*([a-zA-Z_]\\w*))?"
|
|
949
939
|
},
|
|
950
940
|
{
|
|
951
|
-
"include": "#
|
|
941
|
+
"include": "#expression"
|
|
952
942
|
},
|
|
953
943
|
{
|
|
954
944
|
"include": "#letter"
|
package/index.js
CHANGED
|
@@ -611,14 +611,14 @@ export const grammars = [
|
|
|
611
611
|
source: 'https://github.com/godotengine/godot-vscode-plugin/blob/e7e2d0439dea0fb3a568378554c81e0a17348a84/syntaxes/GDResource.tmLanguage.json',
|
|
612
612
|
},
|
|
613
613
|
{
|
|
614
|
-
byteSize:
|
|
614
|
+
byteSize: 15818,
|
|
615
615
|
displayName: 'GDScript',
|
|
616
616
|
license: 'MIT',
|
|
617
617
|
licenseUrl: 'https://raw.githubusercontent.com/godotengine/godot-vscode-plugin/master/LICENSE',
|
|
618
618
|
name: 'gdscript',
|
|
619
619
|
scopeName: 'source.gdscript',
|
|
620
|
-
sha: '
|
|
621
|
-
source: 'https://github.com/godotengine/godot-vscode-plugin/blob/
|
|
620
|
+
sha: '0a794ebc1b09b334c5f77816bc708d1cc330bf8f',
|
|
621
|
+
source: 'https://github.com/godotengine/godot-vscode-plugin/blob/0a794ebc1b09b334c5f77816bc708d1cc330bf8f/syntaxes/GDScript.tmLanguage.json',
|
|
622
622
|
},
|
|
623
623
|
{
|
|
624
624
|
byteSize: 6096,
|
package/package.json
CHANGED