[FIR] Make DEFAULT positioning strategy public, drop duplicated one
This commit is contained in:
+1
-1
@@ -17,7 +17,7 @@ import org.jetbrains.kotlin.lexer.KtTokens
|
||||
import org.jetbrains.kotlin.psi.KtParameter.VAL_VAR_TOKEN_SET
|
||||
|
||||
object LightTreePositioningStrategies {
|
||||
internal val DEFAULT = object : LightTreePositioningStrategy() {
|
||||
val DEFAULT = object : LightTreePositioningStrategy() {
|
||||
override fun mark(node: LighterASTNode, tree: FlyweightCapableTreeStructure<LighterASTNode>): List<TextRange> {
|
||||
when (node.tokenType) {
|
||||
KtNodeTypes.OBJECT_DECLARATION -> {
|
||||
|
||||
-4
@@ -27,10 +27,6 @@ open class LightTreePositioningStrategy {
|
||||
open fun isValid(node: LighterASTNode, tree: FlyweightCapableTreeStructure<LighterASTNode>): Boolean {
|
||||
return !hasSyntaxErrors(node, tree)
|
||||
}
|
||||
|
||||
companion object {
|
||||
val DEFAULT = LightTreePositioningStrategies.DEFAULT
|
||||
}
|
||||
}
|
||||
|
||||
fun markElement(node: LighterASTNode, tree: FlyweightCapableTreeStructure<LighterASTNode>): List<TextRange> {
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ package org.jetbrains.kotlin.fir.analysis.diagnostics
|
||||
import org.jetbrains.kotlin.diagnostics.PositioningStrategies
|
||||
|
||||
object SourceElementPositioningStrategies {
|
||||
internal val DEFAULT = SourceElementPositioningStrategy(
|
||||
val DEFAULT = SourceElementPositioningStrategy(
|
||||
LightTreePositioningStrategies.DEFAULT,
|
||||
PositioningStrategies.DEFAULT
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user