Class VariableDeclInstrGenerator
java.lang.Object
org.ek9lang.compiler.phase7.generator.AbstractGenerator
org.ek9lang.compiler.phase7.generator.AbstractVariableDeclGenerator
org.ek9lang.compiler.phase7.generator.VariableDeclInstrGenerator
- All Implemented Interfaces:
Function<EK9Parser.VariableDeclarationContext,
List<IRInstr>>
public final class VariableDeclInstrGenerator
extends AbstractVariableDeclGenerator
implements Function<EK9Parser.VariableDeclarationContext,List<IRInstr>>
Creates IR instructions for variable declarations.
Uses REFERENCE instructions for all variables - backend handles storage allocation.
-
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 declaration with assignment using stack-based scope management.Methods inherited from class org.ek9lang.compiler.phase7.generator.AbstractVariableDeclGenerator
getDeclInstrs
Methods inherited from class org.ek9lang.compiler.phase7.generator.AbstractGenerator
extractCallMetaData, getRecordedSymbolOrException
-
Constructor Details
-
VariableDeclInstrGenerator
-
-
Method Details
-
apply
Generate IR instructions for variable declaration with assignment using stack-based scope management. Example: stdout <- Stdout() Generates: REFERENCE + assignment processing STACK-BASED: Gets scope ID from stack context instead of parameter threading.- Specified by:
apply
in interfaceFunction<EK9Parser.VariableDeclarationContext,
List<IRInstr>>
-