Add infrastructure for Native-specific frontend diagnostics

This commit is contained in:
Svyatoslav Scherbina
2020-02-03 11:20:01 +03:00
parent 1f97ae1084
commit e699965ed6
4 changed files with 38 additions and 2 deletions
@@ -0,0 +1,19 @@
/*
* Copyright 2010-2020 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.resolve.konan.diagnostics
import org.jetbrains.kotlin.diagnostics.rendering.DefaultErrorMessages
import org.jetbrains.kotlin.diagnostics.rendering.DiagnosticFactoryToRendererMap
private val DIAGNOSTIC_FACTORY_TO_RENDERER by lazy {
DiagnosticFactoryToRendererMap("Native").apply {
}
}
class DefaultErrorMessagesNative : DefaultErrorMessages.Extension {
override fun getMap(): DiagnosticFactoryToRendererMap = DIAGNOSTIC_FACTORY_TO_RENDERER
}
@@ -0,0 +1,15 @@
/*
* Copyright 2010-2020 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.resolve.konan.diagnostics
import org.jetbrains.kotlin.diagnostics.Errors
object ErrorsNative {
init {
Errors.Initializer.initializeFactoryNames(ErrorsNative::class.java)
}
}