compiler-plugin / arrow.meta.quotes / Transform / Remove
data class Remove<out K : KtElement> :
Transform
<K>
A Transform that removes declarations from a specific element in the AST. See below:
import arrow.meta.Meta
import arrow.meta.CliPlugin
import arrow.meta.invoke
import arrow.meta.quotes.Transform
import arrow.meta.quotes.namedFunction
val Meta.replacePlugin: CliPlugin
get() =
"Remove Transform" {
meta(
namedFunction(this, { element.name == "helloWorld" }) { (c, _) ->
Transform.remove(
removeIn = c,
declaration = """ println("") """.expressionIn(c)
)
}
)
}
removing
- is the element context
declarations
- are the elements that should be removed
<init> | A Transform that removes declarations from a specific element in the AST. See below:Remove(removing: PsiElement, declarations: List < Scope <KtExpressionCodeFragment>> = listOf()) |
declarations | are the elements that should be removedval declarations: List < Scope <KtExpressionCodeFragment>> |
removing | is the element contextval removing: PsiElement |
Do you like Arrow?
✖