protocol ASTNode : CustomStringConvertible { func accept<V: ASTVisitor>(visitor: V) -> V.VisitResult } protocol ASTVisitor { associatedtype VisitResult func visit(nop: NopNode) -> VisitResult func visit(text: TextNode) -> VisitResult func visit(code: CodeNode) -> VisitResult func visit(subst: SubstNode) -> VisitResult func visit(macroCall: MacroCallNode) -> VisitResult func visit(macroStringLiteral: MacroStringLiteralNode) -> VisitResult func visit(template: Template) -> VisitResult }
(edited)