Class NearestAncestorMatching

java.lang.Object
org.ek9lang.compiler.support.trees.NearestAncestorMatching

public final class NearestAncestorMatching extends Object
THE ascent to the nearest strict ancestor that satisfies a test, with a boundary. Never a private while (node != null) ascent. Hold one.
  • Constructor Details

    • NearestAncestorMatching

      public NearestAncestorMatching()
  • Method Details

    • find

      public org.antlr.v4.runtime.tree.ParseTree find(org.antlr.v4.runtime.tree.ParseTree from, Predicate<org.antlr.v4.runtime.tree.ParseTree> target, Predicate<org.antlr.v4.runtime.tree.ParseTree> stopAt)
      The nearest strict ancestor of from that satisfies target, or null. An ancestor that satisfies stopAt ends the ascent (null) before it is offered to target.