Class ObjectAccessChain
java.lang.Object
org.ek9lang.compiler.support.ObjectAccessChain
THE shared structural analysis for an
objectAccessExpression chain — use this, do not
re-derive the walk.
Grammar:
objectAccessExpression : objectAccessStart objectAccess objectAccess : objectAccessType objectAccess? // RECURSIVE objectAccessType : DOT (identifier | operationCall)
Used both by phase 3 (AssignmentStatementOrError, to reject a simple/guarded assignment
whose target is a method-call result — E07895) and by phase 7
(AssignmentStmtGenerator, to route a mutating-operator assignment on a call result to the
correct lowering). Keeping the walk in one place prevents the two from drifting.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanTrue when the final step of the object-access chain is a method/operation call rather than a plain field identifier — e.g.
-
Method Details
-
endsWithOperationCall
True when the final step of the object-access chain is a method/operation call rather than a plain field identifier — e.g.repository.items()(ends in a call) versusconfig.host(ends in a field). A chain ending in a call has no field lvalue to STORE to; only a mutating operator (which mutates the object the call returns) is meaningful on it.
-