Companion

object Companion

Functions

Link copied to clipboard
fun <T : Node> traverse(rootNode: T, callback: (path: NodePath<*>) -> Node): T

Traverse the given AST node and its descendants depth-first order and calls the given callback function for each node. When the callback function returns a different node, the node is replaced with the returned node.