pub fn traverse_node<F>(
node: Node<'_>,
source: &str,
facts: &mut Vec<RawNode>,
parent_idx: Option<usize>,
language: Language,
classifier: &F,
) -> Option<usize>Expand description
Generic recursive traversal of a tree-sitter sub‑tree.
For every node the classifier closure is called. If it returns
Some((node_kind, name, is_container)) a RawNode is recorded and
– when is_container is true – its children are traversed with the
node itself becoming the new parent. If classifier returns None
the children are still visited, but the current parent remains
unchanged.