feat: rest 参数(function f(...args)),实参区收集数组
This commit is contained in:
@@ -32,6 +32,9 @@ impl Emitter {
|
||||
}),
|
||||
}
|
||||
}
|
||||
if let Some(rest) = &fd.params.rest {
|
||||
self.push_rest_param(&rest.rest.argument, &mut param_names)?;
|
||||
}
|
||||
let body_stmts: &[Statement] = if let Some(body) = &fd.body { &body.statements } else { &[] };
|
||||
let mut sub_module = if fd.generator {
|
||||
self.compile_generator_body(¶m_names, body_stmts, ctx)?
|
||||
|
||||
Reference in New Issue
Block a user