Skip to content

Commit

Permalink
is_reserved_word
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Jun 24, 2024
1 parent 03a0d90 commit e1ee21e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/swc_ecma_parser/src/parser/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ impl Context {
}
}

#[cfg_attr(not(feature = "verify"), inline(always))]
pub fn is_reserved_word(self, word: &Atom) -> bool {
if !cfg!(feature = "verify") {
return false;
}

match &**word {
"let" => self.strict,
// SyntaxError in the module only, not in the strict.
Expand Down

0 comments on commit e1ee21e

Please sign in to comment.