Skip to content

Commit

Permalink
refactor(transformer): exponentiation transform: rename methods (#6344)
Browse files Browse the repository at this point in the history
Pure refactor. Rename methods only. I named them badly in #6338.
  • Loading branch information
overlookmotel committed Oct 8, 2024
1 parent 4aa4e6b commit bd5fb5a
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions crates/oxc_transformer/src/es2016/exponentiation_operator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,15 @@ impl<'a, 'ctx> ExponentiationOperator<'a, 'ctx> {
};

let (replacement_left, pow_left, temp_var_inits) =
self.get_pow_left_identifier_static_member(member_expr, ctx);
self.get_pow_left_static_member(member_expr, ctx);
assign_expr.left = replacement_left;
Self::convert_assignment(assign_expr, pow_left, ctx);
Self::revise_expression(expr, temp_var_inits, ctx);
}

/// Get left side of `Math.pow(pow_left, ...)` for static member expression
/// and replacement for left side of assignment.
fn get_pow_left_identifier_static_member(
fn get_pow_left_static_member(
&mut self,
member_expr: &mut StaticMemberExpression<'a>,
ctx: &mut TraverseCtx<'a>,
Expand Down Expand Up @@ -311,14 +311,13 @@ impl<'a, 'ctx> ExponentiationOperator<'a, 'ctx> {
unreachable!()
};

let (pow_left, temp_var_inits) =
self.get_pow_left_identifier_computed_member(member_expr, ctx);
let (pow_left, temp_var_inits) = self.get_pow_left_computed_member(member_expr, ctx);
Self::convert_assignment(assign_expr, pow_left, ctx);
Self::revise_expression(expr, temp_var_inits, ctx);
}

/// Get left side of `Math.pow(pow_left, ...)` for computed member expression
fn get_pow_left_identifier_computed_member(
fn get_pow_left_computed_member(
&mut self,
member_expr: &mut ComputedMemberExpression<'a>,
ctx: &mut TraverseCtx<'a>,
Expand Down

0 comments on commit bd5fb5a

Please sign in to comment.