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

Method parse_tree

atomic-semantic/src/parsers/mod.rs:363–366  ·  view source on GitHub ↗

Parse with the existing registered language parser. `None` means an unsupported language/parser or parsing failure, not a clean file.

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

Source from the content-addressed store, hash-verified

361 /// Parse with the existing registered language parser. `None` means an
362 /// unsupported language/parser or parsing failure, not a clean file.
363 pub fn parse_tree(&mut self, file_path: &str, source: &str) -> Option<tree_sitter::Tree> {
364 let language = Language::detect(file_path)?;
365 self.parsers.get_mut(&language)?.parse_tree(source)
366 }
367
368 /// Extract entities from a source file.
369 ///

Callers 2

analyze_sourceMethod · 0.45
extract_referencesMethod · 0.45

Calls 1

get_mutMethod · 0.80

Tested by

no test coverage detected