Class GrandParent

java.lang.Object
org.ek9lang.compiler.support.trees.GrandParent
All Implemented Interfaces:
Function<org.antlr.v4.runtime.tree.ParseTree, org.antlr.v4.runtime.tree.ParseTree>, UnaryOperator<org.antlr.v4.runtime.tree.ParseTree>

public final class GrandParent extends Object implements UnaryOperator<org.antlr.v4.runtime.tree.ParseTree>
THE parent's parent of a parse-tree node, or null when either is missing. For a member (method, operator, property, default operator) this is the construct that declares it: member -> aggregateParts -> class/trait/record/... Never a hand-written getParent().getParent() chain. Hold one and apply it.
  • Constructor Details

    • GrandParent

      public GrandParent()
  • Method Details

    • apply

      public org.antlr.v4.runtime.tree.ParseTree apply(org.antlr.v4.runtime.tree.ParseTree node)
      Specified by:
      apply in interface Function<org.antlr.v4.runtime.tree.ParseTree, org.antlr.v4.runtime.tree.ParseTree>
    • apply

      public org.antlr.v4.runtime.ParserRuleContext apply(org.antlr.v4.runtime.ParserRuleContext node)
      As apply(ParseTree), keeping the rule-context type for callers that read its tokens.