[FIR] introduce FirElementWithResolvePhase class and make it a base class for FirDeclaration
This commit is contained in:
+2
-1
@@ -29,7 +29,8 @@ object FirTreeBuilder : AbstractFirTreeBuilder() {
|
||||
|
||||
val contextReceiver by element(Declaration)
|
||||
|
||||
val declaration by sealedElement(Declaration, annotationContainer)
|
||||
val elementWithResolvePhase by element(Other)
|
||||
val declaration by sealedElement(Declaration, elementWithResolvePhase, annotationContainer)
|
||||
val typeParameterRefsOwner by sealedElement(Declaration)
|
||||
val typeParametersOwner by sealedElement(Declaration, typeParameterRefsOwner)
|
||||
val memberDeclaration by sealedElement(Declaration, declaration, typeParameterRefsOwner)
|
||||
|
||||
+7
-1
@@ -76,10 +76,16 @@ object NodeConfigurator : AbstractFieldConfigurator<FirTreeBuilder>(FirTreeBuild
|
||||
+field("labelNameFromTypeRef", nameType, nullable = true)
|
||||
}
|
||||
|
||||
|
||||
elementWithResolvePhase.configure {
|
||||
+field("resolvePhase", resolvePhaseType, withReplace = true).apply { isMutable = true; isVolatile = true }
|
||||
+field("moduleData", firModuleDataType)
|
||||
shouldBeAbstractClass()
|
||||
}
|
||||
|
||||
declaration.configure {
|
||||
+symbolWithPackage("fir.symbols", "FirBasedSymbol", "out FirDeclaration")
|
||||
+field("moduleData", firModuleDataType)
|
||||
+field("resolvePhase", resolvePhaseType, withReplace = true).apply { isMutable = true; isVolatile = true }
|
||||
+field("origin", declarationOriginType)
|
||||
+field("attributes", declarationAttributesType)
|
||||
shouldBeAbstractClass()
|
||||
|
||||
Reference in New Issue
Block a user