Class VariableDeclCreator
java.lang.Object
org.ek9lang.compiler.phase7.VariableDeclCreator
- All Implemented Interfaces:
Function<EK9Parser.VariableDeclarationContext,Instructions>
public class VariableDeclCreator
extends Object
implements Function<EK9Parser.VariableDeclarationContext,Instructions>
Deals with creating a set of instructions for the task of declaring a variable and assigning an initial value to it.
In EK9, this can be completed in a number of ways.
variableDeclaration
: identifier AS? typeDef QUESTION? op=(ASSIGN | ASSIGN2 | COLON | MERGE) assignmentExpression
| identifier op=LEFT_ARROW assignmentExpression
;
So, the set of 'instructions' will differ depending on the EK9 code used.
-
Constructor Details
-
VariableDeclCreator
-
-
Method Details
-
apply
- Specified by:
applyin interfaceFunction<EK9Parser.VariableDeclarationContext,Instructions>
-