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