@@ -0,0 +1,150 @@
1+[
2+ "sizeof"
3+ ; @todo why does "uniform" break highlighting?
4+ ; "uniform" ; OpenCL C 3.0.13 reserves this as a keyword, but doesn't seem to use it for anything
5+ (function_qualifier)
6+] @keyword
7+
8+[
9+ "enum"
10+ "struct"
11+ "typedef"
12+ "union"
13+] @keyword.storage.type
14+
15+[
16+ "extern"
17+ "register"
18+ (type_qualifier)
19+ (access_qualifier)
20+ (storage_class_specifier)
21+ (address_space_qualifier)
22+] @keyword.storage.modifier
23+
24+[
25+ "goto"
26+ "break"
27+ "continue"
28+] @keyword.control
29+
30+[
31+ "do"
32+ "for"
33+ "while"
34+] @keyword.control.repeat
35+
36+[
37+ "if"
38+ "else"
39+ "switch"
40+ "case"
41+ "default"
42+] @keyword.control.conditional
43+
44+"return" @keyword.control.return
45+
46+[
47+ "defined"
48+ "#define"
49+ "#elif"
50+ "#else"
51+ "#endif"
52+ "#if"
53+ "#ifdef"
54+ "#ifndef"
55+ "#include"
56+ (preproc_directive)
57+] @keyword.directive
58+
59+(pointer_declarator "*" @type.builtin)
60+(abstract_pointer_declarator "*" @type.builtin)
61+
62+[
63+ "+"
64+ "-"
65+ "*"
66+ "/"
67+ "++"
68+ "--"
69+ "%"
70+ "=="
71+ "!="
72+ ">"
73+ "<"
74+ ">="
75+ "<="
76+ "&&"
77+ "||"
78+ "!"
79+ "&"
80+ "|"
81+ "^"
82+ "~"
83+ "<<"
84+ ">>"
85+ "="
86+ "+="
87+ "-="
88+ "*="
89+ "/="
90+ "%="
91+ "<<="
92+ ">>="
93+ "&="
94+ "^="
95+ "|="
96+ "?"
97+] @operator
98+
99+(conditional_expression ":" @operator)
100+
101+"..." @punctuation
102+
103+["," "." ":" ";" "->" "::"] @punctuation.delimiter
104+
105+["(" ")" "[" "]" "{" "}"] @punctuation.bracket
106+
107+[(true) (false)] @constant.builtin.boolean
108+
109+(enumerator name: (identifier) @type.enum.variant)
110+
111+(string_literal) @string
112+(system_lib_string) @string
113+
114+(null) @constant
115+(number_literal) @constant.numeric
116+(char_literal) @constant.character
117+
118+(call_expression
119+ function: (identifier) @function)
120+(call_expression
121+ function: (field_expression
122+ field: (field_identifier) @function))
123+(call_expression (argument_list (identifier) @variable))
124+(function_declarator
125+ declarator: [(identifier) (field_identifier)] @function)
126+(parameter_declaration
127+ declarator: (identifier) @variable.parameter)
128+(parameter_declaration
129+ (pointer_declarator
130+ declarator: (identifier) @variable.parameter))
131+(preproc_function_def
132+ name: (identifier) @function.special)
133+
134+(attribute
135+ name: (identifier) @attribute)
136+
137+(field_identifier) @variable.other.member
138+(statement_identifier) @label
139+(type_identifier) @type
140+(scalar_type) @type.builtin
141+(sized_type_specifier) @type.builtin
142+(vector_type) @type.builtin
143+(other_builtin_type) @type.builtin
144+
145+((identifier) @constant
146+ (#match? @constant "^[A-Z][A-Z\\d_]*$"))
147+
148+(identifier) @variable
149+
150+(comment) @comment