Class IdentifierAsPropertyOrError
java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.common.TypedSymbolAccess
org.ek9lang.compiler.phase5.IdentifierAsPropertyOrError
- All Implemented Interfaces:
Consumer<EK9Parser.IdentifierContext>
public class IdentifierAsPropertyOrError
extends TypedSymbolAccess
implements Consumer<EK9Parser.IdentifierContext>
Given an identifier, this consumer checks if it is a property of some aggregate.
If so it then process the safe access methods to check that a property when not initialised
during declaration can be safely accessed within a method body.
-
Field Summary
Fields inherited from class RuleSupport
errorListener, symbolsAndScopes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedIdentifierAsPropertyOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidThe assignment statement has been evaluated: the properties it set are now safe for the rest of this flow.(package private) static booleanTrue if the property is reached through some object other than this one: 'from.name', or 'this.partner.value'.Methods inherited from class TypedSymbolAccess
emitTypeNotResolvedError, getRecordedAndTypedSymbol, isAlreadyInError, isProcessingScopePure, recordATypedSymbol
-
Constructor Details
-
IdentifierAsPropertyOrError
protected IdentifierAsPropertyOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener)
-
-
Method Details
-
accept
- Specified by:
acceptin interfaceConsumer<EK9Parser.IdentifierContext>
-
assignmentCompleted
The assignment statement has been evaluated: the properties it set are now safe for the rest of this flow. -
isOnAnotherObject
True if the property is reached through some object other than this one: 'from.name', or 'this.partner.value'. Only a first member after 'this' - or no receiver at all - is this object's own property. Shared withObjectUsedBeforeConstructedOrError, which asks the same question of a read in a construction call.
-