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

@@ -140,14 +140,14 @@ impl Engine {
let args = &mut [&mut *lock_guard, &mut new_val];
if self.fast_operators() {
if let Some((func, ctx)) =
if let Some((func, need_context)) =
get_builtin_op_assignment_fn(op_assign_token.clone(), args[0], args[1])
{
// Built-in found
let op = op_assign_token.literal_syntax();
auto_restore! { let orig_level = global.level; global.level += 1 }
let context = if ctx {
let context = if need_context {
Some((self, op, None, &*global, *op_pos).into())
} else {
None