1[
2 "const"
3 "enum"
4 "extern"
5 "inline"
6 "sizeof"
7 "static"
8 "struct"
9 "typedef"
10 "union"
11 "volatile"
12] @keyword
13
14[
15 "break"
16 "case"
17 "continue"
18 "default"
19 "do"
20 "else"
21 "for"
22 "goto"
23 "if"
24 "return"
25 "switch"
26 "while"
27] @keyword.control
28
29[
30 "#define"
31 "#elif"
32 "#elifdef"
33 "#elifndef"
34 "#else"
35 "#endif"
36 "#if"
37 "#ifdef"
38 "#ifndef"
39 "#include"
40 (preproc_directive)
41] @keyword.directive
42
43[
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] @operator
81
82[
83 "."
84 ";"
85 ","
86] @punctuation.delimiter
87
88[
89 "{"
90 "}"
91 "("
92 ")"
93 "["
94 "]"
95] @punctuation.bracket
96
97[
98 (string_literal)
99 (system_lib_string)
100 (char_literal)
101] @string
102
103(escape_sequence) @string.escape
104
105(comment) @comment
106
107(number_literal) @number
108
109[
110 (true)
111 (false)
112] @boolean
113
114(null) @constant.builtin
115
116(identifier) @variable
117
118((identifier) @constant
119 (#match? @constant "^_*[A-Z][A-Z\\d_]*$"))
120
121(call_expression
122 function: (identifier) @function)
123(call_expression
124 function: (field_expression
125 field: (field_identifier) @function))
126(function_declarator
127 declarator: (identifier) @function)
128(preproc_function_def
129 name: (identifier) @function.special)
130
131(field_identifier) @property
132(statement_identifier) @label
133
134[
135 (type_identifier)
136 (primitive_type)
137 (sized_type_specifier)
138] @type
139
140; GNU __attribute__
141(attribute_specifier) @attribute
142(attribute_specifier
143 (argument_list
144 (identifier) @attribute))
145
146; C23 [[attributes]]
147(attribute
148 prefix: (identifier) @attribute)
149(attribute
150 name: (identifier) @attribute)