message: never panic analysis/matcher/gmatch.rs
diff: @@ -399,25 +399,27 @@ where I: Iterator<Item=S::ValueRef>,
  t_
  };
  - let replace_root = {
  - let cur = r.current().as_ref().unwrap_or_else(|| {
  - radeco_err!("Unknow Binding");
  - &String::new()
  - });
  - if cur.starts_with('%') {
  - *bindings.get(cur).unwrap_or_else(|| {
  + let replace_root = if r.current().as_ref().map_or(false, |x| x.starts_with('%')) {
  + *bindings.get(r.current().as_ref().unwrap()).unwrap_or_else(|| {
  radeco_err!("Unknown Binding");
  + &found.root
  })
  - } else {
  - self.map_token_to_node(cur,
  + } else if r.current().as_ref().is_some() {
  + self.map_token_to_node(r.current().as_ref().unwrap(),
  &block,
  &mut address)
  - };
  + } else {
  + radeco_err!("r.current().as_ref() == None");
  + found.root
  };
  self.ssa.replace_value(root, replace_root);
  for i in 0..r.len() {
  - worklist.push((replace_root, i as u8, r.op(i + 1).unwrap()));
  + let p = r.op(i + 1).unwrap_or_else(|| {
  + radeco_err!("parse error");
  + String::new()
  + });
  + worklist.push((replace_root, i as u8, p));
  }
  while let Some((parent, edge_idx, subexpr)) = worklist.pop() {
  @@ -428,14 +430,25 @@ where I: Iterator<Item=S::ValueRef>,
  self.seen.insert(subexpr, t_.clone());
  t_
  };
  - let current = pt.current().unwrap();
  + let current = pt.current().unwrap_or_else(|| {
  + radeco_err!("parse error");
  + String::new()
  + });
  let inner_node = if current.starts_with('%') {
  - *bindings.get(&current).expect("Unknown Binding")
  + *bindings.get(&current).unwrap_or_else(|| {
  + radeco_err!("Unknown Binding");
  + //TODO
  + None.unwrap()
  + })
  } else {
  self.map_token_to_node(&current, &block, &mut address)
  };
  self.ssa.op_use(parent, edge_idx, inner_node);
  for i in 0..pt.len() {
  + let p = r.op(i + 1).unwrap_or_else(|| {
  + radeco_err!("parse error");
  + String::new()
  + });
  worklist.push((inner_node, i as u8, pt.op(i + 1).unwrap()));
  }
  }
  