Skip to content

Commit

Permalink
[FIR] Make DEFAULT positioning strategy public, drop duplicated one
Browse files Browse the repository at this point in the history
  • Loading branch information
mglukhikh committed Nov 26, 2020
1 parent 97c1a3f commit d4b0bf4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down

0 comments on commit d4b0bf4

Please sign in to comment.