From 2e0db7120b004f359b1671f44e874e54e63034d9 Mon Sep 17 00:00:00 2001 From: mlokr Date: Fri, 19 Jul 2024 13:09:07 +0200 Subject: [PATCH] i --- hblang/src/parser.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hblang/src/parser.rs b/hblang/src/parser.rs index 5e00a92f..0e6b43cf 100644 --- a/hblang/src/parser.rs +++ b/hblang/src/parser.rs @@ -951,8 +951,8 @@ impl<'a> std::fmt::Display for Expr<'a> { write!(f, "{}(", Postfix(func))?; fmt_list(f, trailing_comma, ")", args, std::fmt::Display::fmt) } - Self::Return { val: Some(val), .. } => write!(f, "return {val}"), - Self::Return { val: None, .. } => write!(f, "return"), + Self::Return { val: Some(val), .. } => write!(f, "return {val};"), + Self::Return { val: None, .. } => write!(f, "return;"), Self::Ident { name, .. } => write!(f, "{name}"), Self::Block { stmts, .. } => { write!(f, "{{")?; @@ -963,7 +963,7 @@ impl<'a> std::fmt::Display for Expr<'a> { for _ in 0..INDENT.with(|i| i.get()) { write!(f, "\t")?; } - writeln!(f, "{stmt};")?; + writeln!(f, "{stmt}")?; } Ok(()) })();