Add is_symbol_disabled and is_custom_keyword.

This commit is contained in:
Stephen Chung
2023-04-11 11:38:48 +08:00
parent dd0d1dd7ca
commit 0206f776db
8 changed files with 95 additions and 85 deletions

View File

@@ -2431,13 +2431,7 @@ impl Engine {
}
#[cfg(not(feature = "no_custom_syntax"))]
Token::Custom(s)
if self
.custom_keywords
.as_ref()
.and_then(|m| m.get(s.as_str()))
.map_or(false, Option::is_some) =>
{
Token::Custom(s) if self.is_custom_keyword(s.as_str()) => {
op_base.hashes = if native_only {
FnCallHashes::from_native_only(calc_fn_hash(None, &s, 2))
} else {