Class AbstractVariableDeclGenerator
java.lang.Object
org.ek9lang.compiler.phase7.generator.AbstractGenerator
org.ek9lang.compiler.phase7.generator.AbstractVariableDeclGenerator
- Direct Known Subclasses:
VariableDeclInstrGenerator, VariableOnlyDeclInstrGenerator
Pulls out the common code for variable and variable-only declarations. DRY.
-
Field Summary
Fields inherited from class AbstractGenerator
stackContext, symbolTypeOrException, typeNameOrException, variableNameForIR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDeclInstrs(org.antlr.v4.runtime.tree.ParseTree ctx, String owner) The declaration of a variable owned byowner- the declaring scope for a local, the CALLER for the returning variable (OwnershipStatements.declaredSlot(String, String, String, DebugInfo)).
-
Constructor Details
-
AbstractVariableDeclGenerator
AbstractVariableDeclGenerator(IRGenerationContext stackContext)
-
-
Method Details
-
getDeclInstrs
The declaration of a variable owned byowner- the declaring scope for a local, the CALLER for the returning variable (OwnershipStatements.declaredSlot(String, String, String, DebugInfo)). A nullowneris the variable's own: the OBJECT for a property, the CALLER for a parameter or a returning variable; null (not stated here) for anything else.
-