Visitor pattern for Nodes.