NodePath

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

A path to a node in the AST.

Constructors

Link copied to clipboard
constructor(node: T, parent: NodePath<*>?)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val node: T

the node at this path

Link copied to clipboard
val parent: NodePath<*>?

the parent path, or null if this is the root path

Functions

Link copied to clipboard

Returns the ancestor nodes of this path, starting with the parent and ending with the root.

Link copied to clipboard
fun <C : Node> childPathOf(child: C): NodePath<C>

Returns the child path for the given child node.