Class VariableDeclInstrGenerator
java.lang.Object
org.ek9lang.compiler.phase7.AbstractGenerator
org.ek9lang.compiler.phase7.AbstractVariableDeclGenerator
org.ek9lang.compiler.phase7.VariableDeclInstrGenerator
- All Implemented Interfaces:
BiFunction<EK9Parser.VariableDeclarationContext,
String, List<IRInstr>>
final class VariableDeclInstrGenerator
extends AbstractVariableDeclGenerator
implements BiFunction<EK9Parser.VariableDeclarationContext,String,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.AbstractGenerator
context
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply
(EK9Parser.VariableDeclarationContext ctx, String scopeId) Generate IR instructions for variable declaration with assignment.Methods inherited from class org.ek9lang.compiler.phase7.AbstractVariableDeclGenerator
getDeclInstrs
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.function.BiFunction
andThen
-
Constructor Details
-
VariableDeclInstrGenerator
VariableDeclInstrGenerator(IRContext context)
-
-
Method Details
-
apply
Generate IR instructions for variable declaration with assignment. Example: stdout <- Stdout() Generates: REFERENCE + assignment processing- Specified by:
apply
in interfaceBiFunction<EK9Parser.VariableDeclarationContext,
String, List<IRInstr>>
-