Class IfStatementGenerator
java.lang.Object
org.ek9lang.compiler.phase7.generator.AbstractGenerator
org.ek9lang.compiler.phase7.generator.IfStatementGenerator
- All Implemented Interfaces:
Function<EK9Parser.IfStatementContext, List<IRInstr>>
public final class IfStatementGenerator
extends AbstractGenerator
implements Function<EK9Parser.IfStatementContext, List<IRInstr>>
Generates IR for if/else statements using CONTROL_FLOW_CHAIN.
Uses GeneratorSet pattern for dependency injection.
Transforms EK9 if statements into CONTROL_FLOW_CHAIN instructions that work equally well for JVM (stack-based) and LLVM (SSA-based) backends.
-
Field Summary
Fields inherited from class AbstractGenerator
debugInfoCreator, instructionBuilder, stackContext -
Constructor Summary
ConstructorsConstructorDescriptionIfStatementGenerator(IRGenerationContext stackContext, GeneratorSet generators) -
Method Summary
Methods inherited from class AbstractGenerator
createTempVariable, getRecordedSymbolOrException
-
Constructor Details
-
IfStatementGenerator
-
-
Method Details
-
apply
- Specified by:
applyin interfaceFunction<EK9Parser.IfStatementContext, List<IRInstr>>
-