Skip to main content

Module node

Module node 

Source
Expand description

Tree-sitter wrappers: Tree, Node, Ancestors, and the cursors.

Structs§

Ancestors
The chain of a node’s ancestors, root first, as recorded by a walker that descended to that node.
Children
Iterator over a node’s direct children, returned by Node::children. Owns the cursor it walks with.
ChildrenWith
Iterator over a node’s direct children, returned by Node::children_with. Borrows the caller’s cursor rather than building one, which is the whole of the difference: it yields exactly what Children yields, through the same ChildScan.
Cursor
An AST cursor.
Node
An AST node.
Preorder
Pre-order iterator over a node and its descendants, returned by Node::preorder.

Enums§

AncestorIter
Ancestor iterator returned by Ancestors::iter, nearest first.