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

Method py_match

crates/sre_engine/src/engine.rs:133–146  ·  view source on GitHub ↗
(&mut self, req: &Request<'_, S>)

Source from the content-addressed store, hash-verified

131 }
132
133 pub fn py_match<S: StrDrive>(&mut self, req: &Request<'_, S>) -> bool {
134 self.start = req.start;
135 req.string.adjust_cursor(&mut self.cursor, self.start);
136
137 let ctx = MatchContext {
138 cursor: self.cursor,
139 code_position: 0,
140 toplevel: true,
141 jump: Jump::OpCode,
142 repeat_ctx_id: usize::MAX,
143 count: -1,
144 };
145 _match(req, self, ctx)
146 }
147
148 pub fn search<S: StrDrive>(&mut self, mut req: Request<'_, S>) -> bool {
149 self.start = req.start;

Callers

nothing calls this directly

Calls 2

_matchFunction · 0.85
adjust_cursorMethod · 0.80

Tested by

no test coverage detected