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

Method extract

atomic-semantic/src/parsers/python.rs:424–431  ·  view source on GitHub ↗
(&mut self, source: &str, file_path: &str)

Source from the content-addressed store, hash-verified

422 }
423
424 fn extract(&mut self, source: &str, file_path: &str) -> Vec<Entity> {
425 let tree = match self.parser.parse(source, None) {
426 Some(t) => t,
427 None => return vec![],
428 };
429
430 self.extract_from_tree(&tree, source, file_path)
431 }
432
433 fn extract_from_tree(
434 &mut self,

Callers 15

test_extract_functionFunction · 0.45
test_extract_classFunction · 0.45
test_extract_importsFunction · 0.45
test_decorated_functionFunction · 0.45
test_decorated_classFunction · 0.45
test_empty_sourceFunction · 0.45
test_comment_onlyFunction · 0.45

Calls 2

parseMethod · 0.45
extract_from_treeMethod · 0.45

Tested by 15

test_extract_functionFunction · 0.36
test_extract_classFunction · 0.36
test_extract_importsFunction · 0.36
test_decorated_functionFunction · 0.36
test_decorated_classFunction · 0.36
test_empty_sourceFunction · 0.36
test_comment_onlyFunction · 0.36