Package org.ek9lang.compiler.phase3
Class CaseExpressionOrError
java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.common.TypedSymbolAccess
org.ek9lang.compiler.phase3.CaseExpressionOrError
- All Implemented Interfaces:
Consumer<EK9Parser.CaseExpressionContext>
final class CaseExpressionOrError
extends TypedSymbolAccess
implements Consumer<EK9Parser.CaseExpressionContext>
Just checks and records the appropriate type for the case expression, based on how it is used.
This will be important for full switch type checks. Given the operator type in each of the case parts the
operator must exit on the type being switched against.
-
Field Summary
Fields inherited from class org.ek9lang.compiler.common.RuleSupport
errorListener, symbolsAndScopes
-
Constructor Summary
ConstructorDescriptionCaseExpressionOrError
(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Need to ensure each or any of these has a type and record it against this context.Methods inherited from class org.ek9lang.compiler.common.TypedSymbolAccess
getRecordedAndTypedSymbol, isProcessingScopePure, recordATypedSymbol
-
Constructor Details
-
CaseExpressionOrError
CaseExpressionOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener)
-
-
Method Details
-
accept
Need to ensure each or any of these has a type and record it against this context.caseExpression : call | objectAccessExpression | op=(LE | GE | GT | LT) expression | MATCHES expression | primary ;
- Specified by:
accept
in interfaceConsumer<EK9Parser.CaseExpressionContext>
-