mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:10:43 +07:00
[uast] IJPL-181325 Promote UStringConcatenationsFacade helpers to stable
GitOrigin-RevId: a26cbdcdaabd0955ce861394f3e9feade23df7d1
This commit is contained in:
committed by
intellij-monorepo-bot
parent
2a323fba84
commit
2faedbdd53
@@ -23,7 +23,6 @@ class UStringConcatenationsFacade private constructor(private val uContext: UExp
|
||||
@ApiStatus.Experimental
|
||||
constructor(uContext: UExpression) : this(uContext, buildLazyUastOperands(uContext, false) ?: emptySequence())
|
||||
|
||||
@get:ApiStatus.Experimental
|
||||
val rootUExpression: UExpression
|
||||
get() = uContext
|
||||
|
||||
@@ -82,7 +81,6 @@ class UStringConcatenationsFacade private constructor(private val uContext: UExp
|
||||
}
|
||||
}
|
||||
|
||||
@ApiStatus.Experimental
|
||||
fun asPartiallyKnownString() : PartiallyKnownString = PartiallyKnownString(segments.map { segment ->
|
||||
segment.value?.let { value ->
|
||||
StringEntry.Known(value, segment.uExpression.sourcePsi, getSegmentInnerTextRange(segment))
|
||||
@@ -99,7 +97,6 @@ class UStringConcatenationsFacade private constructor(private val uContext: UExp
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
private fun buildLazyUastOperands(uContext: UExpression?, flatten: Boolean): Sequence<UExpression>? = when {
|
||||
uContext is UPolyadicExpression && isConcatenation(uContext) -> {
|
||||
val concatenationOperands = uContext.operands.asSequence()
|
||||
@@ -150,5 +147,4 @@ class UStringConcatenationsFacade private constructor(private val uContext: UExp
|
||||
return if (uElement is UInjectionHost) createFromUExpression(uElement, false) else createFromUExpression(uElement, true)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,7 +2,6 @@
|
||||
package org.jetbrains.uast.expressions
|
||||
|
||||
import com.intellij.psi.PsiLanguageInjectionHost
|
||||
import org.jetbrains.annotations.ApiStatus
|
||||
import org.jetbrains.uast.UExpression
|
||||
|
||||
/**
|
||||
@@ -31,7 +30,6 @@ interface UInjectionHost : UExpression {
|
||||
*
|
||||
* Also, it will include string-processing postfix-methods like `trimIndent` and `trimMargin` if any of them is used.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
fun getStringRoomExpression(): UExpression = this
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user