Revise built-in macros.

This commit is contained in:
Stephen Chung
2022-12-26 11:46:11 +08:00
parent 52d23522e6
commit d47bfa431a
3 changed files with 181 additions and 181 deletions

View File

@@ -1611,13 +1611,13 @@ impl Engine {
let operands = &mut [&mut lhs, &mut rhs];
if let Some((func, ctx)) =
if let Some((func, need_context)) =
get_builtin_binary_op_fn(op_token.clone(), operands[0], operands[1])
{
// Built-in found
auto_restore! { let orig_level = global.level; global.level += 1 }
let context = if ctx {
let context = if need_context {
Some((self, name.as_str(), None, &*global, pos).into())
} else {
None