Class Node.Visitor

    • Field Detail

      • visitUnparsedTokens

        protected boolean visitUnparsedTokens
    • Constructor Detail

      • Visitor

        public Visitor()
    • Method Detail

      • visit

        public final void visit​(Node node)
        Tries to invoke (via reflection) the appropriate visit(...) method defined in a subclass. If there is none, it just calls the fallback() routine.
        Parameters:
        node - the Node to "visit"
      • recurse

        public final void recurse​(Node node)
        Just recurses over (i.e. visits) node's children
        Parameters:
        node - the node we are traversing
      • fallback

        public void fallback​(Node node)
        If there is no specific method to visit this node type, it just uses this method. The default base implementation is just to recurse over the nodes.
        Parameters:
        node - The node we are currently traversing