write

fun write(rootNode: Node, withExtras: Boolean = true): String

Converts the given AST node back to source code.

Return

source code.

Parameters

rootNode

root AST node to convert.

withExtras

whether to write extra nodes such as comments and whitespaces, defaults to true.


fun <T> write(rootNode: Node, appendable: T, withExtras: Boolean = true): T

Converts the given AST node back to source code.

Return

appendable.

Parameters

rootNode

root AST node to convert.

appendable

appendable to write to.

withExtras

whether to write extra nodes such as comments and whitespaces, defaults to true.