Visitor Pattern: Exporting Document AST Nodes
UML Class Diagrams · made in Skemio

What it shows
- Separates document data structures from the operations performed on them.
- Adds new export targets (Markdown, HTML, PDF) without touching node classes.
- Uses double dispatch via accept(visitor) to resolve the exact method call.
The takeaway
Use the Visitor pattern when your data structure is stable but operations change often.
- #VisitorPattern
- #Compilers
- #DesignPatterns
- #SoftwareArchitecture
- #OOP
- #CleanArchitecture





