diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2026-02-03 10:49:10 +0100 |
|---|---|---|
| committer | Miquel Sabaté Solà <mssola@mssola.com> | 2026-02-03 10:49:10 +0100 |
| commit | 948ad7f2bda3495faebf39d1bb903f863e9ad596 (patch) | |
| tree | 6675156cf9a13ea4a70e95528d7e7d70dccb5a1b /lib/xixanta | |
| parent | f8230328065eb4049292b15d109b369e2e89746a (diff) | |
| download | tools.nes-948ad7f2bda3495faebf39d1bb903f863e9ad596.tar.gz tools.nes-948ad7f2bda3495faebf39d1bb903f863e9ad596.zip | |
Ensure __fallthrough__ is not considered a valid identifier
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'lib/xixanta')
| -rw-r--r-- | lib/xixanta/src/node.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/xixanta/src/node.rs b/lib/xixanta/src/node.rs index 5093ab3..7a5cf3d 100644 --- a/lib/xixanta/src/node.rs +++ b/lib/xixanta/src/node.rs @@ -40,7 +40,10 @@ impl PString { } // You cannot assign into a name which is reserved. - if matches!(self.value.to_lowercase().as_str(), "x" | "y" | "a") { + if matches!( + self.value.to_lowercase().as_str(), + "x" | "y" | "a" | "__fallthrough__" + ) { return Err(format!("cannot use reserved name '{}'", self.value)); } |
