Allow scope constants in strict variables mode.

This commit is contained in:
Stephen Chung
2022-04-21 13:21:53 +08:00
parent c3d013bddc
commit 6b8ddd925b
7 changed files with 44 additions and 28 deletions

View File

@@ -116,12 +116,12 @@ impl Engine {
},
);
let mut state = ParseState::new(self, tokenizer_control);
let scope = &Scope::new();
let mut state = ParseState::new(self, scope, tokenizer_control);
let ast = self.parse_global_expr(
&mut stream.peekable(),
&mut state,
&Scope::new(),
#[cfg(not(feature = "no_optimize"))]
OptimizationLevel::None,
#[cfg(feature = "no_optimize")]