[FIR] Start enum entries reworking
This commit is contained in:
committed by
Mikhail Glukhikh
parent
68d64f1b5c
commit
13132e69a3
-1
@@ -45,7 +45,6 @@ object FirTreeBuilder : AbstractFirTreeBuilder() {
|
||||
val regularClass = element("RegularClass", Declaration, memberDeclaration, typeParametersOwner, klass)
|
||||
val sealedClass = element("SealedClass", Declaration, regularClass)
|
||||
val typeAlias = element("TypeAlias", Declaration, classLikeDeclaration, memberDeclaration, typeParametersOwner)
|
||||
val enumEntry = element("EnumEntry", Declaration, regularClass)
|
||||
|
||||
val function = element("Function", Declaration, callableDeclaration, controlFlowGraphOwner, targetElement, annotationContainer, typeParametersOwner, statement)
|
||||
|
||||
|
||||
-19
@@ -67,27 +67,8 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
|
||||
|
||||
impl(anonymousObject) {
|
||||
parents += modifiableClass.withArg(anonymousObject)
|
||||
default("classKind") {
|
||||
value = "ClassKind.OBJECT"
|
||||
withGetter = true
|
||||
}
|
||||
}
|
||||
|
||||
impl(enumEntry) {
|
||||
parents += modifiableClass.withArg(regularClass)
|
||||
parents += modifiableTypeParametersOwner
|
||||
default("status", "FirDeclarationStatusImpl(Visibilities.UNKNOWN, Modality.FINAL)")
|
||||
default("classKind") {
|
||||
value = "ClassKind.ENUM_ENTRY"
|
||||
withGetter = true
|
||||
}
|
||||
default("companionObject") {
|
||||
value = "null"
|
||||
withGetter = true
|
||||
}
|
||||
default("typeRef", "session.builtinTypes.enumType")
|
||||
useTypes(visibilitiesType, modalityType)
|
||||
}
|
||||
|
||||
impl(typeAlias) {
|
||||
parents += modifiableTypeParametersOwner
|
||||
|
||||
-5
@@ -243,11 +243,6 @@ object NodeConfigurator : AbstractFieldConfigurator() {
|
||||
+annotations
|
||||
}
|
||||
|
||||
enumEntry.configure {
|
||||
+arguments.withTransform()
|
||||
+field(typeRef)
|
||||
}
|
||||
|
||||
anonymousFunction.configure {
|
||||
parentArg(function, "F", anonymousFunction)
|
||||
+symbol("FirAnonymousFunctionSymbol")
|
||||
|
||||
Reference in New Issue
Block a user