Class BlockStmtInstrGenerator
java.lang.Object
org.ek9lang.compiler.phase7.generator.AbstractGenerator
org.ek9lang.compiler.phase7.generator.BlockStmtInstrGenerator
- All Implemented Interfaces:
Function<EK9Parser.BlockStatementContext,
List<IRInstr>>
final class BlockStmtInstrGenerator
extends AbstractGenerator
implements Function<EK9Parser.BlockStatementContext,List<IRInstr>>
Creates IR instructions for block statements.
Handles variable declarations, variable only declarations, and statements.
Deals with the following ANTLR grammar.
blockStatement : variableDeclaration | variableOnlyDeclaration | statement ;
-
Field Summary
Fields inherited from class org.ek9lang.compiler.phase7.generator.AbstractGenerator
debugInfoCreator, instructionBuilder, stackContext
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGenerate IR instructions for a block statement using stack-based scope management.Methods inherited from class org.ek9lang.compiler.phase7.generator.AbstractGenerator
extractCallMetaData, getRecordedSymbolOrException
-
Constructor Details
-
BlockStmtInstrGenerator
BlockStmtInstrGenerator(IRGenerationContext stackContext)
-
-
Method Details
-
apply
Generate IR instructions for a block statement using stack-based scope management. STACK-BASED: Gets scope ID from stack context instead of parameter threading.- Specified by:
apply
in interfaceFunction<EK9Parser.BlockStatementContext,
List<IRInstr>>
-