mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-14 15:00:01 -04:00
walk try statemnet
This commit is contained in:
parent
a5486de863
commit
90fb31d8c1
1 changed files with 16 additions and 15 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue