Package org.ek9lang.compiler.phase3
Class ProcessWhileControlVariable
java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.common.TypedSymbolAccess
org.ek9lang.compiler.phase3.ProcessWhileControlVariable
- All Implemented Interfaces:
Consumer<EK9Parser.WhileStatementExpressionContext>
final class ProcessWhileControlVariable
extends TypedSymbolAccess
implements Consumer<EK9Parser.WhileStatementExpressionContext>
Deals with checking the 'while' or 'do/while control variable in the statement/expression.
There is a check on an identifier for 'IdentifierAssignmentOrError' an assignment.
This resets the 'referenced' flag on the variable. So for loop variables we must
make a note that this is a loop variable to stop this resetting. Otherwise, it looks
like the variable is not checked 'after' assignment.
-
Field Summary
Fields inherited from class org.ek9lang.compiler.common.RuleSupport
errorListener, symbolsAndScopes
-
Constructor Summary
ConstructorDescriptionProcessWhileControlVariable
(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) -
Method Summary
Methods inherited from class org.ek9lang.compiler.common.TypedSymbolAccess
getRecordedAndTypedSymbol, isProcessingScopePure, recordATypedSymbol
-
Constructor Details
-
ProcessWhileControlVariable
ProcessWhileControlVariable(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener)
-
-
Method Details
-
accept
- Specified by:
accept
in interfaceConsumer<EK9Parser.WhileStatementExpressionContext>
-