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

Method scanner

crates/vm/src/stdlib/_sre.rs:336–349  ·  view source on GitHub ↗
(
            zelf: PyRef<Self>,
            string_args: StringArgs,
            vm: &VirtualMachine,
        )

Source from the content-addressed store, hash-verified

334
335 #[pymethod]
336 fn scanner(
337 zelf: PyRef<Self>,
338 string_args: StringArgs,
339 vm: &VirtualMachine,
340 ) -> PyRef<SreScanner> {
341 SreScanner {
342 pattern: zelf,
343 string: string_args.string,
344 start: AtomicCell::new(string_args.pos),
345 end: string_args.endpos,
346 must_advance: AtomicCell::new(false),
347 }
348 .into_ref(&vm.ctx)
349 }
350
351 #[pymethod]
352 fn sub(zelf: PyRef<Self>, sub_args: SubArgs, vm: &VirtualMachine) -> PyResult {

Callers 6

test_scannerMethod · 0.80
test_bug_581080Method · 0.80
test_immutableMethod · 0.80
scanMethod · 0.80

Calls 2

newFunction · 0.85
into_refMethod · 0.45

Tested by 5

test_scannerMethod · 0.64
test_bug_581080Method · 0.64
test_immutableMethod · 0.64