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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(EK9Parser.VariableOnlyDeclarationContext ctx, VariableSymbol variableSymbol) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BiConsumer
andThen
-
Constructor Details
-
ProcessVariableOnlyOrError
ProcessVariableOnlyOrError(ErrorListener errorListener)
-
-
Method Details
-
accept
- Specified by:
acceptin interfaceBiConsumer<EK9Parser.VariableOnlyDeclarationContext, VariableSymbol>
-