Package org.ek9lang.compiler.phase1
Class ProcessVariableOnlyOrError
java.lang.Object
org.ek9lang.compiler.phase1.ProcessVariableOnlyOrError
- All Implemented Interfaces:
BiConsumer<EK9Parser.VariableOnlyDeclarationContext,
VariableSymbol>
final class ProcessVariableOnlyOrError
extends Object
implements BiConsumer<EK9Parser.VariableOnlyDeclarationContext,VariableSymbol>
Checks on whether the '?' can be used as a modifier
then check the parent of this context. Error if developer has; must state that this variable can be
uninitialised.
For incoming parameters it is not appropriate to use '!', '?'.
For a returning parameter it is not appropriate to use '!' i.e. injection nor a web correlation.
For aggregate properties and block statements one of ! or ? is needed, but web correlation is not allowed.
Note that this does modify the variable and mark it up in various ways.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(EK9Parser.VariableOnlyDeclarationContext ctx, VariableSymbol variableSymbol) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.function.BiConsumer
andThen
-
Constructor Details
-
ProcessVariableOnlyOrError
ProcessVariableOnlyOrError(ErrorListener errorListener)
-
-
Method Details
-
accept
- Specified by:
accept
in interfaceBiConsumer<EK9Parser.VariableOnlyDeclarationContext,
VariableSymbol>
-