public object Visit(ElseActionNode n, object o) { AppendLine($"{AddIndent()}else"); AppendLine($"{AddIndent()}{{"); IncreaseIndent(); n.Actions.Accept(this, null); DecreaseIndent(); AppendLine($"{AddIndent()}}}"); return(null); }
private ActionNode ElseStatement() { ActionNode itsAST; SourceCodePosition itsPos = _currentToken.SourcePosition; if (_currentToken.Type == Token.TokenType.Else) { Accept(Token.TokenType.Else); Accept(Token.TokenType.LeftBrace); ActionSequenceNode itsActions = ActionStatements(); Accept(Token.TokenType.RightBrace); itsAST = new ElseActionNode(itsActions, itsPos); } else { itsAST = new EmptyActionNode(itsPos); } return(itsAST); }
public object Visit(ElseActionNode n, object o) { return(null); }