| 1 |
|
| 2 |
|
| 3 |
( |
| 4 |
(identifier) @constant |
| 5 |
(#match? @constant "^[A-Z][A-Z\\d_]+$")) |
| 6 |
|
| 7 |
|
| 8 |
(class_name_statement (name) @type) |
| 9 |
(class_definition (name) @type) |
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
(attribute_call (identifier) @function) |
| 15 |
(base_call (identifier) @function) |
| 16 |
(call (identifier) @function) |
| 17 |
(lambda (name) @function) |
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
(function_definition |
| 22 |
name: (name) @function |
| 23 |
parameters: (parameters) @variable.parameter ) |
| 24 |
(constructor_definition "_init" @function) |
| 25 |
(lambda (parameters) @variable.parameter) |
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
(comment) @comment |
| 30 |
(string) @string |
| 31 |
|
| 32 |
(type) @type |
| 33 |
(expression_statement (array (identifier) @type)) |
| 34 |
(binary_operator (identifier) @type) |
| 35 |
(enum_definition (name) @type.enum) |
| 36 |
(enumerator (identifier) @type.enum.variant) |
| 37 |
(underscore) @type.builtin |
| 38 |
|
| 39 |
|
| 40 |
(variable_statement (identifier) @variable) |
| 41 |
(attribute |
| 42 |
(identifier) |
| 43 |
(identifier) @variable.other.member) |
| 44 |
(attribute |
| 45 |
(identifier) @type.builtin |
| 46 |
(#match? @type.builtin "^(AABB|Array|Basis|bool|Callable|Color|Dictionary|float|int|NodePath|Object|Packed(Byte|Color|String)Array|PackedFloat(32|64)Array|PackedInt(32|64)Array|PackedVector(2|3)Array|Plane|Projection|Quaternion|Rect2([i]{0,1})|RID|Signal|String|StringName|Transform(2|3)D|Variant|Vector(2|3|4)([i]{0,1}))$")) |
| 47 |
|
| 48 |
[ |
| 49 |
(string_name) |
| 50 |
(node_path) |
| 51 |
(get_node) |
| 52 |
] @label |
| 53 |
(signal_statement (name) @label) |
| 54 |
|
| 55 |
(const_statement (name) @constant) |
| 56 |
(integer) @constant.numeric.integer |
| 57 |
(float) @constant.numeric.float |
| 58 |
(escape_sequence) @constant.character.escape |
| 59 |
[ |
| 60 |
(true) |
| 61 |
(false) |
| 62 |
] @constant.builtin.boolean |
| 63 |
(null) @constant.builtin |
| 64 |
|
| 65 |
[ |
| 66 |
"+" |
| 67 |
"-" |
| 68 |
"*" |
| 69 |
"/" |
| 70 |
"%" |
| 71 |
"==" |
| 72 |
"!=" |
| 73 |
">" |
| 74 |
"<" |
| 75 |
">=" |
| 76 |
"<=" |
| 77 |
"=" |
| 78 |
"+=" |
| 79 |
"-=" |
| 80 |
"*=" |
| 81 |
"/=" |
| 82 |
"%=" |
| 83 |
"&" |
| 84 |
"|" |
| 85 |
"^" |
| 86 |
"~" |
| 87 |
"<<" |
| 88 |
">>" |
| 89 |
":=" |
| 90 |
":" |
| 91 |
] @operator |
| 92 |
|
| 93 |
(annotation (identifier) @keyword.storage.modifier) |
| 94 |
|
| 95 |
[ |
| 96 |
"if" |
| 97 |
"else" |
| 98 |
"elif" |
| 99 |
"match" |
| 100 |
"when" |
| 101 |
] @keyword.control.conditional |
| 102 |
|
| 103 |
[ |
| 104 |
"while" |
| 105 |
"for" |
| 106 |
] @keyword.control.repeat |
| 107 |
|
| 108 |
[ |
| 109 |
"return" |
| 110 |
"pass" |
| 111 |
"break" |
| 112 |
"continue" |
| 113 |
] @keyword.control.return |
| 114 |
|
| 115 |
[ |
| 116 |
"func" |
| 117 |
] @keyword.function |
| 118 |
|
| 119 |
[ |
| 120 |
"export" |
| 121 |
] @keyword.control.import |
| 122 |
|
| 123 |
[ |
| 124 |
"in" |
| 125 |
"is" |
| 126 |
"as" |
| 127 |
"and" |
| 128 |
"or" |
| 129 |
"not" |
| 130 |
] @keyword.operator |
| 131 |
|
| 132 |
[ |
| 133 |
"var" |
| 134 |
"class" |
| 135 |
"class_name" |
| 136 |
"enum" |
| 137 |
] @keyword.storage.type |
| 138 |
|
| 139 |
|
| 140 |
[ |
| 141 |
(remote_keyword) |
| 142 |
(static_keyword) |
| 143 |
"const" |
| 144 |
"signal" |
| 145 |
"@" |
| 146 |
] @keyword.storage.modifier |
| 147 |
|
| 148 |
[ |
| 149 |
"setget" |
| 150 |
"onready" |
| 151 |
"extends" |
| 152 |
"set" |
| 153 |
"get" |
| 154 |
"await" |
| 155 |
] @keyword |
| 156 |
|