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

Method compile

crates/derive/src/lib.rs:272–280  ·  view source on GitHub ↗
(
        &self,
        source: &str,
        mode: rustpython_compiler::Mode,
        module_name: String,
    )

Source from the content-addressed store, hash-verified

270struct Compiler;
271impl derive_impl::Compiler for Compiler {
272 fn compile(
273 &self,
274 source: &str,
275 mode: rustpython_compiler::Mode,
276 module_name: String,
277 ) -> Result<rustpython_compiler::CodeObject, Box<dyn core::error::Error>> {
278 use rustpython_compiler::{CompileOpts, compile};
279 Ok(compile(source, mode, &module_name, CompileOpts::default())?)
280 }
281}
282
283#[proc_macro]

Callers 1

generate.pyFile · 0.45

Calls 1

compileFunction · 0.50

Tested by

no test coverage detected