[analysis api] fix ISE: No conversion was found for SYNTAX

^KT-51786 fixed
This commit is contained in:
Ilya Kirillov
2022-05-09 21:50:53 +02:00
parent 6e0eba7e00
commit ecbf9cd4d5
14 changed files with 110 additions and 38 deletions
@@ -22,7 +22,10 @@ dependencies {
}
sourceSets {
"main" { projectDefault() }
"main" {
projectDefault()
java.srcDir("gen")
}
"test" { none() }
}
@@ -0,0 +1,24 @@
/*
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.fir.builder
import com.intellij.psi.PsiElement
import org.jetbrains.kotlin.diagnostics.*
import org.jetbrains.kotlin.diagnostics.rendering.RootDiagnosticRendererFactory
/*
* This file was generated automatically
* DO NOT MODIFY IT MANUALLY
*/
object FirSyntaxErrors {
// Syntax
val SYNTAX by error0<PsiElement>()
init {
RootDiagnosticRendererFactory.registerFactory(FirSyntaxErrorsDefaultMessages)
}
}
@@ -5,24 +5,11 @@
package org.jetbrains.kotlin.fir.builder
import com.intellij.psi.PsiElement
import org.jetbrains.kotlin.diagnostics.KtDiagnosticFactoryToRendererMap
import org.jetbrains.kotlin.diagnostics.error0
import org.jetbrains.kotlin.diagnostics.rendering.BaseDiagnosticRendererFactory
import org.jetbrains.kotlin.diagnostics.rendering.RootDiagnosticRendererFactory
object FirSyntaxErrors {
val SYNTAX by error0<PsiElement>()
init {
RootDiagnosticRendererFactory.registerFactory(FirSyntaxErrorsDefaultMessages)
}
}
@Suppress("unused")
object FirSyntaxErrorsDefaultMessages : BaseDiagnosticRendererFactory() {
override val MAP = KtDiagnosticFactoryToRendererMap("FIR").also { map ->
map.put(FirSyntaxErrors.SYNTAX, "Syntax error")
}