|
|
@ -1,23 +1,41 @@
|
|
|
|
(const_literal) @constant.numeric
|
|
|
|
(int_literal) @constant.numeric.integer
|
|
|
|
|
|
|
|
(float_literal) @constant.numeric.float
|
|
|
|
|
|
|
|
(bool_literal) @constant.builtin.boolean
|
|
|
|
|
|
|
|
|
|
|
|
(type_declaration) @type
|
|
|
|
(global_constant_declaration) @variable
|
|
|
|
|
|
|
|
(global_variable_declaration) @variable
|
|
|
|
|
|
|
|
(compound_statement) @variable
|
|
|
|
|
|
|
|
(const_expression) @function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(variable_identifier_declaration
|
|
|
|
|
|
|
|
(identifier) @variable
|
|
|
|
|
|
|
|
(type_declaration) @type)
|
|
|
|
|
|
|
|
|
|
|
|
(function_declaration
|
|
|
|
(function_declaration
|
|
|
|
(identifier) @function)
|
|
|
|
(identifier) @function
|
|
|
|
|
|
|
|
(function_return_type_declaration
|
|
|
|
|
|
|
|
(type_declaration) @type))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(parameter
|
|
|
|
|
|
|
|
(variable_identifier_declaration
|
|
|
|
|
|
|
|
(identifier) @variable.parameter
|
|
|
|
|
|
|
|
(type_declaration) @type))
|
|
|
|
|
|
|
|
|
|
|
|
(struct_declaration
|
|
|
|
(struct_declaration
|
|
|
|
(identifier) @type)
|
|
|
|
(identifier) @type)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(struct_declaration
|
|
|
|
|
|
|
|
(struct_member
|
|
|
|
|
|
|
|
(variable_identifier_declaration
|
|
|
|
|
|
|
|
(identifier) @variable.other.member
|
|
|
|
|
|
|
|
(type_declaration) @type)))
|
|
|
|
|
|
|
|
|
|
|
|
(type_constructor_or_function_call_expression
|
|
|
|
(type_constructor_or_function_call_expression
|
|
|
|
(type_declaration) @function)
|
|
|
|
(type_declaration) @function)
|
|
|
|
|
|
|
|
|
|
|
|
(parameter
|
|
|
|
|
|
|
|
(variable_identifier_declaration (identifier) @variable.parameter))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
[
|
|
|
|
"struct"
|
|
|
|
"struct"
|
|
|
|
"bitcast"
|
|
|
|
"bitcast"
|
|
|
|
; "block"
|
|
|
|
|
|
|
|
"discard"
|
|
|
|
"discard"
|
|
|
|
"enable"
|
|
|
|
"enable"
|
|
|
|
"fallthrough"
|
|
|
|
"fallthrough"
|
|
|
@ -26,36 +44,28 @@
|
|
|
|
"private"
|
|
|
|
"private"
|
|
|
|
"read"
|
|
|
|
"read"
|
|
|
|
"read_write"
|
|
|
|
"read_write"
|
|
|
|
"return"
|
|
|
|
|
|
|
|
"storage"
|
|
|
|
"storage"
|
|
|
|
"type"
|
|
|
|
"type"
|
|
|
|
"uniform"
|
|
|
|
"uniform"
|
|
|
|
"var"
|
|
|
|
"var"
|
|
|
|
"workgroup"
|
|
|
|
"workgroup"
|
|
|
|
"write"
|
|
|
|
"write"
|
|
|
|
|
|
|
|
"override"
|
|
|
|
(texel_format)
|
|
|
|
(texel_format)
|
|
|
|
] @keyword ; TODO reserved keywords
|
|
|
|
] @keyword
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
"fn" @keyword.function
|
|
|
|
(true)
|
|
|
|
|
|
|
|
(false)
|
|
|
|
"return" @keyword.control.return
|
|
|
|
] @constant.builtin.boolean
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
["," "." ":" ";"] @punctuation.delimiter
|
|
|
|
["," "." ":" ";"] @punctuation.delimiter
|
|
|
|
|
|
|
|
|
|
|
|
;; brackets
|
|
|
|
["(" ")" "[" "]" "{" "}"] @punctuation.bracket
|
|
|
|
[
|
|
|
|
|
|
|
|
"("
|
|
|
|
|
|
|
|
")"
|
|
|
|
|
|
|
|
"["
|
|
|
|
|
|
|
|
"]"
|
|
|
|
|
|
|
|
"{"
|
|
|
|
|
|
|
|
"}"
|
|
|
|
|
|
|
|
] @punctuation.bracket
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
[
|
|
|
|
"loop"
|
|
|
|
"loop"
|
|
|
|
"for"
|
|
|
|
"for"
|
|
|
|
|
|
|
|
"while"
|
|
|
|
"break"
|
|
|
|
"break"
|
|
|
|
"continue"
|
|
|
|
"continue"
|
|
|
|
"continuing"
|
|
|
|
"continuing"
|
|
|
@ -64,7 +74,6 @@
|
|
|
|
[
|
|
|
|
[
|
|
|
|
"if"
|
|
|
|
"if"
|
|
|
|
"else"
|
|
|
|
"else"
|
|
|
|
"elseif"
|
|
|
|
|
|
|
|
"switch"
|
|
|
|
"switch"
|
|
|
|
"case"
|
|
|
|
"case"
|
|
|
|
"default"
|
|
|
|
"default"
|
|
|
@ -92,10 +101,13 @@
|
|
|
|
"*"
|
|
|
|
"*"
|
|
|
|
"~"
|
|
|
|
"~"
|
|
|
|
"^"
|
|
|
|
"^"
|
|
|
|
|
|
|
|
"@"
|
|
|
|
|
|
|
|
"++"
|
|
|
|
|
|
|
|
"--"
|
|
|
|
] @operator
|
|
|
|
] @operator
|
|
|
|
|
|
|
|
|
|
|
|
(attribute
|
|
|
|
(attribute
|
|
|
|
(identifier) @variable.other.member)
|
|
|
|
(identifier) @attribute)
|
|
|
|
|
|
|
|
|
|
|
|
(comment) @comment
|
|
|
|
(comment) @comment
|
|
|
|
|
|
|
|
|
|
|
|