compiler-plugin / arrow.meta.quotes.expression / AnnotatedExpression

AnnotatedExpression

class AnnotatedExpression : Scope<KtAnnotatedExpression>

””” $@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
           )
         }
       )
     }

Constructors

<init> ””” $@annotations $expression “”“.annotatedExpressionAnnotatedExpression(value: KtAnnotatedExpression?, @annotations: ScopedList<KtAnnotationEntry> = ScopedList(value?.annotationEntries.orEmpty()), expression: Scope<KtExpression> = Scope(value?.baseExpression))

Properties

@annotations val @annotations: ScopedList<KtAnnotationEntry>
expression val expression: Scope<KtExpression>
value val value: KtAnnotatedExpression?

Extension Functions

map fun <K : KtElement> Scope<K>.map(f: (K) -> K): Scope<K>
orEmpty fun <K : KtElement> Scope<K>?.orEmpty(): Scope<K>

Do you like Arrow?

Arrow Org
<