Interface PartialParseTreeListener

All Superinterfaces:
ParseTreeListener
All Known Implementing Classes:
HandlerTarget, HandlerTargetImpl, ParsedReplaceTarget, ParsedReplaceTargetImpl, ProxyParseTreeListener, ReplaceTarget, RunPhase, SearchTerminals, SearchTerminalsDynamic, SearchTerminalsImpl, TerminalReplaceTarget, TerminalReplaceTargetImpl, ThrowTarget, ThrowTargetImpl, TransformationPhase, WalkPhase, WrapThrowTarget, WrapThrowTargetImpl

public interface PartialParseTreeListener extends ParseTreeListener
Adds a method to the parse tree listener with which the parse tree walker can detect if it should stop walking the tree.
  • Method Details

    • isFinished

      default boolean isFinished()
      Returns if this parse tree listener is no longer interested in walking the tree.
      Returns:
      true if the parse tree walker should stop walking the tree entirely.
      API Usage Note:
      This method will be called at every level of the tree as the parse tree walker decides whether or not to continue iterating the children of each node.
    • isDeepEnough

      default boolean isDeepEnough(ExtendedContext node)
      Returns if this parse tree listener wants to continue to walk the tree but not go any deeper into the current (given) rule.
      Parameters:
      node - The current node in which to maybe not visit the children
      Returns:
      true if the parse tree walker