add new Expr variants

This commit is contained in:
Folkert 2022-03-07 21:13:48 +01:00
parent 3510bad1d5
commit b3b3b8790c
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
7 changed files with 80 additions and 0 deletions

View file

@ -239,6 +239,12 @@ fn insert_reset<'a>(
stack.push((symbol, expr, expr_layout));
stmt = rest;
}
ExprBox { .. } | ExprUnbox { .. } => {
// TODO
break;
}
Literal(_)
| Call(_)
| Tag { .. }
@ -620,6 +626,8 @@ fn has_live_var_expr<'a>(expr: &'a Expr<'a>, needle: Symbol) -> bool {
symbol, arguments, ..
} => needle == *symbol || arguments.iter().any(|s| *s == needle),
Expr::Reset { symbol, .. } => needle == *symbol,
Expr::ExprBox { symbol, .. } => needle == *symbol,
Expr::ExprUnbox { symbol, .. } => needle == *symbol,
Expr::RuntimeErrorFunction(_) => false,
}
}