public void AddFileOverwrite(int line, int pos, string value) { var instruction = new Interpreter.InterpreterInstructionBranch(line, pos, value, new Interpreter.Evaluator.EvaluateFileOverwrite()); if (LastFileCreateInstruction != null) { logger.Error("Line {0} - cannnot have a FileOverWrite before ending a FileCreate instruction.", line); } AddInstruction(instruction); DebugInstruction("FileOverwrite", instruction); }
public void AddLoop(int line, int pos, string value) { var instruction1 = new Interpreter.InterpreterInstructionNoOp(line, pos, value, new Interpreter.Evaluator.EnterLoopEvaluator()); var instruction2 = new Interpreter.InterpreterInstructionBranch(line, pos, value, new Interpreter.Evaluator.LoopEvaluator()); AddInstruction(instruction1); AddInstruction(instruction2); loopStack.Push(instruction2); DebugInstruction("Loop", instruction2); }
public void AddIf(int line, int pos, string value) { var evaluator = new Interpreter.Evaluator.IfEvaluator(value); var instruction = new Interpreter.InterpreterInstructionBranch(line, pos, value, evaluator); ifElseStack.Push(instruction); AddInstruction(instruction); DebugInstruction("If", instruction); }