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

Method extract_references

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

Parse source code and extract all references (function calls, variable usages)

(&mut self, source: &str, file_path: &str)

Source from the content-addressed store, hash-verified

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> {
72 let tree = match self.parser.parse(source, None) {
73 Some(t) => t,
74 None => return vec![],
75 };
76
77 self.extract_references_from_tree(&tree, source, file_path)
78 }
79
80 pub fn extract_references_from_tree(
81 &self,

Callers

nothing calls this directly

Calls 2

parseMethod · 0.45

Tested by

no test coverage detected