Refine native/script code splits.

This commit is contained in:
Stephen Chung
2022-10-30 15:45:25 +08:00
parent d97f3f7ec4
commit c9184db4d2
10 changed files with 163 additions and 158 deletions

View File

@@ -273,7 +273,7 @@ impl Engine {
.into_err(Position::NONE));
}
// Identifier in first position
_ if segments.is_empty() && is_valid_identifier(s.chars()) => {
_ if segments.is_empty() && is_valid_identifier(s) => {
// Make it a custom keyword/symbol if it is disabled or reserved
if (!self.disabled_symbols.is_empty() && self.disabled_symbols.contains(s))
|| token.map_or(false, |v| v.is_reserved())