compiler-plugin / arrow.meta.quotes.modifierlistowner / TypeReference / <init>
TypeReference(value: KtTypeReference?, typeElement:
Scope
<KtTypeElement>? = Scope(value?.typeElement), @annotations:
ScopedList
<KtAnnotationEntry> = ScopedList(separator = " ", value = value?.annotationEntries.orEmpty()))
A template destructuring Scope for a TypeReference.
import arrow.meta.Meta
import arrow.meta.CliPlugin
import arrow.meta.invoke
import arrow.meta.quotes.Transform
import arrow.meta.quotes.typeReference
val Meta.changeTypeReference: CliPlugin
get() =
"ReformatModifier" {
meta(
typeReference(this, { true }) { modifierListOwner ->
Transform.replace(
replacing = modifierListOwner,
newDeclaration = """$`@annotations` $typeElement""".type
)
}
)
}
Do you like Arrow?
✖