Class RangeOrError
java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.common.TypedSymbolAccess
org.ek9lang.compiler.phase3.RangeOrError
- All Implemented Interfaces:
Consumer<EK9Parser.RangeContext>
Checks the Range and ensures that there a Symbol recorded against that context.
Then if types are present on the two parts of the range it will check those types
and/or issue errors if they are incompatible.
-
Field Summary
Fields inherited from class RuleSupport
errorListener, symbolsAndScopes -
Constructor Summary
ConstructorsConstructorDescriptionRangeOrError(SymbolsAndScopes symbolsAndScopes, SymbolFactory symbolFactory, ErrorListener errorListener) Check range expressions and record an expression for the type. -
Method Summary
Modifier and TypeMethodDescriptionvoid(package private) ISymbolThe range ofx in a ... b: the start israngeFromand the end isrightof the comparison alternative (the range form shares that level, so its end binds like any comparison operand - PRECEDENCE (4), Steve 2026-10-07).Methods inherited from class TypedSymbolAccess
emitTypeNotResolvedError, getRecordedAndTypedSymbol, isProcessingScopePure, recordATypedSymbol
-
Constructor Details
-
RangeOrError
RangeOrError(SymbolsAndScopes symbolsAndScopes, SymbolFactory symbolFactory, ErrorListener errorListener) Check range expressions and record an expression for the type.
-
-
Method Details
-
accept
- Specified by:
acceptin interfaceConsumer<EK9Parser.RangeContext>
-
inRangeOf
The range ofx in a ... b: the start israngeFromand the end isrightof the comparison alternative (the range form shares that level, so its end binds like any comparison operand - PRECEDENCE (4), Steve 2026-10-07). There is no range context to record it against - the expression records its Boolean - so an untyped range is reported here, exactly asaccept(EK9Parser.RangeContext)reports it for a for-range.
-