MCPcopy Create free account
hub / github.com/davidblewett/rure-python / c_repeat_zero_or_more

Method c_repeat_zero_or_more

regex/src/compile.rs:549–561  ·  view source on GitHub ↗
(&mut self, expr: &Hir, greedy: bool)

Source from the content-addressed store, hash-verified

547 }
548
549 fn c_repeat_zero_or_more(&mut self, expr: &Hir, greedy: bool) -> Result {
550 let split_entry = self.insts.len();
551 let split = self.push_split_hole();
552 let Patch { hole: hole_rep, entry: entry_rep } = self.c(expr)?;
553
554 self.fill(hole_rep, split_entry);
555 let split_hole = if greedy {
556 self.fill_split(split, Some(entry_rep), None)
557 } else {
558 self.fill_split(split, None, Some(entry_rep))
559 };
560 Ok(Patch { hole: split_hole, entry: split_entry })
561 }
562
563 fn c_repeat_one_or_more(&mut self, expr: &Hir, greedy: bool) -> Result {
564 let Patch { hole: hole_rep, entry: entry_rep } = self.c(expr)?;

Callers 2

c_repeatMethod · 0.80

Calls 5

push_split_holeMethod · 0.80
cMethod · 0.80
fillMethod · 0.80
fill_splitMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected