1
0
Fork 0
forked from koniifer/ableos
This commit is contained in:
mlokr 2024-07-19 14:05:13 +02:00
parent 9eca819d31
commit 1a30b14f8c

View file

@ -966,7 +966,9 @@ impl<'a> std::fmt::Display for Expr<'a> {
write!(f, "{stmt}")?;
if let Some(expr) = stmts.get(i + 1)
&& let Some(rest) = source.get(expr.pos() as usize..)
&& lexer::Lexer::new(rest).next().kind.precedence().is_some()
&& let kind = lexer::Lexer::new(rest).next().kind
&& (kind.precedence().is_some()
|| matches!(kind, TokenKind::Struct | TokenKind::Tupl))
{
write!(f, ";")?;
}