[FIR] Add FirAbstractElement as base type for all fir node implementations
This commit is contained in:
+7
-2
@@ -169,7 +169,8 @@ fun Implementation.generateCode(generationPath: String) {
|
||||
|
||||
fun Implementation.collectImports(): List<String> {
|
||||
return element.collectImportsInternal(
|
||||
listOf(element.fullQualifiedName) + usedTypes.mapNotNull { it.fullQualifiedName } + parents.mapNotNull { it.fullQualifiedName },
|
||||
listOf(element.fullQualifiedName) + usedTypes.mapNotNull { it.fullQualifiedName } + parents.mapNotNull { it.fullQualifiedName }
|
||||
+ listOfNotNull(pureAbstractElementType.fullQualifiedName?.takeIf { kind != Implementation.Kind.Interface }),
|
||||
isImpl = true
|
||||
)
|
||||
}
|
||||
@@ -272,7 +273,11 @@ fun PrintWriter.printImplementation(implementation: Implementation) {
|
||||
print(")")
|
||||
}
|
||||
|
||||
print(" : ${element.typeWithArguments}")
|
||||
print(" : ")
|
||||
if (!isInterface) {
|
||||
print("${pureAbstractElementType.type}(), ")
|
||||
}
|
||||
print(element.typeWithArguments)
|
||||
parents.forEach {
|
||||
print(", ${it.typeWithArguments}")
|
||||
}
|
||||
|
||||
+3
-1
@@ -59,4 +59,6 @@ val compositeTransformResultType = type("fir.visitors", "CompositeTransformResul
|
||||
val abstractFirBasedSymbolType = type("fir.symbols", "AbstractFirBasedSymbol")
|
||||
val backingFieldSymbolType = type("fir.symbols.impl", "FirBackingFieldSymbol")
|
||||
val delegateFieldSymbolType = type("fir.symbols.impl", "FirDelegateFieldSymbol")
|
||||
val classSymbolType = type("fir.symbols.impl", "FirClassSymbol")
|
||||
val classSymbolType = type("fir.symbols.impl", "FirClassSymbol")
|
||||
|
||||
val pureAbstractElementType = generatedType("FirPureAbstractElement")
|
||||
Reference in New Issue
Block a user