1 // https://gpuweb.github.io/gpuweb/wgsl/#keyword-summary 2 pub const RESERVED: &[&str] = &[ 3 // type-defining keywords 4 "array", 5 "atomic", 6 "bool", 7 "float32", 8 "int32", 9 "mat2x2", 10 "mat2x3", 11 "mat2x4", 12 "mat3x2", 13 "mat3x3", 14 "mat3x4", 15 "mat4x2", 16 "mat4x3", 17 "mat4x4", 18 "pointer", 19 "sampler", 20 "sampler_comparison", 21 "struct", 22 "texture_1d", 23 "texture_2d", 24 "texture_2d_array", 25 "texture_3d", 26 "texture_cube", 27 "texture_cube_array", 28 "texture_multisampled_2d", 29 "texture_storage_1d", 30 "texture_storage_2d", 31 "texture_storage_2d_array", 32 "texture_storage_3d", 33 "texture_depth_2d", 34 "texture_depth_2d_array", 35 "texture_depth_cube", 36 "texture_depth_cube_array", 37 "texture_depth_multisampled_2d", 38 "uint32", 39 "vec2", 40 "vec3", 41 "vec4", 42 // other keywords 43 "bitcast", 44 "block", 45 "break", 46 "case", 47 "continue", 48 "continuing", 49 "default", 50 "discard", 51 "else", 52 "else_if", 53 "enable", 54 "fallthrough", 55 "false", 56 "fn", 57 "for", 58 "function", 59 "if", 60 "let", 61 "loop", 62 "private", 63 "read", 64 "read_write", 65 "return", 66 "storage", 67 "switch", 68 "true", 69 "type", 70 "uniform", 71 "var", 72 "workgroup", 73 "write", 74 // image format keywords 75 "r8unorm", 76 "r8snorm", 77 "r8uint", 78 "r8sint", 79 "r16uint", 80 "r16sint", 81 "r16float", 82 "rg8unorm", 83 "rg8snorm", 84 "rg8uint", 85 "rg8sint", 86 "r32uint", 87 "r32sint", 88 "r32float", 89 "rg16uint", 90 "rg16sint", 91 "rg16float", 92 "rgba8unorm", 93 "rgba8unorm_srgb", 94 "rgba8snorm", 95 "rgba8uint", 96 "rgba8sint", 97 "bgra8unorm", 98 "bgra8unorm_srgb", 99 "rgb10a2unorm", 100 "rg11b10float", 101 "rg32uint", 102 "rg32sint", 103 "rg32float", 104 "rgba16uint", 105 "rgba16sint", 106 "rgba16float", 107 "rgba32uint", 108 "rgba32sint", 109 "rgba32float", 110 // reserved keywords 111 "asm", 112 "bf16", 113 "const", 114 "do", 115 "enum", 116 "f16", 117 "f64", 118 "handle", 119 "i8", 120 "i16", 121 "i64", 122 "mat", 123 "premerge", 124 "regardless", 125 "typedef", 126 "u8", 127 "u16", 128 "u64", 129 "unless", 130 "using", 131 "vec", 132 "void", 133 "while", 134 ]; 135