mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-24 18:51:13 +08:00
chore: 全仓 rustfmt 格式化归拢
This commit is contained in:
@@ -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)));
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user