Class StmtInstrGenerator
java.lang.Object
org.ek9lang.compiler.phase7.StmtInstrGenerator
- All Implemented Interfaces:
BiFunction<EK9Parser.StatementContext,
String, List<IRInstr>>
final class StmtInstrGenerator
extends Object
implements BiFunction<EK9Parser.StatementContext,String,List<IRInstr>>
Creates IR instructions for statements.
Generates new BasicBlock IR (IRInstructions).
From the ANTLR grammar this has to support the following:
statement : ifStatement | assertStatement | assignmentStatement | identifierReference op=(INC | DEC) | call | throwStatement | objectAccessExpression | switchStatementExpression | tryStatementExpression | whileStatementExpression | forStatementExpression | streamStatement ;
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply
(EK9Parser.StatementContext ctx, String scopeId) Generate IR instructions for a statement.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
-
StmtInstrGenerator
StmtInstrGenerator(IRContext context)
-
-
Method Details
-
apply
Generate IR instructions for a statement.- Specified by:
apply
in interfaceBiFunction<EK9Parser.StatementContext,
String, List<IRInstr>>
-