|
|
@ -19,6 +19,9 @@
|
|
|
|
(method_declaration
|
|
|
|
(method_declaration
|
|
|
|
name: (field_identifier) @function.method)
|
|
|
|
name: (field_identifier) @function.method)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(method_spec
|
|
|
|
|
|
|
|
name: (field_identifier) @function.method)
|
|
|
|
|
|
|
|
|
|
|
|
; Identifiers
|
|
|
|
; Identifiers
|
|
|
|
|
|
|
|
|
|
|
|
((identifier) @constant (match? @constant "^[A-Z][A-Z\\d_]+$"))
|
|
|
|
((identifier) @constant (match? @constant "^[A-Z][A-Z\\d_]+$"))
|
|
|
@ -32,10 +35,19 @@
|
|
|
|
(match? @type.builtin "^(any|bool|byte|comparable|complex128|complex64|error|float32|float64|int|int16|int32|int64|int8|rune|string|uint|uint16|uint32|uint64|uint8|uintptr)$"))
|
|
|
|
(match? @type.builtin "^(any|bool|byte|comparable|complex128|complex64|error|float32|float64|int|int16|int32|int64|int8|rune|string|uint|uint16|uint32|uint64|uint8|uintptr)$"))
|
|
|
|
|
|
|
|
|
|
|
|
(type_identifier) @type
|
|
|
|
(type_identifier) @type
|
|
|
|
|
|
|
|
(type_spec
|
|
|
|
|
|
|
|
name: (type_identifier) @constructor)
|
|
|
|
(field_identifier) @variable.other.member
|
|
|
|
(field_identifier) @variable.other.member
|
|
|
|
(identifier) @variable
|
|
|
|
(identifier) @variable
|
|
|
|
(package_identifier) @variable
|
|
|
|
(package_identifier) @namespace
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(parameter_declaration (identifier) @variable.parameter)
|
|
|
|
|
|
|
|
(variadic_parameter_declaration (identifier) @variable.parameter)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(label_name) @label
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(const_spec
|
|
|
|
|
|
|
|
name: (identifier) @constant)
|
|
|
|
|
|
|
|
|
|
|
|
; Operators
|
|
|
|
; Operators
|
|
|
|
|
|
|
|
|
|
|
@ -82,36 +94,57 @@
|
|
|
|
; Keywords
|
|
|
|
; Keywords
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
[
|
|
|
|
"break"
|
|
|
|
|
|
|
|
"case"
|
|
|
|
|
|
|
|
"chan"
|
|
|
|
|
|
|
|
"const"
|
|
|
|
|
|
|
|
"continue"
|
|
|
|
|
|
|
|
"default"
|
|
|
|
"default"
|
|
|
|
"defer"
|
|
|
|
"type"
|
|
|
|
|
|
|
|
] @keyword
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
"if"
|
|
|
|
"else"
|
|
|
|
"else"
|
|
|
|
"fallthrough"
|
|
|
|
"switch"
|
|
|
|
|
|
|
|
"select"
|
|
|
|
|
|
|
|
"case"
|
|
|
|
|
|
|
|
] @keyword.control.conditional
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
"for"
|
|
|
|
"for"
|
|
|
|
"func"
|
|
|
|
|
|
|
|
"go"
|
|
|
|
|
|
|
|
"goto"
|
|
|
|
|
|
|
|
"if"
|
|
|
|
|
|
|
|
"interface"
|
|
|
|
|
|
|
|
"map"
|
|
|
|
|
|
|
|
"range"
|
|
|
|
"range"
|
|
|
|
"return"
|
|
|
|
] @keyword.control.repeat
|
|
|
|
"select"
|
|
|
|
|
|
|
|
"struct"
|
|
|
|
|
|
|
|
"switch"
|
|
|
|
|
|
|
|
"type"
|
|
|
|
|
|
|
|
"var"
|
|
|
|
|
|
|
|
] @keyword
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
[
|
|
|
|
"import"
|
|
|
|
"import"
|
|
|
|
"package"
|
|
|
|
"package"
|
|
|
|
] @keyword.control.import
|
|
|
|
] @keyword.control.import
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
"return"
|
|
|
|
|
|
|
|
"continue"
|
|
|
|
|
|
|
|
"break"
|
|
|
|
|
|
|
|
"fallthrough"
|
|
|
|
|
|
|
|
] @keyword.control.return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
"func"
|
|
|
|
|
|
|
|
] @keyword.function
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
"var"
|
|
|
|
|
|
|
|
"chan"
|
|
|
|
|
|
|
|
"interface"
|
|
|
|
|
|
|
|
"map"
|
|
|
|
|
|
|
|
"struct"
|
|
|
|
|
|
|
|
] @keyword.storage.type
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
"const"
|
|
|
|
|
|
|
|
] @keyword.storage.modifier
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
"defer"
|
|
|
|
|
|
|
|
"goto"
|
|
|
|
|
|
|
|
"go"
|
|
|
|
|
|
|
|
] @function.macro
|
|
|
|
|
|
|
|
|
|
|
|
; Delimiters
|
|
|
|
; Delimiters
|
|
|
|
|
|
|
|
|
|
|
|
[
|
|
|
|
[
|
|
|
|