Disallow expect! as an identifier

This commit is contained in:
Joshua Warner 2024-12-16 21:42:16 -08:00
parent 249125297e
commit ad1e3369c5
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
8 changed files with 10 additions and 55 deletions

View file

@ -21,6 +21,7 @@ pub const WHERE: &str = "where";
// These keywords are valid in headers
pub const PLATFORM: &str = "platform";
pub const KEYWORDS: [&str; 11] = [
pub const KEYWORDS: [&str; 12] = [
IF, THEN, ELSE, WHEN, AS, IS, DBG, IMPORT, EXPECT, RETURN, CRASH,
"expect!", // not itself a keyword, but it's problematic if we allow an identifier like this!
];