From 4edfec5dbf0c5be149d33991c6b6fd2d6ee3f03f Mon Sep 17 00:00:00 2001 From: pjh456 <147148383@qq.com> 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 e1d4860b..4b834a68 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, } }