Streamline function pointers and currying.

This commit is contained in:
Stephen Chung
2020-10-17 13:49:16 +08:00
parent a16fc71935
commit 39474d6420
9 changed files with 171 additions and 132 deletions

View File

@@ -1479,7 +1479,7 @@ impl Engine {
Expr::Stmt(x) => self.eval_stmt(scope, mods, state, lib, this_ptr, &x.0, level),
// var op= rhs
Expr::Assignment(x) if matches!(x.0, Expr::Variable(_)) => {
Expr::Assignment(x) if x.0.get_variable_access(false).is_some() => {
let (lhs_expr, op, rhs_expr, op_pos) = x.as_ref();
let mut rhs_val = self
.eval_expr(scope, mods, state, lib, this_ptr, rhs_expr, level)?