1(identifier) @variable
2
3(type_identifier) @type
4(field_identifier) @property
5(package_identifier) @namespace
6
7(label_name) @label
8
9(keyed_element
10 .
11 (literal_element
12 (identifier) @property))
13
14(call_expression
15 function: (identifier) @function)
16
17(call_expression
18 function: (selector_expression
19 field: (field_identifier) @function.method))
20
21(function_declaration
22 name: (identifier) @function)
23
24(method_declaration
25 name: (field_identifier) @function.method)
26(method_elem
27 name: (field_identifier) @function.method)
28
29[
30 ";"
31 "."
32 ","
33 ":"
34] @punctuation.delimiter
35
36[
37 "("
38 ")"
39 "{"
40 "}"
41 "["
42 "]"
43] @punctuation.bracket
44
45[
46 "--"
47 "-"
48 "-="
49 ":="
50 "!"
51 "!="
52 "..."
53 "*"
54 "*"
55 "*="
56 "/"
57 "/="
58 "&"
59 "&&"
60 "&="
61 "%"
62 "%="
63 "^"
64 "^="
65 "+"
66 "++"
67 "+="
68 "<-"
69 "<"
70 "<<"
71 "<<="
72 "<="
73 "="
74 "=="
75 ">"
76 ">="
77 ">>"
78 ">>="
79 "|"
80 "|="
81 "||"
82 "~"
83] @operator
84
85[
86 "break"
87 "case"
88 "chan"
89 "const"
90 "continue"
91 "default"
92 "defer"
93 "else"
94 "fallthrough"
95 "for"
96 "func"
97 "go"
98 "goto"
99 "if"
100 "import"
101 "interface"
102 "map"
103 "package"
104 "range"
105 "return"
106 "select"
107 "struct"
108 "switch"
109 "type"
110 "var"
111] @keyword
112
113[
114 (interpreted_string_literal)
115 (raw_string_literal)
116 (rune_literal)
117] @string
118
119(escape_sequence) @string.escape
120
121[
122 (int_literal)
123 (float_literal)
124 (imaginary_literal)
125] @number
126
127(const_spec
128 name: (identifier) @constant)
129
130[
131 (true)
132 (false)
133] @boolean
134
135[
136 (nil)
137 (iota)
138] @constant.builtin
139
140(comment) @comment