Skip to content

Commit 1bda570

Browse files
committed
perf(semantic): inline enter_kind for CatchParameter (oxc-project#17404)
Ref oxc-project/backlog#72
1 parent 7284b76 commit 1bda570

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

crates/oxc_semantic/src/builder.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2078,6 +2078,7 @@ impl<'a> Visit<'a> for SemanticBuilder<'a> {
20782078
fn visit_catch_parameter(&mut self, param: &CatchParameter<'a>) {
20792079
let kind = AstKind::CatchParameter(self.alloc(param));
20802080
self.enter_node(kind);
2081+
param.bind(self);
20812082
self.visit_span(&param.span);
20822083
self.visit_binding_pattern(&param.pattern);
20832084
if let Some(type_annotation) = &param.type_annotation {
@@ -2242,9 +2243,6 @@ impl<'a> SemanticBuilder<'a> {
22422243
/* cfg */
22432244

22442245
match kind {
2245-
AstKind::CatchParameter(param) => {
2246-
param.bind(self);
2247-
}
22482246
AstKind::TSModuleDeclaration(module_declaration) => {
22492247
module_declaration.bind(self);
22502248
}

0 commit comments

Comments
 (0)