compiler-plugin / arrow.meta.quotes.expression.expressionwithlabel / 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`
}
)
}
)
}
<init> | ”"”continue”””.continue ContinueExpression(value: KtContinueExpression, targetLabel: Scope <KtSimpleNameExpression> = Scope(value.getTargetLabel()), labelName: String ? = value.getLabelName() ?: "continue") |
labelName | val labelName: String ? |
targetLabel | val targetLabel: Scope <KtSimpleNameExpression> |
value | val value: KtContinueExpression |
identity | fun ElementScope .identity(): ContinueExpression |
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?
✖