mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
[mtl] populate reserved words more
This commit is contained in:
committed by
Dzmitry Malyshau
parent
d0f3450564
commit
36bc6b8596
@@ -27,7 +27,103 @@ use std::{
|
||||
|
||||
//TODO: find a complete list
|
||||
const RESERVED_WORDS: &[&str] = &[
|
||||
"if", "switch", "while", "for", "main", "struct", "new", "const", "device",
|
||||
// control flow
|
||||
"break",
|
||||
"if",
|
||||
"else",
|
||||
"continue",
|
||||
"goto",
|
||||
"do",
|
||||
"while",
|
||||
"for",
|
||||
"switch",
|
||||
"case",
|
||||
// types and values
|
||||
"void",
|
||||
"unsigned",
|
||||
"signed",
|
||||
"bool",
|
||||
"char",
|
||||
"int",
|
||||
"long",
|
||||
"float",
|
||||
"double",
|
||||
"char8_t",
|
||||
"wchar_t",
|
||||
"true",
|
||||
"false",
|
||||
"nullptr",
|
||||
"union",
|
||||
"class",
|
||||
"struct",
|
||||
"enum",
|
||||
// other
|
||||
"main",
|
||||
"decltype",
|
||||
"sizeof",
|
||||
"typeof",
|
||||
"typedef",
|
||||
"explicit",
|
||||
"export",
|
||||
"friend",
|
||||
"namespace",
|
||||
"operator",
|
||||
"public",
|
||||
"template",
|
||||
"typename",
|
||||
"typeid",
|
||||
"co_await",
|
||||
"co_return",
|
||||
"co_yield",
|
||||
"module",
|
||||
"import",
|
||||
"ray_data",
|
||||
"vec_step",
|
||||
"visible",
|
||||
"as_type",
|
||||
// qualifiers
|
||||
"mutable",
|
||||
"static",
|
||||
"volatile",
|
||||
"restrict",
|
||||
"const",
|
||||
"non-temporal",
|
||||
"dereferenceable",
|
||||
"invariant",
|
||||
// exceptions
|
||||
"throw",
|
||||
"try",
|
||||
"catch",
|
||||
// operators
|
||||
"const_cast",
|
||||
"dynamic_cast",
|
||||
"reinterpret_cast",
|
||||
"static_cast",
|
||||
"new",
|
||||
"delete",
|
||||
"and",
|
||||
"and_eq",
|
||||
"bitand",
|
||||
"bitor",
|
||||
"compl",
|
||||
"not",
|
||||
"not_eq",
|
||||
"or",
|
||||
"or_eq",
|
||||
"xor",
|
||||
"xor_eq",
|
||||
"compl",
|
||||
// Metal-specific
|
||||
"constant",
|
||||
"device",
|
||||
"threadgroup",
|
||||
"threadgroup_imageblock",
|
||||
"compute",
|
||||
"vertex",
|
||||
"fragment",
|
||||
"read_only",
|
||||
"write_only",
|
||||
"read_write",
|
||||
];
|
||||
|
||||
#[derive(Clone, Debug, Default, PartialEq)]
|
||||
|
||||
Reference in New Issue
Block a user