(
&self,
tree: &tree_sitter::Tree,
source: &str,
file_path: &str,
)
| 78 | } |
| 79 | |
| 80 | pub fn extract_references_from_tree( |
| 81 | &self, |
| 82 | tree: &tree_sitter::Tree, |
| 83 | source: &str, |
| 84 | file_path: &str, |
| 85 | ) -> Vec<Reference> { |
| 86 | let mut references = Vec::new(); |
| 87 | let mut seen = HashSet::new(); |
| 88 | self.walk_tree_for_references( |
| 89 | &tree.root_node(), |
| 90 | source, |
| 91 | file_path, |
| 92 | &mut references, |
| 93 | &mut seen, |
| 94 | ); |
| 95 | references |
| 96 | } |
| 97 | |
| 98 | /// Walk the AST and extract references (function calls, identifier usages) |
| 99 | fn walk_tree_for_references( |
no test coverage detected