1
0
Fork 0
forked from koniifer/ableos
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

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

View file

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