diff --git a/crates/oxc_traverse/src/ast_operations/gather_node_parts.rs b/crates/oxc_traverse/src/ast_operations/gather_node_parts.rs index 3c0d730561f81..47cb7a0b77afa 100644 --- a/crates/oxc_traverse/src/ast_operations/gather_node_parts.rs +++ b/crates/oxc_traverse/src/ast_operations/gather_node_parts.rs @@ -218,21 +218,39 @@ impl<'a> GatherNodeParts<'a> for MemberExpression<'a> { fn gather(&self, f: &mut F) { match self { MemberExpression::ComputedMemberExpression(expr) => { - expr.object.gather(f); - expr.expression.gather(f); + expr.gather(f); } MemberExpression::StaticMemberExpression(expr) => { - expr.object.gather(f); - expr.property.gather(f); + expr.gather(f); } MemberExpression::PrivateFieldExpression(expr) => { - expr.object.gather(f); - expr.field.gather(f); + expr.gather(f); } } } } +impl<'a> GatherNodeParts<'a> for ComputedMemberExpression<'a> { + fn gather(&self, f: &mut F) { + self.object.gather(f); + self.expression.gather(f); + } +} + +impl<'a> GatherNodeParts<'a> for StaticMemberExpression<'a> { + fn gather(&self, f: &mut F) { + self.object.gather(f); + self.property.gather(f); + } +} + +impl<'a> GatherNodeParts<'a> for PrivateFieldExpression<'a> { + fn gather(&self, f: &mut F) { + self.object.gather(f); + self.field.gather(f); + } +} + impl<'a> GatherNodeParts<'a> for CallExpression<'a> { fn gather(&self, f: &mut F) { self.callee.gather(f);