Package org.ek9lang.compiler.phase3
Class InstructionBlockVariablesOrError
java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.common.TypedSymbolAccess
org.ek9lang.compiler.phase3.InstructionBlockVariablesOrError
- All Implemented Interfaces:
Consumer<EK9Parser.InstructionBlockContext>
final class InstructionBlockVariablesOrError
extends TypedSymbolAccess
implements Consumer<EK9Parser.InstructionBlockContext>
Checks that variable only and variable declarations have symbols that have been referenced.
This is a bit like 'golang', it is considered an error if accessed before initialising or if not used.
There are a couple of exceptions around 'injection' as that can only really be detected at runtime (hence avoid).
-
Field Summary
Fields inherited from class org.ek9lang.compiler.common.RuleSupport
errorListener, symbolsAndScopes
-
Constructor Summary
ConstructorDescriptionInstructionBlockVariablesOrError
(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) Check on references to variables in blocks. -
Method Summary
Methods inherited from class org.ek9lang.compiler.common.TypedSymbolAccess
getRecordedAndTypedSymbol, isProcessingScopePure, recordATypedSymbol
-
Constructor Details
-
InstructionBlockVariablesOrError
InstructionBlockVariablesOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) Check on references to variables in blocks.
-
-
Method Details
-
accept
- Specified by:
accept
in interfaceConsumer<EK9Parser.InstructionBlockContext>
-