Skip to content

Commit

Permalink
visit_mut_class_decl: Ident
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Aug 29, 2024
1 parent 2ae7a0b commit 0218dfa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/swc_ecma_transforms_proposal/src/decorator_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,13 @@ impl VisitMut for DecoratorPass {
self.state.extra_stmts = old_stmts;
}

fn visit_mut_class_decl(&mut self, n: &mut ClassDecl) {
let old_class_name = self.state.class_name.take();
self.state.class_name = Some(n.ident.clone());
n.visit_mut_children_with(self);
self.state.class_name = old_class_name;
}

fn visit_mut_class_member(&mut self, n: &mut ClassMember) {
n.visit_mut_children_with(self);

Expand Down

0 comments on commit 0218dfa

Please sign in to comment.