Package-level declarations

Types

Link copied to clipboard
class Dumper(appendable: Appendable = StringBuilder(), withExtras: Boolean = true, withProperties: Boolean = true) : Visitor

Utility class for dumping AST.

Link copied to clipboard
open class MutableVisitor

Visitor for AST nodes that can mutate the nodes.

Link copied to clipboard
interface Node

Common interface for all the AST nodes.

Link copied to clipboard
data class NodePath<T : Node>(val node: T, val parent: NodePath<*>?)

A path to a node in the AST.

Link copied to clipboard
data class NodeSupplement(var extrasBefore: List<Node.Extra> = listOf(), var extrasWithin: List<Node.Extra> = listOf(), var extrasAfter: List<Node.Extra> = listOf(), var tag: Any? = null)

Supplemental data for a node.

Link copied to clipboard
open class Visitor

Visitor for AST nodes.

Link copied to clipboard
open class Writer(appendable: Appendable = StringBuilder(), withExtras: Boolean = true) : Visitor

Writer that converts AST nodes back to source code. When the withExtras is true, which is the default, it will preserve the original whitespaces, comments, semicolons and trailing commas. Even when the withExtras is false, it will still insert minimal whitespaces and semicolons automatically to avoid compilation errors or loss of meaning.