Class SmallestExpression
java.lang.Object
org.ek9lang.compiler.repair.expressions.SmallestExpression
- All Implemented Interfaces:
BiFunction<org.antlr.v4.runtime.tree.ParseTree, Predicate<EK9Parser.ExpressionContext>, EK9Parser.ExpressionContext>
final class SmallestExpression
extends Object
implements BiFunction<org.antlr.v4.runtime.tree.ParseTree, Predicate<EK9Parser.ExpressionContext>, EK9Parser.ExpressionContext>
THE walk every string-expression finder shares: the smallest
EK9Parser.ExpressionContext under a root that
passes a test, or null. Depth first, children in order; a match replaces the best so far only when its span is
strictly within it (IsSmallerSpan). (Was four copies of the same loop in StringExpressionClassifier,
differing only in the test.)-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(org.antlr.v4.runtime.tree.ParseTree root, Predicate<EK9Parser.ExpressionContext> matches) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiFunction
andThen
-
Constructor Details
-
SmallestExpression
SmallestExpression()
-
-
Method Details
-
apply
public EK9Parser.ExpressionContext apply(org.antlr.v4.runtime.tree.ParseTree root, Predicate<EK9Parser.ExpressionContext> matches) - Specified by:
applyin interfaceBiFunction<org.antlr.v4.runtime.tree.ParseTree, Predicate<EK9Parser.ExpressionContext>, EK9Parser.ExpressionContext>
-