walk try statemnet

This commit is contained in:
velzie 2024-08-03 12:27:24 -04:00
parent a5486de863
commit 90fb31d8c1
No known key found for this signature in database
GPG key ID: 048413F95F0DDE1F

View file

@ -144,21 +144,22 @@ impl<'a> Visit<'a> for Rewriter {
// do not walk further, we don't want to rewrite the identifiers // do not walk further, we don't want to rewrite the identifiers
} }
// #[cfg(feature = "debug")] #[cfg(feature = "debug")]
// fn visit_try_statement(&mut self, it: &oxc_ast::ast::TryStatement<'a>) { fn visit_try_statement(&mut self, it: &oxc_ast::ast::TryStatement<'a>) {
// // for debugging we need to know what the error was // for debugging we need to know what the error was
//
// if let Some(h) = &it.handler { if let Some(h) = &it.handler {
// if let Some(name) = &h.param { if let Some(name) = &h.param {
// if let Some(name) = name.pattern.get_identifier() { if let Some(name) = name.pattern.get_identifier() {
// self.jschanges.push(JsChange::GenericChange { self.jschanges.push(JsChange::GenericChange {
// span: Span::new(h.body.span.start + 1, h.body.span.start + 1), span: Span::new(h.body.span.start + 1, h.body.span.start + 1),
// text: format!("$scramerr({});", name), text: format!("$scramerr({});", name),
// }); });
// } }
// } }
// } }
// } walk::walk_try_statement(self, it);
}
fn visit_object_expression(&mut self, it: &oxc_ast::ast::ObjectExpression<'a>) { fn visit_object_expression(&mut self, it: &oxc_ast::ast::ObjectExpression<'a>) {
for prop in &it.properties { for prop in &it.properties {