Better error messages.

This commit is contained in:
Stephen Chung
2021-12-30 12:19:41 +08:00
parent 1fd242ed2c
commit 64bf2eef5c
9 changed files with 74 additions and 64 deletions

View File

@@ -469,7 +469,10 @@ impl fmt::Debug for Expr {
Self::Dot(_, _, _) => "Dot",
Self::And(_, _) => "And",
Self::Or(_, _) => "Or",
_ => unreachable!(),
expr => unreachable!(
"Self::Dot or Self::And or Self::Or expected but gets {:?}",
expr
),
};
display_pos = *pos;