Пример #1
0
        public override EVariable Exec(EScope scope)
        {
            EVariable toUpdate = scope.Get(variable.ToString());

            toUpdate.Assign(value.Solve(scope));
            return(toUpdate);
        }
Пример #2
0
        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());
        }
Пример #3
0
        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);
        }
Пример #4
0
 public override EVariable Exec(EScope scope)
 {
     return(expression.Solve(scope));
 }