Working constructor and statements

This commit is contained in:
2026-05-21 14:19:32 +02:00
parent f2257a4e81
commit 80ff10503a
3 changed files with 18 additions and 9 deletions
+1 -1
View File
@@ -7,6 +7,7 @@ use crate::{GenRust, GetRust, RustCodegen};
impl GenRust for Block {
fn gen_rust(&self, ctx: &mut Context, cg: &mut RustCodegen) {
for stmt in &self.0 {
ctx.expr_ensure_semicolon = true;
cg.add_indented("");
stmt.gen_rust(ctx, cg);
}
@@ -14,7 +15,6 @@ impl GenRust for Block {
if let Some(soft_return) = &self.1 {
ctx.expr_ensure_semicolon = false;
soft_return.gen_rust(ctx, cg);
ctx.expr_ensure_semicolon = true;
}
}
}