Class MayBeExistingObjectByShape
java.lang.Object
org.ek9lang.compiler.support.sharing.MayBeExistingObjectByShape
- All Implemented Interfaces:
BiPredicate<EK9Parser.ExpressionContext, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>>
public final class MayBeExistingObjectByShape
extends Object
implements BiPredicate<EK9Parser.ExpressionContext, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>>
Is the expression, looking through parentheses, of a SHAPE whose value may be an object that already exists -
a variable,
this/super, a call, or a coalescing operator or ternary (whose result IS one of its
operands) - so only MayBeExistingObject, once phase 5 has derived the RETAINS of the program's own
callables, can say whether it is. Phase 3 defers its E08090 verdict on exactly these shapes; anything else (a
literal, a constructor call, a list or dict literal) is fresh and keeps its verdict there.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleantest(EK9Parser.ExpressionContext expression, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol> recorded) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiPredicate
and, negate, or
-
Constructor Details
-
MayBeExistingObjectByShape
public MayBeExistingObjectByShape()
-
-
Method Details
-
test
public boolean test(EK9Parser.ExpressionContext expression, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol> recorded) - Specified by:
testin interfaceBiPredicate<EK9Parser.ExpressionContext, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>>
-