|
|
@ -1,7 +1,8 @@
|
|
|
|
; Identifier naming conventions
|
|
|
|
; Identifier naming conventions
|
|
|
|
|
|
|
|
|
|
|
|
((identifier) @constant
|
|
|
|
(
|
|
|
|
(#match? @constant "^[A-Z][A-Z_]*$"))
|
|
|
|
(identifier) @constant
|
|
|
|
|
|
|
|
(#match? @constant "^[A-Z][A-Z\\d_]+$"))
|
|
|
|
|
|
|
|
|
|
|
|
; class
|
|
|
|
; class
|
|
|
|
(class_name_statement (name) @type)
|
|
|
|
(class_name_statement (name) @type)
|
|
|
@ -11,32 +12,35 @@
|
|
|
|
; Function calls
|
|
|
|
; Function calls
|
|
|
|
|
|
|
|
|
|
|
|
(attribute_call (identifier) @function)
|
|
|
|
(attribute_call (identifier) @function)
|
|
|
|
|
|
|
|
|
|
|
|
(base_call (identifier) @function)
|
|
|
|
(base_call (identifier) @function)
|
|
|
|
|
|
|
|
|
|
|
|
(call (identifier) @function)
|
|
|
|
(call (identifier) @function)
|
|
|
|
|
|
|
|
|
|
|
|
; Function definitions
|
|
|
|
; Function definitions
|
|
|
|
|
|
|
|
|
|
|
|
(function_definition (name) @function)
|
|
|
|
(function_definition (name) @function)
|
|
|
|
|
|
|
|
|
|
|
|
(constructor_definition "_init" @function)
|
|
|
|
(constructor_definition "_init" @function)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; Literals
|
|
|
|
;; Literals
|
|
|
|
(integer) @constant.numeric.integer
|
|
|
|
|
|
|
|
(float) @constant.numeric.float
|
|
|
|
|
|
|
|
(comment) @comment
|
|
|
|
(comment) @comment
|
|
|
|
(string) @string
|
|
|
|
(string) @string
|
|
|
|
(escape_sequence) @constant.character.escape
|
|
|
|
|
|
|
|
(identifier) @variable
|
|
|
|
|
|
|
|
(type) @type
|
|
|
|
(type) @type
|
|
|
|
|
|
|
|
(expression_statement (array (identifier) @type))
|
|
|
|
|
|
|
|
(binary_operator (identifier) @type)
|
|
|
|
|
|
|
|
|
|
|
|
;; Literals
|
|
|
|
(variable_statement (identifier) @variable)
|
|
|
|
|
|
|
|
(get_node) @label
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(const_statement (name) @constant)
|
|
|
|
|
|
|
|
(integer) @constant.numeric.integer
|
|
|
|
|
|
|
|
(float) @constant.numeric.float
|
|
|
|
|
|
|
|
(escape_sequence) @constant.character.escape
|
|
|
|
[
|
|
|
|
[
|
|
|
|
(true)
|
|
|
|
(true)
|
|
|
|
(false)
|
|
|
|
(false)
|
|
|
|
(null)
|
|
|
|
] @constant.builtin.boolean
|
|
|
|
] @constant.builtin
|
|
|
|
(null) @constant.builtin
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
[
|
|
|
|
"+"
|
|
|
|
"+"
|
|
|
@ -62,37 +66,67 @@
|
|
|
|
"~"
|
|
|
|
"~"
|
|
|
|
"<<"
|
|
|
|
"<<"
|
|
|
|
">>"
|
|
|
|
">>"
|
|
|
|
"and"
|
|
|
|
|
|
|
|
"or"
|
|
|
|
|
|
|
|
"not"
|
|
|
|
|
|
|
|
] @operator
|
|
|
|
] @operator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(annotation (identifier) @keyword.storage.modifier)
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
[
|
|
|
|
(static_keyword)
|
|
|
|
|
|
|
|
(remote_keyword)
|
|
|
|
|
|
|
|
(tool_statement)
|
|
|
|
|
|
|
|
"var"
|
|
|
|
|
|
|
|
"func"
|
|
|
|
|
|
|
|
"setget"
|
|
|
|
|
|
|
|
"in"
|
|
|
|
|
|
|
|
"is"
|
|
|
|
|
|
|
|
"as"
|
|
|
|
|
|
|
|
"if"
|
|
|
|
"if"
|
|
|
|
"else"
|
|
|
|
"else"
|
|
|
|
"elif"
|
|
|
|
"elif"
|
|
|
|
|
|
|
|
] @keyword.control.conditional
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
"while"
|
|
|
|
"while"
|
|
|
|
"for"
|
|
|
|
"for"
|
|
|
|
|
|
|
|
] @keyword.control.repeat
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
"return"
|
|
|
|
"return"
|
|
|
|
|
|
|
|
"pass"
|
|
|
|
"break"
|
|
|
|
"break"
|
|
|
|
"continue"
|
|
|
|
"continue"
|
|
|
|
"pass"
|
|
|
|
] @keyword.control.return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
"func"
|
|
|
|
|
|
|
|
] @keyword.control.function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
"export"
|
|
|
|
|
|
|
|
] @keyword.control.import
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
"in"
|
|
|
|
|
|
|
|
"is"
|
|
|
|
|
|
|
|
"as"
|
|
|
|
"match"
|
|
|
|
"match"
|
|
|
|
|
|
|
|
"and"
|
|
|
|
|
|
|
|
"or"
|
|
|
|
|
|
|
|
"not"
|
|
|
|
|
|
|
|
] @keyword.operator
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
"var"
|
|
|
|
"class"
|
|
|
|
"class"
|
|
|
|
"class_name"
|
|
|
|
"class_name"
|
|
|
|
"enum"
|
|
|
|
"enum"
|
|
|
|
|
|
|
|
] @keyword.storage.type
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
(remote_keyword)
|
|
|
|
|
|
|
|
(static_keyword)
|
|
|
|
|
|
|
|
"const"
|
|
|
|
"signal"
|
|
|
|
"signal"
|
|
|
|
|
|
|
|
"@"
|
|
|
|
|
|
|
|
] @keyword.storage.modifier
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
"setget"
|
|
|
|
"onready"
|
|
|
|
"onready"
|
|
|
|
"export"
|
|
|
|
|
|
|
|
"extends"
|
|
|
|
"extends"
|
|
|
|
"const"
|
|
|
|
"set"
|
|
|
|
|
|
|
|
"get"
|
|
|
|
] @keyword
|
|
|
|
] @keyword
|
|
|
|
|
|
|
|
|
|
|
|