AstIterator

interface AstIterator<T>

An iterator that runs through the nodes of an AST.

Type Parameters

T

result produced by traverse. Pure visitors that mutate context or fire hooks typically use Unit; rewriters that produce a transformed tree use AstRoot.

Inheritors

Functions

Link copied to clipboard
abstract fun traverse(root: AstRoot): T

Runs the iterator from the given root node, traversing the node tree and visiting each node.