pub fn walk<'t, F>(root: Node<'t>, visit: &mut F) -> WalkStatsExpand description
Visit root and all its descendants in pre-order, depth-first.
Iterative and allocation-free: it drives a single tree_sitter::TreeCursor
rather than recursing or buffering children. Sibling order is preserved, so
the visit sequence matches source order and results are reproducible.
The walk never escapes the subtree rooted at root, even when root has
siblings in the wider tree.