Method
scanner
(
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 { |