Package org.ek9lang.compiler.phase5
Class PossibleExpressionConstruct
java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.common.TypedSymbolAccess
org.ek9lang.compiler.phase5.PossibleExpressionConstruct
- Direct Known Subclasses:
ForStatementOrError
,SwitchStatementOrError
,TryStatementOrError
,WhileStatementOrError
Used as a base for a range of constructs that can be expressions.
-
Field Summary
Fields inherited from class org.ek9lang.compiler.common.RuleSupport
errorListener, symbolsAndScopes
-
Constructor Summary
ModifierConstructorDescriptionprotected
PossibleExpressionConstruct
(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
isVariableInitialisedInScopes
(CodeFlowAnalyzer analyzer, ISymbol variable, List<IScope> scopes) protected void
processPossibleGuardInitialisation
(CodeFlowAnalyzer analyzer, ISymbol guardVariable, org.antlr.v4.runtime.ParserRuleContext ctx) Now when there is a preflow control, it may mean that a variable is initialised.protected void
pullUpAcceptableCriteriaToHigherScope
(CodeFlowAnalyzer analyzer, List<IScope> allAppropriateBlocks, IScope outerScope) protected void
returningVariableValidOrError
(EK9Parser.ReturningParamContext ctx, IScope constructScope, boolean noGuardExpression) Methods inherited from class org.ek9lang.compiler.common.TypedSymbolAccess
getRecordedAndTypedSymbol, isProcessingScopePure, recordATypedSymbol
-
Constructor Details
-
PossibleExpressionConstruct
protected PossibleExpressionConstruct(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener)
-
-
Method Details
-
isVariableInitialisedInScopes
protected boolean isVariableInitialisedInScopes(CodeFlowAnalyzer analyzer, ISymbol variable, List<IScope> scopes) -
getGuardExpressionVariable
-
getGuardExpressionVariable
-
processPossibleGuardInitialisation
protected void processPossibleGuardInitialisation(CodeFlowAnalyzer analyzer, ISymbol guardVariable, org.antlr.v4.runtime.ParserRuleContext ctx) Now when there is a preflow control, it may mean that a variable is initialised. -
pullUpAcceptableCriteriaToHigherScope
protected void pullUpAcceptableCriteriaToHigherScope(CodeFlowAnalyzer analyzer, List<IScope> allAppropriateBlocks, IScope outerScope) -
returningVariableValidOrError
protected void returningVariableValidOrError(EK9Parser.ReturningParamContext ctx, IScope constructScope, boolean noGuardExpression)
-