Package org.ek9lang.compiler.phase5
Class SwitchStatementOrError
java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.common.TypedSymbolAccess
org.ek9lang.compiler.phase5.PossibleExpressionConstruct
org.ek9lang.compiler.phase5.SwitchStatementOrError
- All Implemented Interfaces:
Consumer<EK9Parser.SwitchStatementExpressionContext>
final class SwitchStatementOrError
extends PossibleExpressionConstruct
implements Consumer<EK9Parser.SwitchStatementExpressionContext>
Deals with checking if all paths through switch/case/default (return) result in variables meeting criteria.
If they do then the outer variable meta-data can also be marked as also meeting the criteria.
Initially, this was just were variables initialised. But now the introduction of CodeFlowAnalyzers
means that several forms of symbol analysis can take place.
-
Field Summary
Fields inherited from class org.ek9lang.compiler.common.RuleSupport
errorListener, symbolsAndScopes
-
Constructor Summary
ConstructorDescriptionSwitchStatementOrError
(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) -
Method Summary
Methods inherited from class org.ek9lang.compiler.phase5.PossibleExpressionConstruct
getGuardExpressionVariable, getGuardExpressionVariable, isVariableInitialisedInScopes, processPossibleGuardInitialisation, pullUpAcceptableCriteriaToHigherScope, returningVariableValidOrError
Methods inherited from class org.ek9lang.compiler.common.TypedSymbolAccess
getRecordedAndTypedSymbol, isProcessingScopePure, recordATypedSymbol
-
Constructor Details
-
SwitchStatementOrError
SwitchStatementOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener)
-
-
Method Details
-
accept
- Specified by:
accept
in interfaceConsumer<EK9Parser.SwitchStatementExpressionContext>
-