MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / m_seq

Method m_seq

std/re/src/main/matcher.rs:113–120  ·  view source on GitHub ↗

Sequence walker, threads the continuation across nodes. */

(&self, nodes: &[Node], pos: usize, caps: &mut Caps, k: &mut dyn FnMut(usize, &mut Caps) -> bool)

Source from the content-addressed store, hash-verified

111
112 /* Sequence walker, threads the continuation across nodes. */
113 fn m_seq(&self, nodes: &[Node], pos: usize, caps: &mut Caps, k: &mut dyn FnMut(usize, &mut Caps) -> bool) -> bool {
114 match nodes.split_first() {
115 None => k(pos, caps),
116 Some((first, rest)) => {
117 self.m(first, pos, caps, &mut |p, c| self.m_seq(rest, p, c, k))
118 }
119 }
120 }
121
122 /* Repetition. Single codepoint atoms run iteratively to bound recursion. */
123 fn repeat(&self, rep: &Rep, pos: usize, count: usize, caps: &mut Caps, k: &mut dyn FnMut(usize, &mut Caps) -> bool) -> bool {

Callers 1

mMethod · 0.80

Calls 1

mMethod · 0.80

Tested by

no test coverage detected