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

Method c_concat

regex/src/compile.rs:456–472  ·  view source on GitHub ↗
(&mut self, exprs: I)

Source from the content-addressed store, hash-verified

454 }
455
456 fn c_concat<'a, I>(&mut self, exprs: I) -> Result
457 where I: IntoIterator<Item=&'a Hir> {
458 let mut exprs = exprs.into_iter();
459 let first = match exprs.next() {
460 Some(expr) => expr,
461 None => {
462 return Ok(Patch { hole: Hole::None, entry: self.insts.len() })
463 }
464 };
465 let Patch { mut hole, entry } = self.c(first)?;
466 for e in exprs {
467 let p = self.c(e)?;
468 self.fill(hole, p.entry);
469 hole = p.hole;
470 }
471 Ok(Patch { hole: hole, entry: entry })
472 }
473
474 fn c_alternate(&mut self, exprs: &[Hir]) -> Result {
475 debug_assert!(

Callers 3

cMethod · 0.80
c_repeat_rangeMethod · 0.80

Calls 5

cMethod · 0.80
fillMethod · 0.80
into_iterMethod · 0.45
nextMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected