public While(Condition condition, Statement first, End end) { Condition = condition; FirstStatement = first; Head = condition; Tail = end; }
public Program(Statement Statement) { if (Statement == null) { throw new ArgumentNullException("listOfStatements"); } FirstStatement = Statement; }
public Condition(Expression left, CompareSign compare, Expression right) { Compare = compare; Left = left; Right = right; NextTrue = null; NextFalse = null; }
public If(Condition condition, Statement ifBlock, Statement elseBlock, End end, Node.Coords coords) { Condition = condition; IfBlock = ifBlock; ElseBlock = elseBlock; Head = condition; Tail = end; this.Coords = coords; }
public For(Assignment assn, Condition cond, Assignment chngAssn, Statement first, End end, Node.Coords coords) { Assignment = assn; Condition = cond; ChngAssignment = chngAssn; FirstStatement = first; Head = assn; Tail = end; this.Coords = coords; }
internal static string OneStep(Nodes.Statement currStatement) { string result = null; if (currStatement is Nodes.Print) { result = currStatement.Interpreter().StringValue; } else currStatement.Interpreter(); currStatement = currStatement.Next; return result; }
public static string Debug(string program, ref List<string> errors, ref List<string> watches, ref int flag) { if (currStatement == null) { Nodes.Program firstStatement = Parser.Program(program); firstStatement.Interpreter(); currStatement = firstStatement.FirstStatement; } string result = OneStep(currStatement); watches.Clear(); GetWatches(ref watches); if (currStatement == null) flag = 1; return result; }
public Label(string name, Statement statement) { Name = name; Statement = statement; }