This commit is contained in:
mlokr 2024-07-19 13:02:00 +02:00
parent f3e34cd854
commit cfd4fd8c24

View file

@ -991,7 +991,10 @@ impl<'a> std::fmt::Display for Expr<'a> {
write!(f, " {op} ")?;
display_branch(f, right)?;
if matches!(op, TokenKind::Decl | TokenKind::Assign) {
if matches!(op, TokenKind::Decl | TokenKind::Assign)
&& INDENT.with(|idnf| !idnf.get()) == 0
&& !matches!(right, Self::Closure { .. })
{
write!(f, ";")?;
}