public IfNode( ExpressionNode condition, RedILNode ifTrue, RedILNode ifFalse) : base(RedILNodeType.If) { Condition = condition; IfTrue = ifTrue; IfFalse = ifFalse; }
public State NewState(AstNode currentNode, RedILNode currentRedILNode) { var lastNode = currentRedILNode ?? ParentRedILNode; var lastIterative = LastIterativeNode; if (currentRedILNode is DoWhileNode || currentRedILNode is WhileNode) { lastIterative = currentRedILNode; } return(new State() { ParentState = this, ParentNode = currentNode, LastIterativeNode = lastIterative, ParentRedILNode = lastNode }); }