This commit is contained in:
mlokr 2024-07-19 12:56:40 +02:00
parent b542b003f6
commit f3e34cd854
2 changed files with 10 additions and 4 deletions

View file

@ -989,7 +989,13 @@ impl<'a> std::fmt::Display for Expr<'a> {
display_branch(f, left)?;
write!(f, " {op} ")?;
display_branch(f, right)
display_branch(f, right)?;
if matches!(op, TokenKind::Decl | TokenKind::Assign) {
write!(f, ";")?;
}
Ok(())
}
}
}