main.seskar.compiler.value.diagnostic.ValueError.kt Maven / Gradle / Ivy
package seskar.compiler.value.diagnostic
import org.jetbrains.kotlin.diagnostics.DiagnosticFactory0
import org.jetbrains.kotlin.diagnostics.Errors
import org.jetbrains.kotlin.diagnostics.Severity.ERROR
import org.jetbrains.kotlin.psi.KtClassOrObject
import org.jetbrains.kotlin.psi.KtElement
import kotlin.reflect.KClass
private fun errorDiagnosticFactory(): DiagnosticFactory0 =
DiagnosticFactory0.create(ERROR)
private fun initialize(klass: KClass<*>) {
Errors.Initializer.initializeFactoryNamesAndDefaultErrorMessages(klass.java, ValueMessagesExtension)
}
internal object ValueErrors {
@JvmField
val NULLABLE_JS_VALUE: DiagnosticFactory0 =
errorDiagnosticFactory()
@JvmField
val INVALID_JS_VALUE_TYPE: DiagnosticFactory0 =
errorDiagnosticFactory()
init {
initialize(ValueErrors::class)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy