1(identifier) @variable
2(field_identifier) @property
3
4(call_expression
5 function: (qualified_identifier
6 name: (identifier) @function))
7
8(call_expression
9 function: (identifier) @function)
10
11(call_expression
12 function: (field_expression
13 field: (field_identifier) @function))
14
15(preproc_function_def
16 name: (identifier) @function.special)
17
18(template_function
19 name: (identifier) @function)
20
21(template_method
22 name: (field_identifier) @function)
23
24(function_declarator
25 declarator: (identifier) @function)
26
27(function_declarator
28 declarator: (qualified_identifier
29 name: (identifier) @function))
30
31(function_declarator
32 declarator: (field_identifier) @function)
33
34(operator_name
35 (identifier)? @operator) @function
36
37(destructor_name (identifier) @function)
38
39((namespace_identifier) @type
40 (#match? @type "^[A-Z]"))
41
42(auto) @type
43(type_identifier) @type
44
45((identifier) @constant
46 (#match? @constant "^_*[A-Z][A-Z\\d_]*$"))
47
48(statement_identifier) @label
49(this) @variable.special
50("static_assert") @function.builtin
51
52[
53 "alignas"
54 "alignof"
55 "break"
56 "case"
57 "catch"
58 "class"
59 "co_await"
60 "co_return"
61 "co_yield"
62 "concept"
63 "constexpr"
64 "continue"
65 "decltype"
66 "default"
67 "delete"
68 "do"
69 "else"
70 "enum"
71 "explicit"
72 "extern"
73 "final"
74 "for"
75 "friend"
76 "if"
77 "inline"
78 "namespace"
79 "new"
80 "noexcept"
81 "override"
82 "private"
83 "protected"
84 "public"
85 "requires"
86 "return"
87 "sizeof"
88 "struct"
89 "switch"
90 "template"
91 "throw"
92 "try"
93 "typedef"
94 "typename"
95 "union"
96 "using"
97 "virtual"
98 "while"
99 (primitive_type)
100 (sized_type_specifier)
101 (storage_class_specifier)
102 (type_qualifier)
103] @keyword
104
105[
106 "#define"
107 "#elif"
108 "#else"
109 "#endif"
110 "#if"
111 "#ifdef"
112 "#ifndef"
113 "#include"
114 (preproc_directive)
115] @keyword
116
117(comment) @comment
118
119[
120 (true)
121 (false)
122 (null)
123 ("nullptr")
124] @constant
125
126(number_literal) @number
127
128[
129 (string_literal)
130 (system_lib_string)
131 (char_literal)
132 (raw_string_literal)
133] @string
134
135[
136 ","
137 ":"
138 "::"
139 ";"
140 (raw_string_delimiter)
141] @punctuation.delimiter
142
143[
144 "{"
145 "}"
146 "("
147 ")"
148 "["
149 "]"
150] @punctuation.bracket
151
152[
153 "."
154 ".*"
155 "->*"
156 "~"
157 "-"
158 "--"
159 "-="
160 "->"
161 "="
162 "!"
163 "!="
164 "|"
165 "|="
166 "||"
167 "^"
168 "^="
169 "&"
170 "&="
171 "&&"
172 "+"
173 "++"
174 "+="
175 "*"
176 "*="
177 "/"
178 "/="
179 "%"
180 "%="
181 "<<"
182 "<<="
183 ">>"
184 ">>="
185 "<"
186 "=="
187 ">"
188 "<="
189 ">="
190 "<=>"
191 "||"
192 "?"
193] @operator
194
195(conditional_expression ":" @operator)
196(user_defined_literal (literal_suffix) @operator)