compiler-plugin / arrow.meta.quotes.expression.expressionwithlabel / ContinueExpression

ContinueExpression

class ContinueExpression : ExpressionWithLabel<KtContinueExpression>

”"”continue”””.continue

A template destructuring Scope for a KtContinueExpression.

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

val Meta.reformatContinue: CliPlugin
   get() =
     "Reformat Continue Expression" {
       meta(
         continueExpression({ true }) { expressionWithLabel ->
           Transform.replace(
             replacing = expressionWithLabel,
             newDeclaration = when {
               targetLabel.value != null -> """continue$targetLabel""".`continue`
               else -> """continue""".`continue`
             }
           )
         }
       )
     }

Constructors

<init> ”"”continue”””.continueContinueExpression(value: KtContinueExpression, targetLabel: Scope<KtSimpleNameExpression> = Scope(value.getTargetLabel()), labelName: String? = value.getLabelName() ?: "continue")

Properties

labelName val labelName: String?
targetLabel val targetLabel: Scope<KtSimpleNameExpression>
value val value: KtContinueExpression

Functions

identity fun ElementScope.identity(): ContinueExpression

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
<