Class ConstantDfnGenerator
java.lang.Object
org.ek9lang.compiler.phase7.ConstantDfnGenerator
- All Implemented Interfaces:
Function<EK9Parser.ConstantDeclarationContext, IRConstruct>
final class ConstantDfnGenerator
extends Object
implements Function<EK9Parser.ConstantDeclarationContext, IRConstruct>
Creates the appropriate IR Construct for a constant declaration.
Each constant declaration produces a single IRConstruct with one field
and a c_init operation that initializes the field from its literal value.
Phase 15 (CodeGenerationConstants) merges all constant constructs from the same
module into a single _Constants class.
-
Constructor Details
-
ConstantDfnGenerator
ConstantDfnGenerator(IRGenerationContext stackContext)
-
-
Method Details
-
apply
- Specified by:
applyin interfaceFunction<EK9Parser.ConstantDeclarationContext, IRConstruct>
-