Package org.ek9lang.compiler.phase3
Class ForRangeOrError
java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.common.TypedSymbolAccess
org.ek9lang.compiler.phase3.ForRangeOrError
- All Implemented Interfaces:
Consumer<EK9Parser.ForRangeContext>
final class ForRangeOrError
extends TypedSymbolAccess
implements Consumer<EK9Parser.ForRangeContext>
Pulls the type from the 'range' into the loop variable, so it is correctly typed or emits an error.
Also checks that if the 'by' literal or identifier is used that the type is compatible with the range.
-
Field Summary
Fields inherited from class org.ek9lang.compiler.common.RuleSupport
errorListener, symbolsAndScopes
-
Constructor Summary
ConstructorDescriptionForRangeOrError
(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) Check range expressions and record an expression for the type. -
Method Summary
Methods inherited from class org.ek9lang.compiler.common.TypedSymbolAccess
getRecordedAndTypedSymbol, isProcessingScopePure, recordATypedSymbol
-
Constructor Details
-
ForRangeOrError
ForRangeOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) Check range expressions and record an expression for the type.
-
-
Method Details
-
accept
- Specified by:
accept
in interfaceConsumer<EK9Parser.ForRangeContext>
-