MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / extract_references_from_tree

Method extract_references_from_tree

atomic-semantic/src/parser.rs:80–96  ·  view source on GitHub ↗
(
        &self,
        tree: &tree_sitter::Tree,
        source: &str,
        file_path: &str,
    )

Source from the content-addressed store, hash-verified

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(

Callers 1

extract_referencesMethod · 0.45

Calls 1

Tested by

no test coverage detected