public override EVariable Exec(EScope scope) { EVariable toUpdate = scope.Get(variable.ToString()); toUpdate.Assign(value.Solve(scope)); return(toUpdate); }
public override EVariable Exec(EScope scope) { EVBoolean solved = (EVBoolean)check.Solve(scope).Convert(EType.Boolean); if (solved.Get()) { EScope subScope = scope.GetChild(); return(Interpreter.Run(program, subScope)); } if (elseProgram != null) { EScope subScope = scope.GetChild(); return(Interpreter.Run(elseProgram, subScope)); } return(new EVVoid()); }
public override EVariable Exec(EScope scope) { Func <bool> checkVar = () => ( (EVBoolean) check.Solve(scope) .Convert(EType.Boolean) ).Get(); EVariable output = new EVVoid(); while (checkVar()) { EScope subScope = scope.GetChild(); output = Interpreter.Run(program, subScope); } return(output); }
public override EVariable Exec(EScope scope) { return(expression.Solve(scope)); }