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

Function validate_ast_object

crates/vm/src/stdlib/_ast.rs:783–788  ·  view source on GitHub ↗
(vm: &VirtualMachine, object: PyObjectRef)

Source from the content-addressed store, hash-verified

781
782#[cfg(feature = "codegen")]
783pub(crate) fn validate_ast_object(vm: &VirtualMachine, object: PyObjectRef) -> PyResult<()> {
784 let source_file = SourceFileBuilder::new("<ast>".to_owned(), "".to_owned()).finish();
785 let ast: Mod = Node::ast_from_object(vm, &source_file, object)?;
786 validate::validate_mod(vm, &ast)?;
787 Ok(())
788}
789
790// Used by builtins::compile()
791pub const PY_CF_ONLY_AST: i32 = 0x0400;

Callers 1

compileFunction · 0.85

Calls 5

newFunction · 0.85
ast_from_objectFunction · 0.85
validate_modFunction · 0.85
finishMethod · 0.45
to_ownedMethod · 0.45

Tested by

no test coverage detected