Visitable

public protocol Visitable

The Visitable protocol is used to indicate a node can accept a visitor.

  • Called to begin traversing the sub-tree rooted at this node.

    Declaration

    Swift

    func accept(_ visitor: Visitor)

    Parameters

    visitor

    The Visitor object whose functions will be invoked during the traversal of the sub-tree rooted at this node.