Class CalleeOfExpression
java.lang.Object
org.ek9lang.compiler.support.retention.CalleeOfExpression
- All Implemented Interfaces:
BiFunction<EK9Parser.ExpressionContext, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>, Optional<ScopedSymbol>>
public final class CalleeOfExpression
extends Object
implements BiFunction<EK9Parser.ExpressionContext, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>, Optional<ScopedSymbol>>
THE method, operator or function an expression CALLS when the whole expression is that call -
a.get(k),
first(), a + b, (a.get(k)) - so its value is whatever the call handed back. Empty for a
literal, an identifier, a constructor, a dynamic function, a list or dict literal and the control forms.
The second argument is the recorded-symbol lookup of the phase asking (symbolsAndScopes or parsedModule).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(EK9Parser.ExpressionContext expression, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol> recorded) The callee of the expression.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiFunction
andThen
-
Constructor Details
-
CalleeOfExpression
public CalleeOfExpression()
-
-
Method Details
-
apply
public Optional<ScopedSymbol> apply(EK9Parser.ExpressionContext expression, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol> recorded) The callee of the expression.- Specified by:
applyin interfaceBiFunction<EK9Parser.ExpressionContext, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>, Optional<ScopedSymbol>>- Parameters:
expression- the expression, as the compiler parsed itrecorded- the recorded-symbol lookup of the phase asking (symbolsAndScopes or parsedModule)
-