Fixed variable parse order

This commit is contained in:
2023-06-17 22:15:58 -07:00
parent 1671bbbade
commit 41bf1954a1
3 changed files with 23 additions and 10 deletions

View File

@ -15,7 +15,8 @@ pub fn eval_operator(op: &Operator, args: &VecDeque<Expression>, context: &mut C
let b = &args[1];
if let Expression::Variable(s) = &args[0] {
context.push_var(s.clone(), b.clone());
let r = context.push_var(s.clone(), b.clone());
if r.is_err() { return Err(EvalError::BadDefineName); }
return Ok(Some(b.clone()));
} else { return Err(EvalError::BadDefineName); }
},