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

Function compile

crates/stdlib/src/re.rs:303–310  ·  view source on GitHub ↗
(
        pattern: PyStrRef,
        flags: OptionalArg<usize>,
        vm: &VirtualMachine,
    )

Source from the content-addressed store, hash-verified

301
302 #[pyfunction]
303 fn compile(
304 pattern: PyStrRef,
305 flags: OptionalArg<usize>,
306 vm: &VirtualMachine,
307 ) -> PyResult<PyPattern> {
308 let flags = extract_flags(flags);
309 make_regex(vm, pattern.as_str(), flags)
310 }
311
312 #[pyfunction]
313 fn escape(pattern: PyStrRef) -> String {

Callers

nothing calls this directly

Calls 3

extract_flagsFunction · 0.85
make_regexFunction · 0.85
as_strMethod · 0.45

Tested by

no test coverage detected