|
|
@ -17,9 +17,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
; Identifiers
|
|
|
|
; Identifiers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
((identifier) @constant (match? @constant "^[A-Z][A-Z\\d_]+$"))
|
|
|
|
|
|
|
|
(const_spec
|
|
|
|
|
|
|
|
name: (identifier) @constant)
|
|
|
|
|
|
|
|
|
|
|
|
(type_identifier) @type
|
|
|
|
(type_identifier) @type
|
|
|
|
(field_identifier) @property
|
|
|
|
(field_identifier) @property
|
|
|
|
(identifier) @variable
|
|
|
|
(identifier) @variable
|
|
|
|
|
|
|
|
(package_identifier) @variable
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(parameter_declaration (identifier) @variable.parameter)
|
|
|
|
|
|
|
|
(variadic_parameter_declaration (identifier) @variable.parameter)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Operators
|
|
|
|
; Operators
|
|
|
|
|
|
|
|
|
|
|
@ -79,10 +88,8 @@
|
|
|
|
"go"
|
|
|
|
"go"
|
|
|
|
"goto"
|
|
|
|
"goto"
|
|
|
|
"if"
|
|
|
|
"if"
|
|
|
|
"import"
|
|
|
|
|
|
|
|
"interface"
|
|
|
|
"interface"
|
|
|
|
"map"
|
|
|
|
"map"
|
|
|
|
"package"
|
|
|
|
|
|
|
|
"range"
|
|
|
|
"range"
|
|
|
|
"return"
|
|
|
|
"return"
|
|
|
|
"select"
|
|
|
|
"select"
|
|
|
@ -92,6 +99,29 @@
|
|
|
|
"var"
|
|
|
|
"var"
|
|
|
|
] @keyword
|
|
|
|
] @keyword
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
"import"
|
|
|
|
|
|
|
|
"package"
|
|
|
|
|
|
|
|
] @keyword.control.import
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; Delimiters
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
":"
|
|
|
|
|
|
|
|
"."
|
|
|
|
|
|
|
|
","
|
|
|
|
|
|
|
|
";"
|
|
|
|
|
|
|
|
] @punctuation.delimiter
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
"("
|
|
|
|
|
|
|
|
")"
|
|
|
|
|
|
|
|
"["
|
|
|
|
|
|
|
|
"]"
|
|
|
|
|
|
|
|
"{"
|
|
|
|
|
|
|
|
"}"
|
|
|
|
|
|
|
|
] @punctuation.bracket
|
|
|
|
|
|
|
|
|
|
|
|
; Literals
|
|
|
|
; Literals
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
[
|
|
|
@ -111,7 +141,8 @@
|
|
|
|
[
|
|
|
|
[
|
|
|
|
(true)
|
|
|
|
(true)
|
|
|
|
(false)
|
|
|
|
(false)
|
|
|
|
(nil)
|
|
|
|
] @constant.builtin.boolean
|
|
|
|
] @constant.builtin
|
|
|
|
|
|
|
|
|
|
|
|
(nil) @constant.builtin
|
|
|
|
|
|
|
|
|
|
|
|
(comment) @comment
|
|
|
|
(comment) @comment
|
|
|
|