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.)