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)