Class ClassDfnGenerator
java.lang.Object
org.ek9lang.compiler.phase7.AbstractDfnGenerator
org.ek9lang.compiler.phase7.AggregateDfnGenerator
org.ek9lang.compiler.phase7.ClassDfnGenerator
- All Implemented Interfaces:
Function<EK9Parser.ClassDeclarationContext, IRConstruct>
final class ClassDfnGenerator
extends AggregateDfnGenerator
implements Function<EK9Parser.ClassDeclarationContext, IRConstruct>
Creates the appropriate IR Construct for a class declaration.
Deals with the following ANTLR grammar.
classDeclaration : Identifier extendDeclaration? (traitPreamble traitsList)? (AS? (ABSTRACT | OPEN))? aggregateParts? | Identifier parameterisedParams (AS? (ABSTRACT | OPEN))? aggregateParts ;
The key part here is that you can use the 'ctx' to look up the class aggregate. For generic type use with parameterisation this will still be an aggregate (but with the appropriate configuration).
-
Field Summary
Fields inherited from class AbstractDfnGenerator
notImplicitSuper, operationDfnGenerator, stackContext, voidStr
-
Constructor Summary
ConstructorsConstructorDescriptionClassDfnGenerator
(IRGenerationContext stackContext) Constructor using stack context - the single source of state. -
Method Summary
Methods inherited from class AggregateDfnGenerator
createFieldDeclarations, createInitializationOperations, createOperationsForAggregateParts, processAggregate
Methods inherited from class AbstractDfnGenerator
createCallMetaDataExtractor, createDebugInfoCreator, createInitOperation, createInstanceInitOperation, getParsedModule, newPerConstructContext, newSyntheticInitOperation, processAsMethodOrOperator, processPropertiesForInstanceInit, processSyntheticConstructor
-
Constructor Details
-
ClassDfnGenerator
ClassDfnGenerator(IRGenerationContext stackContext) Constructor using stack context - the single source of state.
-
-
Method Details
-
apply
- Specified by:
apply
in interfaceFunction<EK9Parser.ClassDeclarationContext, IRConstruct>
-