Class VariableOnlyDeclInstrGenerator
java.lang.Object
org.ek9lang.compiler.phase7.AbstractGenerator
org.ek9lang.compiler.phase7.AbstractVariableDeclGenerator
org.ek9lang.compiler.phase7.VariableOnlyDeclInstrGenerator
- All Implemented Interfaces:
BiFunction<EK9Parser.VariableOnlyDeclarationContext,
String, List<IRInstr>>
final class VariableOnlyDeclInstrGenerator
extends AbstractVariableDeclGenerator
implements BiFunction<EK9Parser.VariableOnlyDeclarationContext,String,List<IRInstr>>
Creates IR instructions for variable only declarations.
Uses REFERENCE instructions for all variables - backend handles storage allocation.
-
Field Summary
Fields inherited from class org.ek9lang.compiler.phase7.AbstractGenerator
context, debugInfoCreator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply
(EK9Parser.VariableOnlyDeclarationContext ctx, String scopeId) Generate IR instructions for variable only declaration.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
-
VariableOnlyDeclInstrGenerator
VariableOnlyDeclInstrGenerator(IRContext context)
-
-
Method Details
-
apply
Generate IR instructions for variable only declaration. Example: someVar as String? Generates: REFERENCE only (no assignment)- Specified by:
apply
in interfaceBiFunction<EK9Parser.VariableOnlyDeclarationContext,
String, List<IRInstr>>
-