diff --git a/crates/oxc_ast/src/generated/derive_get_node_id.rs b/crates/oxc_ast/src/generated/derive_get_node_id.rs index d7c54a7c5398e..97232e1ae6cc6 100644 --- a/crates/oxc_ast/src/generated/derive_get_node_id.rs +++ b/crates/oxc_ast/src/generated/derive_get_node_id.rs @@ -22,10 +22,6 @@ impl GetNodeId for BooleanLiteral { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl GetNodeId for NullLiteral { @@ -33,10 +29,6 @@ impl GetNodeId for NullLiteral { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for NumericLiteral<'a> { @@ -44,10 +36,6 @@ impl<'a> GetNodeId for NumericLiteral<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for BigIntLiteral<'a> { @@ -55,10 +43,6 @@ impl<'a> GetNodeId for BigIntLiteral<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for RegExpLiteral<'a> { @@ -66,10 +50,6 @@ impl<'a> GetNodeId for RegExpLiteral<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for StringLiteral<'a> { @@ -77,10 +57,6 @@ impl<'a> GetNodeId for StringLiteral<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for Program<'a> { @@ -88,10 +64,6 @@ impl<'a> GetNodeId for Program<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for Expression<'a> { @@ -141,52 +113,6 @@ impl<'a> GetNodeId for Expression<'a> { Self::PrivateFieldExpression(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::BooleanLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::NullLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::NumericLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::BigIntLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::RegExpLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::StringLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::TemplateLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::Identifier(it) => GetNodeId::node_id_mut(&mut **it), - Self::MetaProperty(it) => GetNodeId::node_id_mut(&mut **it), - Self::Super(it) => GetNodeId::node_id_mut(&mut **it), - Self::ArrayExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ArrowFunctionExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::AssignmentExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::AwaitExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::BinaryExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::CallExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ChainExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ClassExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ConditionalExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::FunctionExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ImportExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::LogicalExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::NewExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ObjectExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ParenthesizedExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::SequenceExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TaggedTemplateExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ThisExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::UnaryExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::UpdateExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::YieldExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::PrivateInExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::JSXElement(it) => GetNodeId::node_id_mut(&mut **it), - Self::JSXFragment(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSAsExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSSatisfiesExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTypeAssertion(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSNonNullExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSInstantiationExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ComputedMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::StaticMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::PrivateFieldExpression(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for IdentifierName<'a> { @@ -194,10 +120,6 @@ impl<'a> GetNodeId for IdentifierName<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for IdentifierReference<'a> { @@ -205,10 +127,6 @@ impl<'a> GetNodeId for IdentifierReference<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for BindingIdentifier<'a> { @@ -216,10 +134,6 @@ impl<'a> GetNodeId for BindingIdentifier<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for LabelIdentifier<'a> { @@ -227,10 +141,6 @@ impl<'a> GetNodeId for LabelIdentifier<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl GetNodeId for ThisExpression { @@ -238,10 +148,6 @@ impl GetNodeId for ThisExpression { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ArrayExpression<'a> { @@ -249,10 +155,6 @@ impl<'a> GetNodeId for ArrayExpression<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ArrayExpressionElement<'a> { @@ -304,54 +206,6 @@ impl<'a> GetNodeId for ArrayExpressionElement<'a> { Self::PrivateFieldExpression(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::SpreadElement(it) => GetNodeId::node_id_mut(&mut **it), - Self::Elision(it) => GetNodeId::node_id_mut(it), - Self::BooleanLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::NullLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::NumericLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::BigIntLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::RegExpLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::StringLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::TemplateLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::Identifier(it) => GetNodeId::node_id_mut(&mut **it), - Self::MetaProperty(it) => GetNodeId::node_id_mut(&mut **it), - Self::Super(it) => GetNodeId::node_id_mut(&mut **it), - Self::ArrayExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ArrowFunctionExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::AssignmentExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::AwaitExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::BinaryExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::CallExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ChainExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ClassExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ConditionalExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::FunctionExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ImportExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::LogicalExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::NewExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ObjectExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ParenthesizedExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::SequenceExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TaggedTemplateExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ThisExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::UnaryExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::UpdateExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::YieldExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::PrivateInExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::JSXElement(it) => GetNodeId::node_id_mut(&mut **it), - Self::JSXFragment(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSAsExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSSatisfiesExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTypeAssertion(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSNonNullExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSInstantiationExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ComputedMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::StaticMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::PrivateFieldExpression(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl GetNodeId for Elision { @@ -359,10 +213,6 @@ impl GetNodeId for Elision { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ObjectExpression<'a> { @@ -370,10 +220,6 @@ impl<'a> GetNodeId for ObjectExpression<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ObjectPropertyKind<'a> { @@ -383,12 +229,6 @@ impl<'a> GetNodeId for ObjectPropertyKind<'a> { Self::SpreadProperty(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::ObjectProperty(it) => GetNodeId::node_id_mut(&mut **it), - Self::SpreadProperty(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for ObjectProperty<'a> { @@ -396,10 +236,6 @@ impl<'a> GetNodeId for ObjectProperty<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for PropertyKey<'a> { @@ -451,54 +287,6 @@ impl<'a> GetNodeId for PropertyKey<'a> { Self::PrivateFieldExpression(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::StaticIdentifier(it) => GetNodeId::node_id_mut(&mut **it), - Self::PrivateIdentifier(it) => GetNodeId::node_id_mut(&mut **it), - Self::BooleanLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::NullLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::NumericLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::BigIntLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::RegExpLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::StringLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::TemplateLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::Identifier(it) => GetNodeId::node_id_mut(&mut **it), - Self::MetaProperty(it) => GetNodeId::node_id_mut(&mut **it), - Self::Super(it) => GetNodeId::node_id_mut(&mut **it), - Self::ArrayExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ArrowFunctionExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::AssignmentExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::AwaitExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::BinaryExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::CallExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ChainExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ClassExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ConditionalExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::FunctionExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ImportExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::LogicalExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::NewExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ObjectExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ParenthesizedExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::SequenceExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TaggedTemplateExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ThisExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::UnaryExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::UpdateExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::YieldExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::PrivateInExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::JSXElement(it) => GetNodeId::node_id_mut(&mut **it), - Self::JSXFragment(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSAsExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSSatisfiesExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTypeAssertion(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSNonNullExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSInstantiationExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ComputedMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::StaticMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::PrivateFieldExpression(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for TemplateLiteral<'a> { @@ -506,10 +294,6 @@ impl<'a> GetNodeId for TemplateLiteral<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TaggedTemplateExpression<'a> { @@ -517,10 +301,6 @@ impl<'a> GetNodeId for TaggedTemplateExpression<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TemplateElement<'a> { @@ -528,10 +308,6 @@ impl<'a> GetNodeId for TemplateElement<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for MemberExpression<'a> { @@ -542,13 +318,6 @@ impl<'a> GetNodeId for MemberExpression<'a> { Self::PrivateFieldExpression(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::ComputedMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::StaticMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::PrivateFieldExpression(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for ComputedMemberExpression<'a> { @@ -556,10 +325,6 @@ impl<'a> GetNodeId for ComputedMemberExpression<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for StaticMemberExpression<'a> { @@ -567,10 +332,6 @@ impl<'a> GetNodeId for StaticMemberExpression<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for PrivateFieldExpression<'a> { @@ -578,10 +339,6 @@ impl<'a> GetNodeId for PrivateFieldExpression<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for CallExpression<'a> { @@ -589,10 +346,6 @@ impl<'a> GetNodeId for CallExpression<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for NewExpression<'a> { @@ -600,10 +353,6 @@ impl<'a> GetNodeId for NewExpression<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for MetaProperty<'a> { @@ -611,10 +360,6 @@ impl<'a> GetNodeId for MetaProperty<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for SpreadElement<'a> { @@ -622,10 +367,6 @@ impl<'a> GetNodeId for SpreadElement<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for Argument<'a> { @@ -676,53 +417,6 @@ impl<'a> GetNodeId for Argument<'a> { Self::PrivateFieldExpression(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::SpreadElement(it) => GetNodeId::node_id_mut(&mut **it), - Self::BooleanLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::NullLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::NumericLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::BigIntLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::RegExpLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::StringLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::TemplateLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::Identifier(it) => GetNodeId::node_id_mut(&mut **it), - Self::MetaProperty(it) => GetNodeId::node_id_mut(&mut **it), - Self::Super(it) => GetNodeId::node_id_mut(&mut **it), - Self::ArrayExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ArrowFunctionExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::AssignmentExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::AwaitExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::BinaryExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::CallExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ChainExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ClassExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ConditionalExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::FunctionExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ImportExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::LogicalExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::NewExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ObjectExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ParenthesizedExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::SequenceExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TaggedTemplateExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ThisExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::UnaryExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::UpdateExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::YieldExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::PrivateInExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::JSXElement(it) => GetNodeId::node_id_mut(&mut **it), - Self::JSXFragment(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSAsExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSSatisfiesExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTypeAssertion(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSNonNullExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSInstantiationExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ComputedMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::StaticMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::PrivateFieldExpression(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for UpdateExpression<'a> { @@ -730,10 +424,6 @@ impl<'a> GetNodeId for UpdateExpression<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for UnaryExpression<'a> { @@ -741,10 +431,6 @@ impl<'a> GetNodeId for UnaryExpression<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for BinaryExpression<'a> { @@ -752,10 +438,6 @@ impl<'a> GetNodeId for BinaryExpression<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for PrivateInExpression<'a> { @@ -763,10 +445,6 @@ impl<'a> GetNodeId for PrivateInExpression<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for LogicalExpression<'a> { @@ -774,10 +452,6 @@ impl<'a> GetNodeId for LogicalExpression<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ConditionalExpression<'a> { @@ -785,10 +459,6 @@ impl<'a> GetNodeId for ConditionalExpression<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for AssignmentExpression<'a> { @@ -796,10 +466,6 @@ impl<'a> GetNodeId for AssignmentExpression<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for AssignmentTarget<'a> { @@ -818,21 +484,6 @@ impl<'a> GetNodeId for AssignmentTarget<'a> { Self::ObjectAssignmentTarget(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::AssignmentTargetIdentifier(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSAsExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSSatisfiesExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSNonNullExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTypeAssertion(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSInstantiationExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ComputedMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::StaticMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::PrivateFieldExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ArrayAssignmentTarget(it) => GetNodeId::node_id_mut(&mut **it), - Self::ObjectAssignmentTarget(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for SimpleAssignmentTarget<'a> { @@ -849,19 +500,6 @@ impl<'a> GetNodeId for SimpleAssignmentTarget<'a> { Self::PrivateFieldExpression(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::AssignmentTargetIdentifier(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSAsExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSSatisfiesExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSNonNullExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTypeAssertion(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSInstantiationExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ComputedMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::StaticMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::PrivateFieldExpression(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for AssignmentTargetPattern<'a> { @@ -871,12 +509,6 @@ impl<'a> GetNodeId for AssignmentTargetPattern<'a> { Self::ObjectAssignmentTarget(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::ArrayAssignmentTarget(it) => GetNodeId::node_id_mut(&mut **it), - Self::ObjectAssignmentTarget(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for ArrayAssignmentTarget<'a> { @@ -884,10 +516,6 @@ impl<'a> GetNodeId for ArrayAssignmentTarget<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ObjectAssignmentTarget<'a> { @@ -895,10 +523,6 @@ impl<'a> GetNodeId for ObjectAssignmentTarget<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for AssignmentTargetRest<'a> { @@ -906,10 +530,6 @@ impl<'a> GetNodeId for AssignmentTargetRest<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for AssignmentTargetMaybeDefault<'a> { @@ -929,22 +549,6 @@ impl<'a> GetNodeId for AssignmentTargetMaybeDefault<'a> { Self::ObjectAssignmentTarget(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::AssignmentTargetWithDefault(it) => GetNodeId::node_id_mut(&mut **it), - Self::AssignmentTargetIdentifier(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSAsExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSSatisfiesExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSNonNullExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTypeAssertion(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSInstantiationExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ComputedMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::StaticMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::PrivateFieldExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ArrayAssignmentTarget(it) => GetNodeId::node_id_mut(&mut **it), - Self::ObjectAssignmentTarget(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for AssignmentTargetWithDefault<'a> { @@ -952,10 +556,6 @@ impl<'a> GetNodeId for AssignmentTargetWithDefault<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for AssignmentTargetProperty<'a> { @@ -965,12 +565,6 @@ impl<'a> GetNodeId for AssignmentTargetProperty<'a> { Self::AssignmentTargetPropertyProperty(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::AssignmentTargetPropertyIdentifier(it) => GetNodeId::node_id_mut(&mut **it), - Self::AssignmentTargetPropertyProperty(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for AssignmentTargetPropertyIdentifier<'a> { @@ -978,10 +572,6 @@ impl<'a> GetNodeId for AssignmentTargetPropertyIdentifier<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for AssignmentTargetPropertyProperty<'a> { @@ -989,10 +579,6 @@ impl<'a> GetNodeId for AssignmentTargetPropertyProperty<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for SequenceExpression<'a> { @@ -1000,10 +586,6 @@ impl<'a> GetNodeId for SequenceExpression<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl GetNodeId for Super { @@ -1011,10 +593,6 @@ impl GetNodeId for Super { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for AwaitExpression<'a> { @@ -1022,10 +600,6 @@ impl<'a> GetNodeId for AwaitExpression<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ChainExpression<'a> { @@ -1033,10 +607,6 @@ impl<'a> GetNodeId for ChainExpression<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ChainElement<'a> { @@ -1048,14 +618,6 @@ impl<'a> GetNodeId for ChainElement<'a> { Self::PrivateFieldExpression(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::CallExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ComputedMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::StaticMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::PrivateFieldExpression(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for ParenthesizedExpression<'a> { @@ -1063,10 +625,6 @@ impl<'a> GetNodeId for ParenthesizedExpression<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for Statement<'a> { @@ -1106,42 +664,6 @@ impl<'a> GetNodeId for Statement<'a> { Self::TSNamespaceExportDeclaration(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::BlockStatement(it) => GetNodeId::node_id_mut(&mut **it), - Self::BreakStatement(it) => GetNodeId::node_id_mut(&mut **it), - Self::ContinueStatement(it) => GetNodeId::node_id_mut(&mut **it), - Self::DebuggerStatement(it) => GetNodeId::node_id_mut(&mut **it), - Self::DoWhileStatement(it) => GetNodeId::node_id_mut(&mut **it), - Self::EmptyStatement(it) => GetNodeId::node_id_mut(&mut **it), - Self::ExpressionStatement(it) => GetNodeId::node_id_mut(&mut **it), - Self::ForInStatement(it) => GetNodeId::node_id_mut(&mut **it), - Self::ForOfStatement(it) => GetNodeId::node_id_mut(&mut **it), - Self::ForStatement(it) => GetNodeId::node_id_mut(&mut **it), - Self::IfStatement(it) => GetNodeId::node_id_mut(&mut **it), - Self::LabeledStatement(it) => GetNodeId::node_id_mut(&mut **it), - Self::ReturnStatement(it) => GetNodeId::node_id_mut(&mut **it), - Self::SwitchStatement(it) => GetNodeId::node_id_mut(&mut **it), - Self::ThrowStatement(it) => GetNodeId::node_id_mut(&mut **it), - Self::TryStatement(it) => GetNodeId::node_id_mut(&mut **it), - Self::WhileStatement(it) => GetNodeId::node_id_mut(&mut **it), - Self::WithStatement(it) => GetNodeId::node_id_mut(&mut **it), - Self::VariableDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::FunctionDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::ClassDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTypeAliasDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSInterfaceDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSEnumDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSModuleDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSImportEqualsDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::ImportDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::ExportAllDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::ExportDefaultDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::ExportNamedDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSExportAssignment(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSNamespaceExportDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for Directive<'a> { @@ -1149,10 +671,6 @@ impl<'a> GetNodeId for Directive<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for Hashbang<'a> { @@ -1160,10 +678,6 @@ impl<'a> GetNodeId for Hashbang<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for BlockStatement<'a> { @@ -1171,10 +685,6 @@ impl<'a> GetNodeId for BlockStatement<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for Declaration<'a> { @@ -1190,18 +700,6 @@ impl<'a> GetNodeId for Declaration<'a> { Self::TSImportEqualsDeclaration(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::VariableDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::FunctionDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::ClassDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTypeAliasDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSInterfaceDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSEnumDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSModuleDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSImportEqualsDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for VariableDeclaration<'a> { @@ -1209,10 +707,6 @@ impl<'a> GetNodeId for VariableDeclaration<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for VariableDeclarator<'a> { @@ -1220,10 +714,6 @@ impl<'a> GetNodeId for VariableDeclarator<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl GetNodeId for EmptyStatement { @@ -1231,10 +721,6 @@ impl GetNodeId for EmptyStatement { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ExpressionStatement<'a> { @@ -1242,10 +728,6 @@ impl<'a> GetNodeId for ExpressionStatement<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for IfStatement<'a> { @@ -1253,10 +735,6 @@ impl<'a> GetNodeId for IfStatement<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for DoWhileStatement<'a> { @@ -1264,10 +742,6 @@ impl<'a> GetNodeId for DoWhileStatement<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for WhileStatement<'a> { @@ -1275,10 +749,6 @@ impl<'a> GetNodeId for WhileStatement<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ForStatement<'a> { @@ -1286,10 +756,6 @@ impl<'a> GetNodeId for ForStatement<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ForStatementInit<'a> { @@ -1340,53 +806,6 @@ impl<'a> GetNodeId for ForStatementInit<'a> { Self::PrivateFieldExpression(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::VariableDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::BooleanLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::NullLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::NumericLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::BigIntLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::RegExpLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::StringLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::TemplateLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::Identifier(it) => GetNodeId::node_id_mut(&mut **it), - Self::MetaProperty(it) => GetNodeId::node_id_mut(&mut **it), - Self::Super(it) => GetNodeId::node_id_mut(&mut **it), - Self::ArrayExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ArrowFunctionExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::AssignmentExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::AwaitExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::BinaryExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::CallExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ChainExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ClassExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ConditionalExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::FunctionExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ImportExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::LogicalExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::NewExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ObjectExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ParenthesizedExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::SequenceExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TaggedTemplateExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ThisExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::UnaryExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::UpdateExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::YieldExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::PrivateInExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::JSXElement(it) => GetNodeId::node_id_mut(&mut **it), - Self::JSXFragment(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSAsExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSSatisfiesExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTypeAssertion(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSNonNullExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSInstantiationExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ComputedMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::StaticMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::PrivateFieldExpression(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for ForInStatement<'a> { @@ -1394,10 +813,6 @@ impl<'a> GetNodeId for ForInStatement<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ForStatementLeft<'a> { @@ -1417,22 +832,6 @@ impl<'a> GetNodeId for ForStatementLeft<'a> { Self::ObjectAssignmentTarget(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::VariableDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::AssignmentTargetIdentifier(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSAsExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSSatisfiesExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSNonNullExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTypeAssertion(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSInstantiationExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ComputedMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::StaticMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::PrivateFieldExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ArrayAssignmentTarget(it) => GetNodeId::node_id_mut(&mut **it), - Self::ObjectAssignmentTarget(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for ForOfStatement<'a> { @@ -1440,10 +839,6 @@ impl<'a> GetNodeId for ForOfStatement<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ContinueStatement<'a> { @@ -1451,10 +846,6 @@ impl<'a> GetNodeId for ContinueStatement<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for BreakStatement<'a> { @@ -1462,10 +853,6 @@ impl<'a> GetNodeId for BreakStatement<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ReturnStatement<'a> { @@ -1473,10 +860,6 @@ impl<'a> GetNodeId for ReturnStatement<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for WithStatement<'a> { @@ -1484,10 +867,6 @@ impl<'a> GetNodeId for WithStatement<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for SwitchStatement<'a> { @@ -1495,10 +874,6 @@ impl<'a> GetNodeId for SwitchStatement<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for SwitchCase<'a> { @@ -1506,10 +881,6 @@ impl<'a> GetNodeId for SwitchCase<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for LabeledStatement<'a> { @@ -1517,10 +888,6 @@ impl<'a> GetNodeId for LabeledStatement<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ThrowStatement<'a> { @@ -1528,10 +895,6 @@ impl<'a> GetNodeId for ThrowStatement<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TryStatement<'a> { @@ -1539,10 +902,6 @@ impl<'a> GetNodeId for TryStatement<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for CatchClause<'a> { @@ -1550,10 +909,6 @@ impl<'a> GetNodeId for CatchClause<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for CatchParameter<'a> { @@ -1561,10 +916,6 @@ impl<'a> GetNodeId for CatchParameter<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl GetNodeId for DebuggerStatement { @@ -1572,10 +923,6 @@ impl GetNodeId for DebuggerStatement { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for BindingPattern<'a> { @@ -1583,10 +930,6 @@ impl<'a> GetNodeId for BindingPattern<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for BindingPatternKind<'a> { @@ -1598,14 +941,6 @@ impl<'a> GetNodeId for BindingPatternKind<'a> { Self::AssignmentPattern(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::BindingIdentifier(it) => GetNodeId::node_id_mut(&mut **it), - Self::ObjectPattern(it) => GetNodeId::node_id_mut(&mut **it), - Self::ArrayPattern(it) => GetNodeId::node_id_mut(&mut **it), - Self::AssignmentPattern(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for AssignmentPattern<'a> { @@ -1613,10 +948,6 @@ impl<'a> GetNodeId for AssignmentPattern<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ObjectPattern<'a> { @@ -1624,10 +955,6 @@ impl<'a> GetNodeId for ObjectPattern<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for BindingProperty<'a> { @@ -1635,10 +962,6 @@ impl<'a> GetNodeId for BindingProperty<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ArrayPattern<'a> { @@ -1646,10 +969,6 @@ impl<'a> GetNodeId for ArrayPattern<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for BindingRestElement<'a> { @@ -1657,10 +976,6 @@ impl<'a> GetNodeId for BindingRestElement<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for Function<'a> { @@ -1668,10 +983,6 @@ impl<'a> GetNodeId for Function<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for FormalParameters<'a> { @@ -1679,10 +990,6 @@ impl<'a> GetNodeId for FormalParameters<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for FormalParameter<'a> { @@ -1690,10 +997,6 @@ impl<'a> GetNodeId for FormalParameter<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for FunctionBody<'a> { @@ -1701,10 +1004,6 @@ impl<'a> GetNodeId for FunctionBody<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ArrowFunctionExpression<'a> { @@ -1712,10 +1011,6 @@ impl<'a> GetNodeId for ArrowFunctionExpression<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for YieldExpression<'a> { @@ -1723,10 +1018,6 @@ impl<'a> GetNodeId for YieldExpression<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for Class<'a> { @@ -1734,10 +1025,6 @@ impl<'a> GetNodeId for Class<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ClassBody<'a> { @@ -1745,10 +1032,6 @@ impl<'a> GetNodeId for ClassBody<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ClassElement<'a> { @@ -1761,15 +1044,6 @@ impl<'a> GetNodeId for ClassElement<'a> { Self::TSIndexSignature(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::StaticBlock(it) => GetNodeId::node_id_mut(&mut **it), - Self::MethodDefinition(it) => GetNodeId::node_id_mut(&mut **it), - Self::PropertyDefinition(it) => GetNodeId::node_id_mut(&mut **it), - Self::AccessorProperty(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSIndexSignature(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for MethodDefinition<'a> { @@ -1777,10 +1051,6 @@ impl<'a> GetNodeId for MethodDefinition<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for PropertyDefinition<'a> { @@ -1788,10 +1058,6 @@ impl<'a> GetNodeId for PropertyDefinition<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for PrivateIdentifier<'a> { @@ -1799,10 +1065,6 @@ impl<'a> GetNodeId for PrivateIdentifier<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for StaticBlock<'a> { @@ -1810,10 +1072,6 @@ impl<'a> GetNodeId for StaticBlock<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ModuleDeclaration<'a> { @@ -1827,16 +1085,6 @@ impl<'a> GetNodeId for ModuleDeclaration<'a> { Self::TSNamespaceExportDeclaration(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::ImportDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::ExportAllDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::ExportDefaultDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::ExportNamedDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSExportAssignment(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSNamespaceExportDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for AccessorProperty<'a> { @@ -1844,10 +1092,6 @@ impl<'a> GetNodeId for AccessorProperty<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ImportExpression<'a> { @@ -1855,10 +1099,6 @@ impl<'a> GetNodeId for ImportExpression<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ImportDeclaration<'a> { @@ -1866,10 +1106,6 @@ impl<'a> GetNodeId for ImportDeclaration<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ImportDeclarationSpecifier<'a> { @@ -1880,13 +1116,6 @@ impl<'a> GetNodeId for ImportDeclarationSpecifier<'a> { Self::ImportNamespaceSpecifier(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::ImportSpecifier(it) => GetNodeId::node_id_mut(&mut **it), - Self::ImportDefaultSpecifier(it) => GetNodeId::node_id_mut(&mut **it), - Self::ImportNamespaceSpecifier(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for ImportSpecifier<'a> { @@ -1894,10 +1123,6 @@ impl<'a> GetNodeId for ImportSpecifier<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ImportDefaultSpecifier<'a> { @@ -1905,10 +1130,6 @@ impl<'a> GetNodeId for ImportDefaultSpecifier<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ImportNamespaceSpecifier<'a> { @@ -1916,10 +1137,6 @@ impl<'a> GetNodeId for ImportNamespaceSpecifier<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for WithClause<'a> { @@ -1927,10 +1144,6 @@ impl<'a> GetNodeId for WithClause<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ImportAttribute<'a> { @@ -1938,10 +1151,6 @@ impl<'a> GetNodeId for ImportAttribute<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ImportAttributeKey<'a> { @@ -1951,12 +1160,6 @@ impl<'a> GetNodeId for ImportAttributeKey<'a> { Self::StringLiteral(it) => GetNodeId::node_id(it), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::Identifier(it) => GetNodeId::node_id_mut(it), - Self::StringLiteral(it) => GetNodeId::node_id_mut(it), - } - } } impl<'a> GetNodeId for ExportNamedDeclaration<'a> { @@ -1964,10 +1167,6 @@ impl<'a> GetNodeId for ExportNamedDeclaration<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ExportDefaultDeclaration<'a> { @@ -1975,10 +1174,6 @@ impl<'a> GetNodeId for ExportDefaultDeclaration<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ExportAllDeclaration<'a> { @@ -1986,10 +1181,6 @@ impl<'a> GetNodeId for ExportAllDeclaration<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ExportSpecifier<'a> { @@ -1997,10 +1188,6 @@ impl<'a> GetNodeId for ExportSpecifier<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for ExportDefaultDeclarationKind<'a> { @@ -2053,55 +1240,6 @@ impl<'a> GetNodeId for ExportDefaultDeclarationKind<'a> { Self::PrivateFieldExpression(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::FunctionDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::ClassDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSInterfaceDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::BooleanLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::NullLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::NumericLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::BigIntLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::RegExpLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::StringLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::TemplateLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::Identifier(it) => GetNodeId::node_id_mut(&mut **it), - Self::MetaProperty(it) => GetNodeId::node_id_mut(&mut **it), - Self::Super(it) => GetNodeId::node_id_mut(&mut **it), - Self::ArrayExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ArrowFunctionExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::AssignmentExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::AwaitExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::BinaryExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::CallExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ChainExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ClassExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ConditionalExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::FunctionExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ImportExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::LogicalExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::NewExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ObjectExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ParenthesizedExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::SequenceExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TaggedTemplateExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ThisExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::UnaryExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::UpdateExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::YieldExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::PrivateInExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::JSXElement(it) => GetNodeId::node_id_mut(&mut **it), - Self::JSXFragment(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSAsExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSSatisfiesExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTypeAssertion(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSNonNullExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSInstantiationExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ComputedMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::StaticMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::PrivateFieldExpression(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for ModuleExportName<'a> { @@ -2112,13 +1250,6 @@ impl<'a> GetNodeId for ModuleExportName<'a> { Self::StringLiteral(it) => GetNodeId::node_id(it), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::IdentifierName(it) => GetNodeId::node_id_mut(it), - Self::IdentifierReference(it) => GetNodeId::node_id_mut(it), - Self::StringLiteral(it) => GetNodeId::node_id_mut(it), - } - } } impl<'a> GetNodeId for TSThisParameter<'a> { @@ -2126,10 +1257,6 @@ impl<'a> GetNodeId for TSThisParameter<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSEnumDeclaration<'a> { @@ -2137,10 +1264,6 @@ impl<'a> GetNodeId for TSEnumDeclaration<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSEnumMember<'a> { @@ -2148,10 +1271,6 @@ impl<'a> GetNodeId for TSEnumMember<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSEnumMemberName<'a> { @@ -2205,56 +1324,6 @@ impl<'a> GetNodeId for TSEnumMemberName<'a> { Self::PrivateFieldExpression(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::StaticIdentifier(it) => GetNodeId::node_id_mut(&mut **it), - Self::StaticStringLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::StaticTemplateLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::StaticNumericLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::BooleanLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::NullLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::NumericLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::BigIntLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::RegExpLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::StringLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::TemplateLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::Identifier(it) => GetNodeId::node_id_mut(&mut **it), - Self::MetaProperty(it) => GetNodeId::node_id_mut(&mut **it), - Self::Super(it) => GetNodeId::node_id_mut(&mut **it), - Self::ArrayExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ArrowFunctionExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::AssignmentExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::AwaitExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::BinaryExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::CallExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ChainExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ClassExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ConditionalExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::FunctionExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ImportExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::LogicalExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::NewExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ObjectExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ParenthesizedExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::SequenceExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TaggedTemplateExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ThisExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::UnaryExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::UpdateExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::YieldExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::PrivateInExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::JSXElement(it) => GetNodeId::node_id_mut(&mut **it), - Self::JSXFragment(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSAsExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSSatisfiesExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTypeAssertion(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSNonNullExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSInstantiationExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ComputedMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::StaticMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::PrivateFieldExpression(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for TSTypeAnnotation<'a> { @@ -2262,10 +1331,6 @@ impl<'a> GetNodeId for TSTypeAnnotation<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSLiteralType<'a> { @@ -2273,10 +1338,6 @@ impl<'a> GetNodeId for TSLiteralType<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSLiteral<'a> { @@ -2292,18 +1353,6 @@ impl<'a> GetNodeId for TSLiteral<'a> { Self::UnaryExpression(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::BooleanLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::NullLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::NumericLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::BigIntLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::RegExpLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::StringLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::TemplateLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::UnaryExpression(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for TSType<'a> { @@ -2349,48 +1398,6 @@ impl<'a> GetNodeId for TSType<'a> { Self::JSDocUnknownType(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::TSAnyKeyword(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSBigIntKeyword(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSBooleanKeyword(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSIntrinsicKeyword(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSNeverKeyword(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSNullKeyword(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSNumberKeyword(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSObjectKeyword(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSStringKeyword(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSSymbolKeyword(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSUndefinedKeyword(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSUnknownKeyword(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSVoidKeyword(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSArrayType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSConditionalType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSConstructorType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSFunctionType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSImportType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSIndexedAccessType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSInferType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSIntersectionType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSLiteralType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSMappedType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSNamedTupleMember(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSQualifiedName(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTemplateLiteralType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSThisType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTupleType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTypeLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTypeOperatorType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTypePredicate(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTypeQuery(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTypeReference(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSUnionType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSParenthesizedType(it) => GetNodeId::node_id_mut(&mut **it), - Self::JSDocNullableType(it) => GetNodeId::node_id_mut(&mut **it), - Self::JSDocNonNullableType(it) => GetNodeId::node_id_mut(&mut **it), - Self::JSDocUnknownType(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for TSConditionalType<'a> { @@ -2398,10 +1405,6 @@ impl<'a> GetNodeId for TSConditionalType<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSUnionType<'a> { @@ -2409,10 +1412,6 @@ impl<'a> GetNodeId for TSUnionType<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSIntersectionType<'a> { @@ -2420,10 +1419,6 @@ impl<'a> GetNodeId for TSIntersectionType<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSParenthesizedType<'a> { @@ -2431,10 +1426,6 @@ impl<'a> GetNodeId for TSParenthesizedType<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSTypeOperator<'a> { @@ -2442,10 +1433,6 @@ impl<'a> GetNodeId for TSTypeOperator<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSArrayType<'a> { @@ -2453,10 +1440,6 @@ impl<'a> GetNodeId for TSArrayType<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSIndexedAccessType<'a> { @@ -2464,10 +1447,6 @@ impl<'a> GetNodeId for TSIndexedAccessType<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSTupleType<'a> { @@ -2475,10 +1454,6 @@ impl<'a> GetNodeId for TSTupleType<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSNamedTupleMember<'a> { @@ -2486,10 +1461,6 @@ impl<'a> GetNodeId for TSNamedTupleMember<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSOptionalType<'a> { @@ -2497,10 +1468,6 @@ impl<'a> GetNodeId for TSOptionalType<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSRestType<'a> { @@ -2508,10 +1475,6 @@ impl<'a> GetNodeId for TSRestType<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSTupleElement<'a> { @@ -2559,50 +1522,6 @@ impl<'a> GetNodeId for TSTupleElement<'a> { Self::JSDocUnknownType(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::TSOptionalType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSRestType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSAnyKeyword(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSBigIntKeyword(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSBooleanKeyword(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSIntrinsicKeyword(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSNeverKeyword(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSNullKeyword(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSNumberKeyword(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSObjectKeyword(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSStringKeyword(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSSymbolKeyword(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSUndefinedKeyword(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSUnknownKeyword(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSVoidKeyword(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSArrayType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSConditionalType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSConstructorType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSFunctionType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSImportType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSIndexedAccessType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSInferType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSIntersectionType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSLiteralType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSMappedType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSNamedTupleMember(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSQualifiedName(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTemplateLiteralType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSThisType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTupleType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTypeLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTypeOperatorType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTypePredicate(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTypeQuery(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTypeReference(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSUnionType(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSParenthesizedType(it) => GetNodeId::node_id_mut(&mut **it), - Self::JSDocNullableType(it) => GetNodeId::node_id_mut(&mut **it), - Self::JSDocNonNullableType(it) => GetNodeId::node_id_mut(&mut **it), - Self::JSDocUnknownType(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl GetNodeId for TSAnyKeyword { @@ -2610,10 +1529,6 @@ impl GetNodeId for TSAnyKeyword { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl GetNodeId for TSStringKeyword { @@ -2621,10 +1536,6 @@ impl GetNodeId for TSStringKeyword { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl GetNodeId for TSBooleanKeyword { @@ -2632,10 +1543,6 @@ impl GetNodeId for TSBooleanKeyword { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl GetNodeId for TSNumberKeyword { @@ -2643,10 +1550,6 @@ impl GetNodeId for TSNumberKeyword { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl GetNodeId for TSNeverKeyword { @@ -2654,10 +1557,6 @@ impl GetNodeId for TSNeverKeyword { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl GetNodeId for TSIntrinsicKeyword { @@ -2665,10 +1564,6 @@ impl GetNodeId for TSIntrinsicKeyword { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl GetNodeId for TSUnknownKeyword { @@ -2676,10 +1571,6 @@ impl GetNodeId for TSUnknownKeyword { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl GetNodeId for TSNullKeyword { @@ -2687,10 +1578,6 @@ impl GetNodeId for TSNullKeyword { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl GetNodeId for TSUndefinedKeyword { @@ -2698,10 +1585,6 @@ impl GetNodeId for TSUndefinedKeyword { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl GetNodeId for TSVoidKeyword { @@ -2709,10 +1592,6 @@ impl GetNodeId for TSVoidKeyword { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl GetNodeId for TSSymbolKeyword { @@ -2720,10 +1599,6 @@ impl GetNodeId for TSSymbolKeyword { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl GetNodeId for TSThisType { @@ -2731,10 +1606,6 @@ impl GetNodeId for TSThisType { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl GetNodeId for TSObjectKeyword { @@ -2742,10 +1613,6 @@ impl GetNodeId for TSObjectKeyword { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl GetNodeId for TSBigIntKeyword { @@ -2753,10 +1620,6 @@ impl GetNodeId for TSBigIntKeyword { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSTypeReference<'a> { @@ -2764,10 +1627,6 @@ impl<'a> GetNodeId for TSTypeReference<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSTypeName<'a> { @@ -2777,12 +1636,6 @@ impl<'a> GetNodeId for TSTypeName<'a> { Self::QualifiedName(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::IdentifierReference(it) => GetNodeId::node_id_mut(&mut **it), - Self::QualifiedName(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for TSQualifiedName<'a> { @@ -2790,10 +1643,6 @@ impl<'a> GetNodeId for TSQualifiedName<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSTypeParameterInstantiation<'a> { @@ -2801,10 +1650,6 @@ impl<'a> GetNodeId for TSTypeParameterInstantiation<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSTypeParameter<'a> { @@ -2812,10 +1657,6 @@ impl<'a> GetNodeId for TSTypeParameter<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSTypeParameterDeclaration<'a> { @@ -2823,10 +1664,6 @@ impl<'a> GetNodeId for TSTypeParameterDeclaration<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSTypeAliasDeclaration<'a> { @@ -2834,10 +1671,6 @@ impl<'a> GetNodeId for TSTypeAliasDeclaration<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSClassImplements<'a> { @@ -2845,10 +1678,6 @@ impl<'a> GetNodeId for TSClassImplements<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSInterfaceDeclaration<'a> { @@ -2856,10 +1685,6 @@ impl<'a> GetNodeId for TSInterfaceDeclaration<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSInterfaceBody<'a> { @@ -2867,10 +1692,6 @@ impl<'a> GetNodeId for TSInterfaceBody<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSPropertySignature<'a> { @@ -2878,10 +1699,6 @@ impl<'a> GetNodeId for TSPropertySignature<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSSignature<'a> { @@ -2894,15 +1711,6 @@ impl<'a> GetNodeId for TSSignature<'a> { Self::TSMethodSignature(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::TSIndexSignature(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSPropertySignature(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSCallSignatureDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSConstructSignatureDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSMethodSignature(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for TSIndexSignature<'a> { @@ -2910,10 +1718,6 @@ impl<'a> GetNodeId for TSIndexSignature<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSCallSignatureDeclaration<'a> { @@ -2921,10 +1725,6 @@ impl<'a> GetNodeId for TSCallSignatureDeclaration<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSMethodSignature<'a> { @@ -2932,10 +1732,6 @@ impl<'a> GetNodeId for TSMethodSignature<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSConstructSignatureDeclaration<'a> { @@ -2943,10 +1739,6 @@ impl<'a> GetNodeId for TSConstructSignatureDeclaration<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSIndexSignatureName<'a> { @@ -2954,10 +1746,6 @@ impl<'a> GetNodeId for TSIndexSignatureName<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSInterfaceHeritage<'a> { @@ -2965,10 +1753,6 @@ impl<'a> GetNodeId for TSInterfaceHeritage<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSTypePredicate<'a> { @@ -2976,10 +1760,6 @@ impl<'a> GetNodeId for TSTypePredicate<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSTypePredicateName<'a> { @@ -2989,12 +1769,6 @@ impl<'a> GetNodeId for TSTypePredicateName<'a> { Self::This(it) => GetNodeId::node_id(it), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::Identifier(it) => GetNodeId::node_id_mut(&mut **it), - Self::This(it) => GetNodeId::node_id_mut(it), - } - } } impl<'a> GetNodeId for TSModuleDeclaration<'a> { @@ -3002,10 +1776,6 @@ impl<'a> GetNodeId for TSModuleDeclaration<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSModuleDeclarationName<'a> { @@ -3015,12 +1785,6 @@ impl<'a> GetNodeId for TSModuleDeclarationName<'a> { Self::StringLiteral(it) => GetNodeId::node_id(it), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::Identifier(it) => GetNodeId::node_id_mut(it), - Self::StringLiteral(it) => GetNodeId::node_id_mut(it), - } - } } impl<'a> GetNodeId for TSModuleDeclarationBody<'a> { @@ -3030,12 +1794,6 @@ impl<'a> GetNodeId for TSModuleDeclarationBody<'a> { Self::TSModuleBlock(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::TSModuleDeclaration(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSModuleBlock(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for TSModuleBlock<'a> { @@ -3043,10 +1801,6 @@ impl<'a> GetNodeId for TSModuleBlock<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSTypeLiteral<'a> { @@ -3054,10 +1808,6 @@ impl<'a> GetNodeId for TSTypeLiteral<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSInferType<'a> { @@ -3065,10 +1815,6 @@ impl<'a> GetNodeId for TSInferType<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSTypeQuery<'a> { @@ -3076,10 +1822,6 @@ impl<'a> GetNodeId for TSTypeQuery<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSTypeQueryExprName<'a> { @@ -3090,13 +1832,6 @@ impl<'a> GetNodeId for TSTypeQueryExprName<'a> { Self::QualifiedName(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::TSImportType(it) => GetNodeId::node_id_mut(&mut **it), - Self::IdentifierReference(it) => GetNodeId::node_id_mut(&mut **it), - Self::QualifiedName(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for TSImportType<'a> { @@ -3104,10 +1839,6 @@ impl<'a> GetNodeId for TSImportType<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSImportAttributes<'a> { @@ -3115,10 +1846,6 @@ impl<'a> GetNodeId for TSImportAttributes<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSImportAttribute<'a> { @@ -3126,10 +1853,6 @@ impl<'a> GetNodeId for TSImportAttribute<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSImportAttributeName<'a> { @@ -3139,12 +1862,6 @@ impl<'a> GetNodeId for TSImportAttributeName<'a> { Self::StringLiteral(it) => GetNodeId::node_id(it), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::Identifier(it) => GetNodeId::node_id_mut(it), - Self::StringLiteral(it) => GetNodeId::node_id_mut(it), - } - } } impl<'a> GetNodeId for TSFunctionType<'a> { @@ -3152,10 +1869,6 @@ impl<'a> GetNodeId for TSFunctionType<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSConstructorType<'a> { @@ -3163,10 +1876,6 @@ impl<'a> GetNodeId for TSConstructorType<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSMappedType<'a> { @@ -3174,10 +1883,6 @@ impl<'a> GetNodeId for TSMappedType<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSTemplateLiteralType<'a> { @@ -3185,10 +1890,6 @@ impl<'a> GetNodeId for TSTemplateLiteralType<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSAsExpression<'a> { @@ -3196,10 +1897,6 @@ impl<'a> GetNodeId for TSAsExpression<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSSatisfiesExpression<'a> { @@ -3207,10 +1904,6 @@ impl<'a> GetNodeId for TSSatisfiesExpression<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSTypeAssertion<'a> { @@ -3218,10 +1911,6 @@ impl<'a> GetNodeId for TSTypeAssertion<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSImportEqualsDeclaration<'a> { @@ -3229,10 +1918,6 @@ impl<'a> GetNodeId for TSImportEqualsDeclaration<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSModuleReference<'a> { @@ -3243,13 +1928,6 @@ impl<'a> GetNodeId for TSModuleReference<'a> { Self::QualifiedName(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::ExternalModuleReference(it) => GetNodeId::node_id_mut(&mut **it), - Self::IdentifierReference(it) => GetNodeId::node_id_mut(&mut **it), - Self::QualifiedName(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for TSExternalModuleReference<'a> { @@ -3257,10 +1935,6 @@ impl<'a> GetNodeId for TSExternalModuleReference<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSNonNullExpression<'a> { @@ -3268,10 +1942,6 @@ impl<'a> GetNodeId for TSNonNullExpression<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for Decorator<'a> { @@ -3279,10 +1949,6 @@ impl<'a> GetNodeId for Decorator<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSExportAssignment<'a> { @@ -3290,10 +1956,6 @@ impl<'a> GetNodeId for TSExportAssignment<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSNamespaceExportDeclaration<'a> { @@ -3301,10 +1963,6 @@ impl<'a> GetNodeId for TSNamespaceExportDeclaration<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for TSInstantiationExpression<'a> { @@ -3312,10 +1970,6 @@ impl<'a> GetNodeId for TSInstantiationExpression<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for JSDocNullableType<'a> { @@ -3323,10 +1977,6 @@ impl<'a> GetNodeId for JSDocNullableType<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for JSDocNonNullableType<'a> { @@ -3334,10 +1984,6 @@ impl<'a> GetNodeId for JSDocNonNullableType<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl GetNodeId for JSDocUnknownType { @@ -3345,10 +1991,6 @@ impl GetNodeId for JSDocUnknownType { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for JSXElement<'a> { @@ -3356,10 +1998,6 @@ impl<'a> GetNodeId for JSXElement<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for JSXOpeningElement<'a> { @@ -3367,10 +2005,6 @@ impl<'a> GetNodeId for JSXOpeningElement<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for JSXClosingElement<'a> { @@ -3378,10 +2012,6 @@ impl<'a> GetNodeId for JSXClosingElement<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for JSXFragment<'a> { @@ -3389,10 +2019,6 @@ impl<'a> GetNodeId for JSXFragment<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for JSXElementName<'a> { @@ -3405,15 +2031,6 @@ impl<'a> GetNodeId for JSXElementName<'a> { Self::ThisExpression(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::Identifier(it) => GetNodeId::node_id_mut(&mut **it), - Self::IdentifierReference(it) => GetNodeId::node_id_mut(&mut **it), - Self::NamespacedName(it) => GetNodeId::node_id_mut(&mut **it), - Self::MemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ThisExpression(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for JSXNamespacedName<'a> { @@ -3421,10 +2038,6 @@ impl<'a> GetNodeId for JSXNamespacedName<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for JSXMemberExpression<'a> { @@ -3432,10 +2045,6 @@ impl<'a> GetNodeId for JSXMemberExpression<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for JSXMemberExpressionObject<'a> { @@ -3446,13 +2055,6 @@ impl<'a> GetNodeId for JSXMemberExpressionObject<'a> { Self::ThisExpression(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::IdentifierReference(it) => GetNodeId::node_id_mut(&mut **it), - Self::MemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ThisExpression(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for JSXExpressionContainer<'a> { @@ -3460,10 +2062,6 @@ impl<'a> GetNodeId for JSXExpressionContainer<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for JSXExpression<'a> { @@ -3514,53 +2112,6 @@ impl<'a> GetNodeId for JSXExpression<'a> { Self::PrivateFieldExpression(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::EmptyExpression(it) => GetNodeId::node_id_mut(it), - Self::BooleanLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::NullLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::NumericLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::BigIntLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::RegExpLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::StringLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::TemplateLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::Identifier(it) => GetNodeId::node_id_mut(&mut **it), - Self::MetaProperty(it) => GetNodeId::node_id_mut(&mut **it), - Self::Super(it) => GetNodeId::node_id_mut(&mut **it), - Self::ArrayExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ArrowFunctionExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::AssignmentExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::AwaitExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::BinaryExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::CallExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ChainExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ClassExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ConditionalExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::FunctionExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ImportExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::LogicalExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::NewExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ObjectExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ParenthesizedExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::SequenceExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TaggedTemplateExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ThisExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::UnaryExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::UpdateExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::YieldExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::PrivateInExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::JSXElement(it) => GetNodeId::node_id_mut(&mut **it), - Self::JSXFragment(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSAsExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSSatisfiesExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSTypeAssertion(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSNonNullExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::TSInstantiationExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::ComputedMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::StaticMemberExpression(it) => GetNodeId::node_id_mut(&mut **it), - Self::PrivateFieldExpression(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl GetNodeId for JSXEmptyExpression { @@ -3568,10 +2119,6 @@ impl GetNodeId for JSXEmptyExpression { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for JSXAttributeItem<'a> { @@ -3581,12 +2128,6 @@ impl<'a> GetNodeId for JSXAttributeItem<'a> { Self::SpreadAttribute(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::Attribute(it) => GetNodeId::node_id_mut(&mut **it), - Self::SpreadAttribute(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for JSXAttribute<'a> { @@ -3594,10 +2135,6 @@ impl<'a> GetNodeId for JSXAttribute<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for JSXSpreadAttribute<'a> { @@ -3605,10 +2142,6 @@ impl<'a> GetNodeId for JSXSpreadAttribute<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for JSXAttributeName<'a> { @@ -3618,12 +2151,6 @@ impl<'a> GetNodeId for JSXAttributeName<'a> { Self::NamespacedName(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::Identifier(it) => GetNodeId::node_id_mut(&mut **it), - Self::NamespacedName(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for JSXAttributeValue<'a> { @@ -3635,14 +2162,6 @@ impl<'a> GetNodeId for JSXAttributeValue<'a> { Self::Fragment(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::StringLiteral(it) => GetNodeId::node_id_mut(&mut **it), - Self::ExpressionContainer(it) => GetNodeId::node_id_mut(&mut **it), - Self::Element(it) => GetNodeId::node_id_mut(&mut **it), - Self::Fragment(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for JSXIdentifier<'a> { @@ -3650,10 +2169,6 @@ impl<'a> GetNodeId for JSXIdentifier<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for JSXChild<'a> { @@ -3666,15 +2181,6 @@ impl<'a> GetNodeId for JSXChild<'a> { Self::Spread(it) => GetNodeId::node_id(it.as_ref()), } } - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - Self::Text(it) => GetNodeId::node_id_mut(&mut **it), - Self::Element(it) => GetNodeId::node_id_mut(&mut **it), - Self::Fragment(it) => GetNodeId::node_id_mut(&mut **it), - Self::ExpressionContainer(it) => GetNodeId::node_id_mut(&mut **it), - Self::Spread(it) => GetNodeId::node_id_mut(&mut **it), - } - } } impl<'a> GetNodeId for JSXSpreadChild<'a> { @@ -3682,10 +2188,6 @@ impl<'a> GetNodeId for JSXSpreadChild<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } impl<'a> GetNodeId for JSXText<'a> { @@ -3693,8 +2195,4 @@ impl<'a> GetNodeId for JSXText<'a> { fn node_id(&self) -> NodeId { self.node_id } - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } diff --git a/crates/oxc_syntax/src/node.rs b/crates/oxc_syntax/src/node.rs index f834ce300080a..b6742fd94c551 100644 --- a/crates/oxc_syntax/src/node.rs +++ b/crates/oxc_syntax/src/node.rs @@ -8,7 +8,6 @@ use serde::{Serialize, Serializer}; pub trait GetNodeId { fn node_id(&self) -> NodeId; - fn node_id_mut(&mut self) -> &mut NodeId; } #[ast] diff --git a/tasks/ast_tools/src/derives/get_node_id.rs b/tasks/ast_tools/src/derives/get_node_id.rs index ba5faf82648a0..e10cf0bd05cd4 100644 --- a/tasks/ast_tools/src/derives/get_node_id.rs +++ b/tasks/ast_tools/src/derives/get_node_id.rs @@ -1,3 +1,4 @@ +use itertools::Itertools; use proc_macro2::TokenStream; use quote::quote; @@ -38,26 +39,23 @@ fn derive_enum(def: &EnumDef) -> TokenStream { let target_type = def.to_type(); let generics = def.generics(); - let (matches, matches_mut) = def + let matches = def .all_variants() .map(|var| { let ident = var.ident(); let it = quote!(it); - let (it, it_mut) = if var + let it = if var .fields .first() .is_some_and(|it| it.typ.analysis().wrapper == TypeWrapper::Box) { - ("e!(it.as_ref()), "e!(&mut **it)) + "e!(it.as_ref()) } else { - (&it, &it) + &it }; - ( - quote!(Self :: #ident(it) => GetNodeId::node_id(#it)), - quote!(Self :: #ident(it) => GetNodeId::node_id_mut(#it_mut)), - ) + quote!(Self :: #ident(it) => GetNodeId::node_id(#it)) }) - .collect::<(Vec<_>, Vec<_>)>(); + .collect_vec(); quote! { impl #generics GetNodeId for #target_type { @@ -66,12 +64,6 @@ fn derive_enum(def: &EnumDef) -> TokenStream { #(#matches),* } } - - fn node_id_mut(&mut self) -> &mut NodeId { - match self { - #(#matches_mut),* - } - } } } } @@ -86,11 +78,6 @@ fn derive_struct(def: &StructDef) -> TokenStream { fn node_id(&self) -> NodeId { self.node_id } - - #[inline] - fn node_id_mut(&mut self) -> &mut NodeId { - &mut self.node_id - } } } }