Package org.ek9lang.compiler.phase3
Class IdentifierOrError
java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.common.TypedSymbolAccess
org.ek9lang.compiler.phase3.IdentifierOrError
- All Implemented Interfaces:
Function<EK9Parser.IdentifierContext,
ISymbol>
final class IdentifierOrError
extends TypedSymbolAccess
implements Function<EK9Parser.IdentifierContext,ISymbol>
Used for pure identifier resolution and recording. Rather than identifierReferences.
-
Field Summary
Fields inherited from class org.ek9lang.compiler.common.RuleSupport
errorListener, symbolsAndScopes
-
Constructor Summary
ConstructorDescriptionIdentifierOrError
(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) Searches for an identifier and issues an error if it is not resolved. -
Method Summary
Methods inherited from class org.ek9lang.compiler.common.TypedSymbolAccess
getRecordedAndTypedSymbol, isProcessingScopePure, recordATypedSymbol
-
Constructor Details
-
IdentifierOrError
IdentifierOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) Searches for an identifier and issues an error if it is not resolved. So identifiers are a little ambiguous unlike identifierReferences (which must be present). identifiers can be optional in some contexts (like named argument when calling methods and functions). Also in dynamic classes and functions with variable capture.
-
-
Method Details
-
apply
- Specified by:
apply
in interfaceFunction<EK9Parser.IdentifierContext,
ISymbol>
-