Skip to content

Commit

Permalink
class span in block_stmt_or_expr
Browse files Browse the repository at this point in the history
  • Loading branch information
Austaras committed Mar 3, 2022
1 parent 9ff7aef commit 78e1ac2
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,6 @@ impl VisitMut for ClassProperties {
}

fn visit_mut_block_stmt_or_expr(&mut self, body: &mut BlockStmtOrExpr) {
let span = body.span();

match body {
BlockStmtOrExpr::Expr(expr) if expr.is_class() => {
let ClassExpr { ident, class } = expr.take().class().unwrap();
Expand All @@ -177,7 +175,10 @@ impl VisitMut for ClassProperties {
arg: Some(Box::new(Expr::Ident(ident))),
}));

*body = BlockStmtOrExpr::BlockStmt(BlockStmt { span, stmts });
*body = BlockStmtOrExpr::BlockStmt(BlockStmt {
span: DUMMY_SP,
stmts,
});
}
_ => body.visit_mut_children_with(self),
};
Expand Down

0 comments on commit 78e1ac2

Please sign in to comment.