Class ForInGenerator
java.lang.Object
org.ek9lang.compiler.phase7.generator.AbstractGenerator
org.ek9lang.compiler.phase7.generator.ForInGenerator
- All Implemented Interfaces:
Function<EK9Parser.ForStatementExpressionContext, List<IRInstr>>
public final class ForInGenerator
extends AbstractGenerator
implements Function<EK9Parser.ForStatementExpressionContext, List<IRInstr>>
Generates IR for for-in loops: for item in collection.
Reuses while loop infrastructure with iterator setup.
Follows WhileStatementGenerator pattern with 4 scopes: - Outer scope (guards + iterator) - Whole loop scope - Condition iteration scope (hasNext) - Body iteration scope (next + user body)
-
Field Summary
Fields inherited from class AbstractGenerator
debugInfoCreator, instructionBuilder, stackContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMethods inherited from class AbstractGenerator
createTempVariable, getRecordedSymbolOrException
-
Constructor Details
-
ForInGenerator
ForInGenerator(IRGenerationContext stackContext, GeneratorSet generators)
-
-
Method Details
-
apply
- Specified by:
applyin interfaceFunction<EK9Parser.ForStatementExpressionContext, List<IRInstr>>
-