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

DotQualifiedExpression

class DotQualifiedExpression : Scope<KtDotQualifiedExpression>

””“$receiverExpression.$selectorExpression””“.dotQualifiedExpression

A template destructuring Scope for a KtDotQualifiedExpression.

import arrow.meta.Meta
import arrow.meta.CliPlugin
import arrow.meta.invoke
import arrow.meta.quotes.Transform
import arrow.meta.quotes.dotQualifiedExpression

val Meta.reformatDotQualifiedExpression: CliPlugin
   get() =
     "Reformat Dot Qualified Expression" {
       meta(
         dotQualifiedExpression(this, { true }) { expression ->
           Transform.replace(
             replacing = expression,
             newDeclaration = """$receiverExpression.$selectorExpression""".dotQualifiedExpression
           )
         }
       )
     }

Constructors

<init> ””“$receiverExpression.$selectorExpression””“.dotQualifiedExpressionDotQualifiedExpression(value: KtDotQualifiedExpression?, receiverExpression: Scope<KtExpression> = Scope(value?.receiverExpression), selectorExpression: Scope<KtExpression>? = Scope(value?.selectorExpression))

Properties

receiverExpression val receiverExpression: Scope<KtExpression>
selectorExpression val selectorExpression: Scope<KtExpression>?
value val value: KtDotQualifiedExpression?

Functions

identity fun ElementScope.identity(): DotQualifiedExpression

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
<