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.