Class 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).