From f9af84015e641ff7dc4636d787538bb3f8ed38a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=88=B1=E7=89=B9=E6=AF=8F=E7=BE=8A=E9=98=9F?= Date: Sat, 6 Jun 2026 13:39:58 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E7=A9=BA=E8=AF=AD=E5=8F=A5=E6=AE=8B=E7=95=99=E4=B8=8A=E4=B8=80?= =?UTF-8?q?=E5=8F=A5=E8=BF=94=E5=9B=9E=E5=80=BC=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/oxide_compiler/src/compiler.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/oxide_compiler/src/compiler.rs b/crates/oxide_compiler/src/compiler.rs index e1d4860..4b834a6 100644 --- a/crates/oxide_compiler/src/compiler.rs +++ b/crates/oxide_compiler/src/compiler.rs @@ -153,8 +153,9 @@ impl Compiler { let mut last_result: Option = None; for stmt in &program.body { - if let Some(r) = self.emit_statement(stmt, &mut ctx)? { - last_result = Some(r); + match self.emit_statement(stmt, &mut ctx)? { + Some(r) => last_result = Some(r), + None => last_result = None, } }