Class AbstractVariableDeclGenerator

java.lang.Object
org.ek9lang.compiler.phase7.generator.AbstractGenerator
org.ek9lang.compiler.phase7.generator.AbstractVariableDeclGenerator
Direct Known Subclasses:
VariableDeclInstrGenerator, VariableOnlyDeclInstrGenerator

abstract class AbstractVariableDeclGenerator extends AbstractGenerator
Pulls out the common code for variable and variable-only declarations. DRY.
  • Constructor Details

    • AbstractVariableDeclGenerator

      AbstractVariableDeclGenerator(IRGenerationContext stackContext)
  • Method Details

    • getDeclInstrs

      List<IRInstr> getDeclInstrs(org.antlr.v4.runtime.tree.ParseTree ctx, String owner)
      The declaration of a variable owned by owner - the declaring scope for a local, the CALLER for the returning variable (OwnershipStatements.declaredSlot(String, String, String, DebugInfo)). A null owner is 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.