[FIR] Add separate diagnostic list for JVM specific diagnostics
This commit is contained in:
committed by
teamcityserver
parent
7f18d147c1
commit
f3c58a1df7
+20
-3
@@ -15,8 +15,25 @@ import java.nio.file.Path
|
||||
object DiagnosticClassGenerator {
|
||||
fun generate(rootPath: Path, diagnosticList: DiagnosticList, packageName: String) {
|
||||
val path = getGenerationPath(rootPath.toFile(), packageName)
|
||||
KtDiagnosticClassRenderer.render(path.resolve("KtFirDiagnostics.kt"), diagnosticList, packageName)
|
||||
KtDiagnosticClassImplementationRenderer.render(path.resolve("KtFirDiagnosticsImpl.kt"), diagnosticList, packageName)
|
||||
FirDiagnosticToKtDiagnosticConverterRenderer.render(path.resolve("KtFirDataClassConverters.kt"), diagnosticList, packageName)
|
||||
KtDiagnosticClassRenderer.render(
|
||||
path.resolve("KtFirDiagnostics.kt"),
|
||||
diagnosticList,
|
||||
packageName,
|
||||
"KtFirDiagnostics"
|
||||
)
|
||||
|
||||
KtDiagnosticClassImplementationRenderer.render(
|
||||
path.resolve("KtFirDiagnosticsImpl.kt"),
|
||||
diagnosticList,
|
||||
packageName,
|
||||
"KtFirDiagnosticsImpl"
|
||||
)
|
||||
|
||||
FirDiagnosticToKtDiagnosticConverterRenderer.render(
|
||||
path.resolve("KtFirDataClassConverters.kt"),
|
||||
diagnosticList,
|
||||
packageName,
|
||||
"KtFirDataClassConverters"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ import org.jetbrains.kotlin.util.SmartPrinter
|
||||
import java.io.File
|
||||
|
||||
abstract class AbstractDiagnosticsDataClassRenderer : DiagnosticListRenderer() {
|
||||
override fun render(file: File, diagnosticList: DiagnosticList, packageName: String) {
|
||||
override fun render(file: File, diagnosticList: DiagnosticList, packageName: String, containingObjectName: String) {
|
||||
val hlDiagnosticsList = HLDiagnosticConverter.convert(diagnosticList)
|
||||
file.writeToFileUsingSmartPrinterIfFileContentChanged { render(hlDiagnosticsList, packageName) }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user