Skip to content

Commit

Permalink
refactor(transformer/typescript): re-order visitor methods (oxc-proje…
Browse files Browse the repository at this point in the history
…ct#6864)

It makes more sense for `exit_statement` to be after `enter_statement`.
  • Loading branch information
overlookmotel committed Oct 24, 2024
1 parent 423d54c commit 4348eae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/oxc_transformer/src/typescript/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,14 @@ impl<'a, 'ctx> Traverse<'a> for TypeScript<'a, 'ctx> {
self.annotations.exit_statements(stmts, ctx);
}

fn exit_statement(&mut self, stmt: &mut Statement<'a>, ctx: &mut TraverseCtx<'a>) {
self.annotations.exit_statement(stmt, ctx);
}

fn enter_statement(&mut self, stmt: &mut Statement<'a>, ctx: &mut TraverseCtx<'a>) {
self.r#enum.enter_statement(stmt, ctx);
}

fn exit_statement(&mut self, stmt: &mut Statement<'a>, ctx: &mut TraverseCtx<'a>) {
self.annotations.exit_statement(stmt, ctx);
}

fn enter_if_statement(&mut self, stmt: &mut IfStatement<'a>, ctx: &mut TraverseCtx<'a>) {
self.annotations.enter_if_statement(stmt, ctx);
}
Expand Down

0 comments on commit 4348eae

Please sign in to comment.