ISLE: finish porting imul lowering to ISLE

This commit is contained in:
Nick Fitzgerald
2021-11-05 15:41:24 -07:00
parent 30d206779e
commit b8494822dc
6 changed files with 265 additions and 205 deletions

View File

@@ -1289,7 +1289,13 @@ impl TermEnv {
if let ast::Def::Rule(rule) = def {
rule.expr.terms(&mut |pos, ident| {
let sym = tyenv.intern_mut(ident);
let term = self.term_map[&sym];
let term = match self.term_map.get(&sym) {
None => {
debug_assert!(!tyenv.errors.is_empty());
return;
}
Some(t) => t,
};
let term = &self.terms[term.index()];
if !term.has_constructor() {
tyenv.report_error(