|
@@ -35,8 +35,8 @@
|
|
|
},
|
|
|
"expression": {
|
|
|
"patterns": [
|
|
|
- { "include": "#base_expression" },
|
|
|
{ "include": "#getter_setter_godot4" },
|
|
|
+ { "include": "#base_expression" },
|
|
|
{ "include": "#assignment_operator" },
|
|
|
{ "include": "#annotations" },
|
|
|
{ "include": "#class_name" },
|
|
@@ -170,7 +170,7 @@
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
- { "include": "#base_expression" }
|
|
|
+ { "include": "#expression" }
|
|
|
]
|
|
|
},
|
|
|
"self": {
|
|
@@ -229,7 +229,7 @@
|
|
|
"name": "keyword.operator.comparison.gdscript"
|
|
|
},
|
|
|
"arithmetic_operator": {
|
|
|
- "match": "->|\\+=|-=|\\*=|\\^=|/=|%=|&=|~=|\\|=|\\*\\*|\\*|/|%|\\+|-",
|
|
|
+ "match": "->|\\+=|-=|\\*\\*=|\\*=|\\^=|/=|%=|&=|~=|\\|=|\\*\\*|\\*|/|%|\\+|-",
|
|
|
"name": "keyword.operator.arithmetic.gdscript"
|
|
|
},
|
|
|
"assignment_operator": {
|
|
@@ -245,7 +245,7 @@
|
|
|
"captures": { "1": { "name": "keyword.control.gdscript" } }
|
|
|
},
|
|
|
"keywords": {
|
|
|
- "match": "\\b(?:class|class_name|abstract|is|onready|tool|static|export|as|void|enum|assert|breakpoint|sync|remote|master|puppet|slave|remotesync|mastersync|puppetsync|trait|namespace)\\b",
|
|
|
+ "match": "\\b(?:class|class_name|abstract|is|onready|tool|static|export|as|void|enum|assert|breakpoint|sync|remote|master|puppet|slave|remotesync|mastersync|puppetsync|trait|namespace|super)\\b",
|
|
|
"name": "keyword.language.gdscript"
|
|
|
},
|
|
|
"letter": {
|
|
@@ -293,7 +293,7 @@
|
|
|
"match": "(:)?\\s*(set|get)\\s+=\\s+([a-zA-Z_]\\w*)",
|
|
|
"captures": {
|
|
|
"1": { "name": "punctuation.separator.annotation.gdscript" },
|
|
|
- "2": { "name": "keyword.language.gdscript storage.type.const.gdscript" },
|
|
|
+ "2": { "name": "entity.name.function.gdscript" },
|
|
|
"3": { "name": "entity.name.function.gdscript" }
|
|
|
}
|
|
|
},
|
|
@@ -311,7 +311,7 @@
|
|
|
{
|
|
|
"match": "(setget)\\s+([a-zA-Z_]\\w*)(?:[,]\\s*([a-zA-Z_]\\w*))?",
|
|
|
"captures": {
|
|
|
- "1": { "name": "keyword.language.gdscript storage.type.const.gdscript" },
|
|
|
+ "1": { "name": "keyword.language.gdscript" },
|
|
|
"2": { "name": "entity.name.function.gdscript" },
|
|
|
"3": { "name": "entity.name.function.gdscript" }
|
|
|
}
|
|
@@ -326,18 +326,23 @@
|
|
|
"getter_setter_godot4": {
|
|
|
"patterns": [
|
|
|
{
|
|
|
- "match": "\\b(get):",
|
|
|
- "captures": { "1": { "name": "entity.name.function.gdscript" } }
|
|
|
+ "name": "meta.variable.declaration.getter.gdscript",
|
|
|
+ "match": "(get)\\s*(:)",
|
|
|
+ "captures": {
|
|
|
+ "1": { "name": "entity.name.function.gdscript" },
|
|
|
+ "2": { "name": "punctuation.separator.annotation.gdscript" }
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
- "name": "meta.function.gdscript",
|
|
|
- "begin": "(?x) \\s+\n (set) \\s*\n (?=\\()",
|
|
|
- "end": "(:|(?=[#'\"\\n]))",
|
|
|
- "beginCaptures": { "1": { "name": "entity.name.function.gdscript" } },
|
|
|
- "patterns": [
|
|
|
- { "include": "#parameters" },
|
|
|
- { "include": "#line_continuation" }
|
|
|
- ]
|
|
|
+ "name": "meta.variable.declaration.setter.gdscript",
|
|
|
+ "match": "(set)\\s*(\\()\\s*([A-Za-z_]\\w*)\\s*(\\))\\s*(:)",
|
|
|
+ "captures": {
|
|
|
+ "1": { "name": "entity.name.function.gdscript" },
|
|
|
+ "2": { "name": "punctuation.definition.arguments.begin.gdscript" },
|
|
|
+ "3": { "name": "variable.other.gdscript" },
|
|
|
+ "4": { "name": "punctuation.definition.arguments.end.gdscript" },
|
|
|
+ "5": { "name": "punctuation.separator.annotation.gdscript" }
|
|
|
+ }
|
|
|
}
|
|
|
]
|
|
|
},
|
|
@@ -437,7 +442,7 @@
|
|
|
}
|
|
|
},
|
|
|
"builtin_classes": {
|
|
|
- "match": "(?<![^.]\\.|:)\\b(Vector2|Vector2i|Vector3|Vector3i|Vector4|Vector4i|Color|Rect2|Rect2i|Array|Basis|Dictionary|Plane|Quat|RID|Rect3|Transform|Transform2D|Transform3D|AABB|String|Color|NodePath|PoolByteArray|PoolIntArray|PoolRealArray|PoolStringArray|PoolVector2Array|PoolVector3Array|PoolColorArray|bool|int|float|Signal|Callable|StringName|Quaternion|Projection|PackedByteArray|PackedInt32Array|PackedInt64Array|PackedFloat32Array|PackedFloat64Array|PackedStringArray|PackedVector2Array|PackedVector2iArray|PackedVector3Array|PackedVector3iArray|PackedVector4Array|PackedColorArray|super)\\b",
|
|
|
+ "match": "(?<![^.]\\.|:)\\b(Vector2|Vector2i|Vector3|Vector3i|Vector4|Vector4i|Color|Rect2|Rect2i|Array|Basis|Dictionary|Plane|Quat|RID|Rect3|Transform|Transform2D|Transform3D|AABB|String|Color|NodePath|PoolByteArray|PoolIntArray|PoolRealArray|PoolStringArray|PoolVector2Array|PoolVector3Array|PoolColorArray|bool|int|float|Signal|Callable|StringName|Quaternion|Projection|PackedByteArray|PackedInt32Array|PackedInt64Array|PackedFloat32Array|PackedFloat64Array|PackedStringArray|PackedVector2Array|PackedVector2iArray|PackedVector3Array|PackedVector3iArray|PackedVector4Array|PackedColorArray|JSON|UPNP|OS|IP|JSONRPC|XRVRS)\\b",
|
|
|
"name": "entity.name.type.class.builtin.gdscript"
|
|
|
},
|
|
|
"const_vars": {
|
|
@@ -530,7 +535,7 @@
|
|
|
"end": "(,)|(?=\\))",
|
|
|
"beginCaptures": { "1": { "name": "keyword.operator.gdscript" } },
|
|
|
"endCaptures": { "1": { "name": "punctuation.separator.parameters.gdscript" } },
|
|
|
- "patterns": [ { "include": "#base_expression" } ]
|
|
|
+ "patterns": [ { "include": "#expression" } ]
|
|
|
},
|
|
|
"annotated_parameter": {
|
|
|
"begin": "(?x)\n \\s* ([a-zA-Z_]\\w*) \\s* (:)\\s* ([a-zA-Z_]\\w*)? \n",
|
|
@@ -542,7 +547,7 @@
|
|
|
"end": "(,)|(?=\\))",
|
|
|
"endCaptures": { "1": { "name": "punctuation.separator.parameters.gdscript" } },
|
|
|
"patterns": [
|
|
|
- { "include": "#base_expression" },
|
|
|
+ { "include": "#expression" },
|
|
|
{
|
|
|
"name": "keyword.operator.assignment.gdscript",
|
|
|
"match": "=(?!=)"
|