mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
refactor(transformer): reorder methods in arrow function transform (#5830)
Pure refactor. Just move methods which push/pop to stacks to the top, so they're all together.
This commit is contained in:
parent
172fa0361f
commit
03a9e1ad5d
1 changed files with 8 additions and 8 deletions
|
|
@ -160,6 +160,14 @@ impl<'a> Traverse<'a> for ArrowFunctions<'a> {
|
|||
self.inside_arrow_function_stack.pop().unwrap();
|
||||
}
|
||||
|
||||
fn enter_class(&mut self, _class: &mut Class<'a>, _ctx: &mut TraverseCtx<'a>) {
|
||||
self.inside_arrow_function_stack.push(false);
|
||||
}
|
||||
|
||||
fn exit_class(&mut self, _class: &mut Class<'a>, _ctx: &mut TraverseCtx<'a>) {
|
||||
self.inside_arrow_function_stack.pop().unwrap();
|
||||
}
|
||||
|
||||
fn enter_jsx_element_name(
|
||||
&mut self,
|
||||
element_name: &mut JSXElementName<'a>,
|
||||
|
|
@ -213,14 +221,6 @@ impl<'a> Traverse<'a> for ArrowFunctions<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
fn enter_class(&mut self, _class: &mut Class<'a>, _ctx: &mut TraverseCtx<'a>) {
|
||||
self.inside_arrow_function_stack.push(false);
|
||||
}
|
||||
|
||||
fn exit_class(&mut self, _class: &mut Class<'a>, _ctx: &mut TraverseCtx<'a>) {
|
||||
self.inside_arrow_function_stack.pop().unwrap();
|
||||
}
|
||||
|
||||
fn enter_variable_declarator(
|
||||
&mut self,
|
||||
node: &mut VariableDeclarator<'a>,
|
||||
|
|
|
|||
Loading…
Reference in a new issue