probe_code/language/common.rs
1use std::collections::HashSet;
2use tree_sitter::Node;
3
4/// Helper function to collect all node types in the AST
5pub fn collect_node_types(node: Node, node_types: &mut HashSet<String>) {
6 node_types.insert(node.kind().to_string());
7
8 let mut cursor = node.walk();
9 for child in node.children(&mut cursor) {
10 collect_node_types(child, node_types);
11 }
12}