(&mut self, expr: &Hir, greedy: bool)
| 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)?; |
no test coverage detected