chore: 全仓 rustfmt 格式化归拢

This commit is contained in:
2026-08-16 12:50:36 +08:00
parent 648842fd82
commit fe8892079e
28 changed files with 166 additions and 247 deletions
+1 -3
View File
@@ -7,9 +7,7 @@ use oxide_ir::operand::Operand;
use oxide_parser::AwaitExpression;
impl Emitter {
pub(crate) fn emit_await_expression(
&self, ae: &AwaitExpression, ctx: &mut CompileCtx,
) -> Result<u32, String> {
pub(crate) fn emit_await_expression(&self, ae: &AwaitExpression, ctx: &mut CompileCtx) -> Result<u32, String> {
// 求值被等待的值(`await undefined` 时求值 undefined)。
let value_reg = self.emit_expression(&ae.argument, ctx)?;
ctx.inst(Inst::await_expr(Operand::Reg(value_reg)));
+3 -1
View File
@@ -55,7 +55,9 @@ impl Emitter {
Ok(r)
}
pub(crate) fn emit_function_expression(&self, fe: &oxide_parser::Function, ctx: &mut CompileCtx) -> Result<u32, String> {
pub(crate) fn emit_function_expression(
&self, fe: &oxide_parser::Function, ctx: &mut CompileCtx,
) -> Result<u32, String> {
// 函数表达式:编译函数体为子模块,create_closure 实例化闭包
let mut param_names = Vec::new();
for (idx, param) in fe.params.items.iter().enumerate() {