naga/keywords/
wgsl.rs

1/*!
2Keywords for [WGSL][wgsl] (WebGPU Shading Language).
3
4[wgsl]: https://gpuweb.github.io/gpuweb/wgsl.html
5*/
6
7// https://gpuweb.github.io/gpuweb/wgsl/#keyword-summary
8// last sync: https://github.com/gpuweb/gpuweb/blob/39f2321f547c8f0b7f473cf1d47fba30b1691303/wgsl/index.bs
9pub const RESERVED: &[&str] = &[
10    // Type-defining Keywords
11    "array",
12    "atomic",
13    "bool",
14    "f32",
15    "f16",
16    "i32",
17    "i64",
18    "mat2x2",
19    "mat2x3",
20    "mat2x4",
21    "mat3x2",
22    "mat3x3",
23    "mat3x4",
24    "mat4x2",
25    "mat4x3",
26    "mat4x4",
27    "ptr",
28    "sampler",
29    "sampler_comparison",
30    "texture_1d",
31    "texture_2d",
32    "texture_2d_array",
33    "texture_3d",
34    "texture_cube",
35    "texture_cube_array",
36    "texture_multisampled_2d",
37    "texture_storage_1d",
38    "texture_storage_2d",
39    "texture_storage_2d_array",
40    "texture_storage_3d",
41    "texture_depth_2d",
42    "texture_depth_2d_array",
43    "texture_depth_cube",
44    "texture_depth_cube_array",
45    "texture_depth_multisampled_2d",
46    "u32",
47    "u64",
48    "vec2",
49    "vec3",
50    "vec4",
51    // Other Keywords
52    "alias",
53    "bitcast",
54    "break",
55    "case",
56    "const",
57    "continue",
58    "continuing",
59    "default",
60    "discard",
61    "else",
62    "enable",
63    "false",
64    "fn",
65    "for",
66    "if",
67    "let",
68    "loop",
69    "override",
70    "return",
71    "static_assert",
72    "struct",
73    "switch",
74    "true",
75    "type",
76    "var",
77    "while",
78    // Reserved Words
79    "CompileShader",
80    "ComputeShader",
81    "DomainShader",
82    "GeometryShader",
83    "Hullshader",
84    "NULL",
85    "Self",
86    "abstract",
87    "active",
88    "alignas",
89    "alignof",
90    "as",
91    "asm",
92    "asm_fragment",
93    "async",
94    "attribute",
95    "auto",
96    "await",
97    "become",
98    "binding_array",
99    "cast",
100    "catch",
101    "class",
102    "co_await",
103    "co_return",
104    "co_yield",
105    "coherent",
106    "column_major",
107    "common",
108    "compile",
109    "compile_fragment",
110    "concept",
111    "const_cast",
112    "consteval",
113    "constexpr",
114    "constinit",
115    "crate",
116    "debugger",
117    "decltype",
118    "delete",
119    "demote",
120    "demote_to_helper",
121    "do",
122    "dynamic_cast",
123    "enum",
124    "explicit",
125    "export",
126    "extends",
127    "extern",
128    "external",
129    "fallthrough",
130    "filter",
131    "final",
132    "finally",
133    "friend",
134    "from",
135    "fxgroup",
136    "get",
137    "goto",
138    "groupshared",
139    "handle",
140    "highp",
141    "impl",
142    "implements",
143    "import",
144    "inline",
145    "inout",
146    "instanceof",
147    "interface",
148    "layout",
149    "lowp",
150    "macro",
151    "macro_rules",
152    "match",
153    "mediump",
154    "meta",
155    "mod",
156    "module",
157    "move",
158    "mut",
159    "mutable",
160    "namespace",
161    "new",
162    "nil",
163    "noexcept",
164    "noinline",
165    "nointerpolation",
166    "noperspective",
167    "null",
168    "nullptr",
169    "of",
170    "operator",
171    "package",
172    "packoffset",
173    "partition",
174    "pass",
175    "patch",
176    "pixelfragment",
177    "precise",
178    "precision",
179    "premerge",
180    "priv",
181    "protected",
182    "pub",
183    "public",
184    "readonly",
185    "ref",
186    "regardless",
187    "register",
188    "reinterpret_cast",
189    "requires",
190    "resource",
191    "restrict",
192    "self",
193    "set",
194    "shared",
195    "signed",
196    "sizeof",
197    "smooth",
198    "snorm",
199    "static",
200    "static_assert",
201    "static_cast",
202    "std",
203    "subroutine",
204    "super",
205    "target",
206    "template",
207    "this",
208    "thread_local",
209    "throw",
210    "trait",
211    "try",
212    "typedef",
213    "typeid",
214    "typename",
215    "typeof",
216    "union",
217    "unless",
218    "unorm",
219    "unsafe",
220    "unsized",
221    "use",
222    "using",
223    "varying",
224    "virtual",
225    "volatile",
226    "wgsl",
227    "where",
228    "with",
229    "writeonly",
230    "yield",
231];