diff --git a/hblang/src/parser.rs b/hblang/src/parser.rs index 8ecb665..42caaf7 100644 --- a/hblang/src/parser.rs +++ b/hblang/src/parser.rs @@ -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, ";")?; }