(vm: &VirtualMachine, object: PyObjectRef)
| 781 | |
| 782 | #[cfg(feature = "codegen")] |
| 783 | pub(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() |
| 791 | pub const PY_CF_ONLY_AST: i32 = 0x0400; |
no test coverage detected