From cfd4fd8c24d75572c52ecc6a52a2877b5bcc54d1 Mon Sep 17 00:00:00 2001 From: mlokr Date: Fri, 19 Jul 2024 13:02:00 +0200 Subject: [PATCH] g --- hblang/src/parser.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hblang/src/parser.rs b/hblang/src/parser.rs index 8ecb665a..42caaf78 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, ";")?; }