1[
2 "break"
3 "case"
4 "const"
5 "continue"
6 "default"
7 "do"
8 "else"
9 "enum"
10 "extern"
11 "for"
12 "if"
13 "inline"
14 "return"
15 "sizeof"
16 "static"
17 "struct"
18 "switch"
19 "typedef"
20 "union"
21 "volatile"
22 "while"
23 "#define"
24 "#elif"
25 "#else"
26 "#endif"
27 "#if"
28 "#ifdef"
29 "#ifndef"
30 "#include"
31 (preproc_directive)
32] @keyword
33
34[
35 "--"
36 "-"
37 "-="
38 "->"
39 "="
40 "!="
41 "*"
42 "&"
43 "&&"
44 "+"
45 "++"
46 "+="
47 "<"
48 "=="
49 ">"
50 "||"
51 "."
52 ";"
53] @operator
54
55[
56 (string_literal)
57 (system_lib_string)
58] @string
59
60(null) @constant.builtin
61
62[
63 (number_literal)
64 (char_literal)
65] @number
66
67(identifier) @variable
68
69(field_identifier) @property
70
71(statement_identifier) @label
72
73[
74 (type_identifier)
75 (primitive_type)
76 (sized_type_specifier)
77] @type
78
79(call_expression
80 function: (identifier) @function)
81
82(call_expression
83 function: (field_expression
84 field: (field_identifier) @function))
85
86(function_declarator
87 declarator: (identifier) @function)
88
89(preproc_function_def
90 name: (identifier) @function.special)
91
92((identifier) @constant
93 (#match? @constant "^[A-Z][A-Z\\d_]*$"))
94
95(comment) @comment
96
97[
98 "in"
99 "out"
100 "inout"
101 "uniform"
102 "shared"
103 "layout"
104 "attribute"
105 "varying"
106 "buffer"
107 "coherent"
108 "readonly"
109 "writeonly"
110 "precision"
111 "highp"
112 "mediump"
113 "lowp"
114 "centroid"
115 "sample"
116 "patch"
117 "smooth"
118 "flat"
119 "noperspective"
120 "invariant"
121 "precise"
122] @type.qualifier
123
124"subroutine" @keyword.function
125
126(extension_storage_class) @storageclass
127
128((identifier) @variable.builtin
129 (#match? @variable.builtin "^gl_"))