This commit is contained in:
mlokr 2024-07-19 12:56:40 +02:00
parent ba73a89171
commit a1179f3320
No known key found for this signature in database
GPG key ID: DEA147DDEE644993
2 changed files with 10 additions and 4 deletions

View file

@ -3135,9 +3135,9 @@ impl Codegen {
ast.pos(),
format_args!(
"compiler does not (yet) know how to handle ({hint}):\n\
{ast:}\n\
info for weak people:\n\
{ast:#?}"
{ast:}\n\
info for weak people:\n\
{ast:#?}"
),
)
}

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(())
}
}
}