Interface TreeMember

All Superinterfaces:
org.antlr.v4.runtime.tree.ParseTree, org.antlr.v4.runtime.tree.SyntaxTree, org.antlr.v4.runtime.tree.Tree
All Known Implementing Classes:
ASTNode, Directive, EmptyTerminalNode, ExtendedContext, ExtendedTerminalNode, ParsableASTNode, StringNode, Tensor, UnparsableASTNode

public interface TreeMember extends org.antlr.v4.runtime.tree.ParseTree
A tree member has a parent and its tokens can be omitted. This interface serves as the basis for all tree parse tree nodes.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the parent of this node.
    void
    Omits the tokens this node encompasses from the next local root.

    Methods inherited from interface org.antlr.v4.runtime.tree.ParseTree

    accept, getChild, getText, setParent, toStringTree

    Methods inherited from interface org.antlr.v4.runtime.tree.SyntaxTree

    getSourceInterval

    Methods inherited from interface org.antlr.v4.runtime.tree.Tree

    getChildCount, getPayload, toStringTree
  • Method Details

    • getParent

      ExtendedContext getParent()
      Gets the parent of this node. The parent is an ExtendedContext because in this tree all parents should be an extended context.
      Specified by:
      getParent in interface org.antlr.v4.runtime.tree.ParseTree
      Specified by:
      getParent in interface org.antlr.v4.runtime.tree.Tree
    • omitTokens

      void omitTokens()
      Omits the tokens this node encompasses from the next local root. For terminal nodes this is always at least the parent's local root. Other nodes may be their own local root.