compiler-plugin / arrow.meta.quotes.element / FinallySection

FinallySection

class FinallySection : Scope<KtFinallySection>

”"”finally { $finallyExpression }””“.finally

A template destructuring Scope for a KtFinallySection.

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

val Meta.reformatFinallySection: CliPlugin
 get() =
  "ReformatFinallySection" {
   meta(
    finallySection(this, { true }) { s ->
     Transform.replace(
      replacing = s,
      newDeclaration = """finally { $finallyExpression }""".finally
     )
    }
   )
  }

Constructors

<init> ”"”finally { $finallyExpression }””“.finallyFinallySection(value: KtFinallySection?, { finallyExpression }: BlockExpression = BlockExpression(value?.finalExpression))

Properties

value val value: KtFinallySection?
{ finallyExpression } val { finallyExpression }: BlockExpression

Functions

identity fun ElementScope.identity(): FinallySection

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
<