public override EVariable Exec(EScope scope) { EVariable toUpdate = scope.Get(variable.ToString()); toUpdate.Assign(value.Solve(scope)); return(toUpdate); }
public override EVariable Solve(EVariable first, EVariable second) { switch (type) { case AssignType.Assign: second.Assign(first); return(second); case AssignType.Move: EVariable temp = second.Clone(); second.Assign(first); return(temp); default: throw new ELangException("Invalid Assigntype: " + type); } }