add src and location to dbg

This commit is contained in:
Brendan Hansknecht 2023-12-01 20:24:23 -08:00
parent 4587c4ebc5
commit 3966d63e2f
No known key found for this signature in database
GPG key ID: 0EA784685083E75B
21 changed files with 385 additions and 119 deletions

View file

@ -62,7 +62,7 @@ impl<'a> Formattable for Expr<'a> {
condition.is_multiline() || continuation.is_multiline()
}
Dbg(condition, continuation) => condition.is_multiline() || continuation.is_multiline(),
LowLevelDbg(_, _) => unreachable!(
LowLevelDbg(_, _, _, _) => unreachable!(
"LowLevelDbg should only exist after desugaring, not during formatting"
),
@ -438,7 +438,7 @@ impl<'a> Formattable for Expr<'a> {
Dbg(condition, continuation) => {
fmt_dbg(buf, condition, continuation, self.is_multiline(), indent);
}
LowLevelDbg(_, _) => unreachable!(
LowLevelDbg(_, _, _, _) => unreachable!(
"LowLevelDbg should only exist after desugaring, not during formatting"
),
If(branches, final_else) => {

View file

@ -726,7 +726,7 @@ impl<'a> RemoveSpaces<'a> for Expr<'a> {
arena.alloc(a.remove_spaces(arena)),
arena.alloc(b.remove_spaces(arena)),
),
Expr::LowLevelDbg(_, _) => unreachable!(
Expr::LowLevelDbg(_, _, _, _) => unreachable!(
"LowLevelDbg should only exist after desugaring, not during formatting"
),
Expr::Apply(a, b, c) => Expr::Apply(