Do not optimize eval_expression scripts.

This commit is contained in:
Stephen Chung 2020-05-20 00:06:19 +08:00
parent fad60c0a7d
commit 5db1fd3712

View File

@ -824,9 +824,10 @@ impl Engine {
&mut stream.peekable(), &mut stream.peekable(),
self, self,
scope, scope,
self.optimization_level, OptimizationLevel::None, // No need to optimize a lone expression
self.max_expr_depth, self.max_expr_depth,
)?; )?;
self.eval_ast_with_scope(scope, &ast) self.eval_ast_with_scope(scope, &ast)
} }