public override Node VisitStatements(MetaCodeParser.StatementsContext context) { return StatementFactory.Block(context.statement() .Select(statement => statement.Accept(this) as StatementNodeBase) .ToArray() ); }
public override Node VisitBlockStatement(MetaCodeParser.BlockStatementContext context) { var attributes = GetAttributes(context.attribute()); var body = context.statement() .Select(stmt => stmt.Accept(this) as StatementNodeBase) .ToArray(); return StatementFactory.Block(body, attributes); }
public override Node VisitMacroCallExpression(MetaCodeParser.MacroCallExpressionContext context) { var macroName = context.macroName.Text; var statements = context.statement() .Select(statement => statement.Accept(this) as StatementNodeBase) .ToArray(); return ExpressionFactory.MacroCall(macroName, statements); }