Class VariableOnlyDeclInstrGenerator
java.lang.Object
org.ek9lang.compiler.phase7.generator.AbstractGenerator
org.ek9lang.compiler.phase7.generator.VariableOnlyDeclInstrGenerator
- All Implemented Interfaces:
Function<EK9Parser.VariableOnlyDeclarationContext,
List<IRInstr>>
public final class VariableOnlyDeclInstrGenerator
extends AbstractGenerator
implements Function<EK9Parser.VariableOnlyDeclarationContext,List<IRInstr>>
Creates IR instructions for variable only declarations.
Uses REFERENCE instructions for all variables - backend handles storage allocation.
STACK-BASED: Now uses IRGenerationContext for scope management instead of parameter threading.
-
Field Summary
Fields inherited from class org.ek9lang.compiler.phase7.generator.AbstractGenerator
debugInfoCreator, instructionBuilder, stackContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGenerate IR instructions for variable only declaration.Methods inherited from class org.ek9lang.compiler.phase7.generator.AbstractGenerator
extractCallMetaData, getRecordedSymbolOrException
-
Constructor Details
-
VariableOnlyDeclInstrGenerator
-
-
Method Details
-
apply
Generate IR instructions for variable only declaration. Example: someVar as String? Generates: REFERENCE only (no assignment) STACK-BASED: Gets scope ID from stack context instead of parameter threading.- Specified by:
apply
in interfaceFunction<EK9Parser.VariableOnlyDeclarationContext,
List<IRInstr>>
-