Class OccurrenceUse
java.lang.Object
org.ek9lang.compiler.support.sharing.OccurrenceUse
- All Implemented Interfaces:
BiFunction<EK9Parser.IdentifierContext, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>, Optional<ObjectSharing.Use>>
final class OccurrenceUse
extends Object
implements BiFunction<EK9Parser.IdentifierContext, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>, Optional<ObjectSharing.Use>>
What
occurrence - an identifier the compiler bound to a symbol - does to the object it names; empty when
it only reads it, or stores a new object in it. The first part of ObjectSharing's answer.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(EK9Parser.IdentifierContext occurrence, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol> recorded) The effect of one occurrence.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiFunction
andThen
-
Constructor Details
-
OccurrenceUse
OccurrenceUse()
-
-
Method Details
-
apply
public Optional<ObjectSharing.Use> apply(EK9Parser.IdentifierContext occurrence, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol> recorded) The effect of one occurrence.- Specified by:
applyin interfaceBiFunction<EK9Parser.IdentifierContext, Function<org.antlr.v4.runtime.tree.ParseTree, ISymbol>, Optional<ObjectSharing.Use>>- Parameters:
occurrence- the identifier (asRecordedSymbols.Reference.node())recorded- the recorded-symbol lookup of the phase asking (symbolsAndScopes or parsedModule)
-