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

Method extract_from_tree

atomic-semantic/src/parser.rs:59–68  ·  view source on GitHub ↗

Annotate the same tree used by shared semantic source analysis.

(
        &self,
        tree: &tree_sitter::Tree,
        source: &str,
        file_path: &str,
    )

Source from the content-addressed store, hash-verified

57
58 /// Annotate the same tree used by shared semantic source analysis.
59 pub fn extract_from_tree(
60 &self,
61 tree: &tree_sitter::Tree,
62 source: &str,
63 file_path: &str,
64 ) -> Vec<Entity> {
65 let mut entities = Vec::new();
66 self.walk_tree(&tree.root_node(), source, file_path, &mut entities, false);
67 entities
68 }
69
70 /// Parse source code and extract all references (function calls, variable usages)
71 pub fn extract_references(&mut self, source: &str, file_path: &str) -> Vec<Reference> {

Callers 1

extractMethod · 0.45

Calls 1

walk_treeMethod · 0.45

Tested by

no test coverage detected