MCPcopy Index your code
hub / github.com/RustPython/RustPython / ast_to_object

Method ast_to_object

crates/vm/src/stdlib/_ast/node.rs:19–27  ·  view source on GitHub ↗
(self, vm: &VirtualMachine, source_file: &SourceFile)

Source from the content-addressed store, hash-verified

17
18impl<T: Node> Node for Vec<T> {
19 fn ast_to_object(self, vm: &VirtualMachine, source_file: &SourceFile) -> PyObjectRef {
20 vm.ctx
21 .new_list(
22 self.into_iter()
23 .map(|node| node.ast_to_object(vm, source_file))
24 .collect(),
25 )
26 .into()
27 }
28
29 fn ast_from_object(
30 vm: &VirtualMachine,

Callers 3

parseFunction · 0.45
parse_func_typeFunction · 0.45
ast_to_objectFunction · 0.45

Calls 6

new_listMethod · 0.80
collectMethod · 0.80
noneMethod · 0.80
mapMethod · 0.45
into_iterMethod · 0.45
into_vecMethod · 0.45

Tested by

no test coverage detected