compiler-plugin / arrow.meta.quotes.expression / AnnotatedExpression / <init>
AnnotatedExpression(value: KtAnnotatedExpression?, @annotations:
ScopedList
<KtAnnotationEntry> = ScopedList(value?.annotationEntries.orEmpty()), expression:
Scope
<KtExpression> = Scope(value?.baseExpression))
””” $@annotations
$expression “”“.annotatedExpression
A template destructuring Scope for a KtAnnotatedExpression.
import arrow.meta.Meta
import arrow.meta.CliPlugin
import arrow.meta.invoke
import arrow.meta.quotes.Transform
import arrow.meta.quotes.annotatedExpression
val Meta.reformatAnnotated: CliPlugin
get() =
"Reformat Annotated Expression" {
meta(
annotatedExpression({ true }) { expression ->
Transform.replace(
replacing = expression,
newDeclaration = """ $`@annotations` $expression """.annotatedExpression
)
}
)
}
Do you like Arrow?
✖