(&mut self, expr: &Hir, greedy: bool)
| 533 | } |
| 534 | |
| 535 | fn c_repeat_zero_or_one(&mut self, expr: &Hir, greedy: bool) -> Result { |
| 536 | let split_entry = self.insts.len(); |
| 537 | let split = self.push_split_hole(); |
| 538 | let Patch { hole: hole_rep, entry: entry_rep } = self.c(expr)?; |
| 539 | |
| 540 | let split_hole = if greedy { |
| 541 | self.fill_split(split, Some(entry_rep), None) |
| 542 | } else { |
| 543 | self.fill_split(split, None, Some(entry_rep)) |
| 544 | }; |
| 545 | let holes = vec![hole_rep, split_hole]; |
| 546 | Ok(Patch { hole: Hole::Many(holes), entry: split_entry }) |
| 547 | } |
| 548 | |
| 549 | fn c_repeat_zero_or_more(&mut self, expr: &Hir, greedy: bool) -> Result { |
| 550 | let split_entry = self.insts.len(); |
no test coverage detected