Skip to content

Commit 7946b24

Browse files
committed
visit_mut_class_decl: Ident
1 parent 25f0c9b commit 7946b24

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

crates/swc_ecma_transforms_proposal/src/decorator_impl.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,6 +1054,13 @@ impl VisitMut for DecoratorPass {
10541054
self.state.extra_stmts = old_stmts;
10551055
}
10561056

1057+
fn visit_mut_class_decl(&mut self, n: &mut ClassDecl) {
1058+
let old_class_name = self.state.class_name.take();
1059+
self.state.class_name = Some(n.ident.clone());
1060+
n.visit_mut_children_with(self);
1061+
self.state.class_name = old_class_name;
1062+
}
1063+
10571064
fn visit_mut_class_member(&mut self, n: &mut ClassMember) {
10581065
n.visit_mut_children_with(self);
10591066

0 commit comments

Comments
 (0)