feat: 实现默认参数(形参 initializer 与解构默认值)

This commit is contained in:
2026-08-07 15:26:25 +08:00
parent 192b697335
commit 66c952d2b2
4 changed files with 51 additions and 14 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ use oxide_parser::{
};
impl Emitter {
fn emit_default_if_undefined(
pub(crate) fn emit_default_if_undefined(
&self, val_reg: u32, default_expr: &Expression, ctx: &mut CompileCtx,
) -> Result<u32, String> {
let undef_reg = self.emit_undefined(ctx);