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