1#![allow(clippy::match_same_arms)]
5
6use oxc_span::ContentEq;
7
8use crate::ast::comment::*;
9use crate::ast::js::*;
10use crate::ast::jsx::*;
11use crate::ast::literal::*;
12use crate::ast::ts::*;
13
14impl ContentEq for Program<'_> {
15 fn content_eq(&self, other: &Self) -> bool {
16 ContentEq::content_eq(&self.source_type, &other.source_type)
17 && ContentEq::content_eq(&self.hashbang, &other.hashbang)
18 && ContentEq::content_eq(&self.directives, &other.directives)
19 && ContentEq::content_eq(&self.body, &other.body)
20 }
21}
22
23impl ContentEq for Expression<'_> {
24 fn content_eq(&self, other: &Self) -> bool {
25 match (self, other) {
26 (Self::BooleanLiteral(a), Self::BooleanLiteral(b)) => a.content_eq(b),
27 (Self::NullLiteral(a), Self::NullLiteral(b)) => a.content_eq(b),
28 (Self::NumericLiteral(a), Self::NumericLiteral(b)) => a.content_eq(b),
29 (Self::BigIntLiteral(a), Self::BigIntLiteral(b)) => a.content_eq(b),
30 (Self::RegExpLiteral(a), Self::RegExpLiteral(b)) => a.content_eq(b),
31 (Self::StringLiteral(a), Self::StringLiteral(b)) => a.content_eq(b),
32 (Self::TemplateLiteral(a), Self::TemplateLiteral(b)) => a.content_eq(b),
33 (Self::Identifier(a), Self::Identifier(b)) => a.content_eq(b),
34 (Self::MetaProperty(a), Self::MetaProperty(b)) => a.content_eq(b),
35 (Self::Super(a), Self::Super(b)) => a.content_eq(b),
36 (Self::ArrayExpression(a), Self::ArrayExpression(b)) => a.content_eq(b),
37 (Self::ArrowFunctionExpression(a), Self::ArrowFunctionExpression(b)) => a.content_eq(b),
38 (Self::AssignmentExpression(a), Self::AssignmentExpression(b)) => a.content_eq(b),
39 (Self::AwaitExpression(a), Self::AwaitExpression(b)) => a.content_eq(b),
40 (Self::BinaryExpression(a), Self::BinaryExpression(b)) => a.content_eq(b),
41 (Self::CallExpression(a), Self::CallExpression(b)) => a.content_eq(b),
42 (Self::ChainExpression(a), Self::ChainExpression(b)) => a.content_eq(b),
43 (Self::ClassExpression(a), Self::ClassExpression(b)) => a.content_eq(b),
44 (Self::ConditionalExpression(a), Self::ConditionalExpression(b)) => a.content_eq(b),
45 (Self::FunctionExpression(a), Self::FunctionExpression(b)) => a.content_eq(b),
46 (Self::ImportExpression(a), Self::ImportExpression(b)) => a.content_eq(b),
47 (Self::LogicalExpression(a), Self::LogicalExpression(b)) => a.content_eq(b),
48 (Self::NewExpression(a), Self::NewExpression(b)) => a.content_eq(b),
49 (Self::ObjectExpression(a), Self::ObjectExpression(b)) => a.content_eq(b),
50 (Self::ParenthesizedExpression(a), Self::ParenthesizedExpression(b)) => a.content_eq(b),
51 (Self::SequenceExpression(a), Self::SequenceExpression(b)) => a.content_eq(b),
52 (Self::TaggedTemplateExpression(a), Self::TaggedTemplateExpression(b)) => {
53 a.content_eq(b)
54 }
55 (Self::ThisExpression(a), Self::ThisExpression(b)) => a.content_eq(b),
56 (Self::UnaryExpression(a), Self::UnaryExpression(b)) => a.content_eq(b),
57 (Self::UpdateExpression(a), Self::UpdateExpression(b)) => a.content_eq(b),
58 (Self::YieldExpression(a), Self::YieldExpression(b)) => a.content_eq(b),
59 (Self::PrivateInExpression(a), Self::PrivateInExpression(b)) => a.content_eq(b),
60 (Self::JSXElement(a), Self::JSXElement(b)) => a.content_eq(b),
61 (Self::JSXFragment(a), Self::JSXFragment(b)) => a.content_eq(b),
62 (Self::TSAsExpression(a), Self::TSAsExpression(b)) => a.content_eq(b),
63 (Self::TSSatisfiesExpression(a), Self::TSSatisfiesExpression(b)) => a.content_eq(b),
64 (Self::TSTypeAssertion(a), Self::TSTypeAssertion(b)) => a.content_eq(b),
65 (Self::TSNonNullExpression(a), Self::TSNonNullExpression(b)) => a.content_eq(b),
66 (Self::TSInstantiationExpression(a), Self::TSInstantiationExpression(b)) => {
67 a.content_eq(b)
68 }
69 (Self::V8IntrinsicExpression(a), Self::V8IntrinsicExpression(b)) => a.content_eq(b),
70 (Self::ComputedMemberExpression(a), Self::ComputedMemberExpression(b)) => {
71 a.content_eq(b)
72 }
73 (Self::StaticMemberExpression(a), Self::StaticMemberExpression(b)) => a.content_eq(b),
74 (Self::PrivateFieldExpression(a), Self::PrivateFieldExpression(b)) => a.content_eq(b),
75 _ => false,
76 }
77 }
78}
79
80impl ContentEq for IdentifierName<'_> {
81 fn content_eq(&self, other: &Self) -> bool {
82 ContentEq::content_eq(&self.name, &other.name)
83 }
84}
85
86impl ContentEq for IdentifierReference<'_> {
87 fn content_eq(&self, other: &Self) -> bool {
88 ContentEq::content_eq(&self.name, &other.name)
89 }
90}
91
92impl ContentEq for BindingIdentifier<'_> {
93 fn content_eq(&self, other: &Self) -> bool {
94 ContentEq::content_eq(&self.name, &other.name)
95 }
96}
97
98impl ContentEq for LabelIdentifier<'_> {
99 fn content_eq(&self, other: &Self) -> bool {
100 ContentEq::content_eq(&self.name, &other.name)
101 }
102}
103
104impl ContentEq for ThisExpression {
105 fn content_eq(&self, _: &Self) -> bool {
106 true
107 }
108}
109
110impl ContentEq for ArrayExpression<'_> {
111 fn content_eq(&self, other: &Self) -> bool {
112 ContentEq::content_eq(&self.elements, &other.elements)
113 }
114}
115
116impl ContentEq for ArrayExpressionElement<'_> {
117 fn content_eq(&self, other: &Self) -> bool {
118 match (self, other) {
119 (Self::SpreadElement(a), Self::SpreadElement(b)) => a.content_eq(b),
120 (Self::Elision(a), Self::Elision(b)) => a.content_eq(b),
121 (Self::BooleanLiteral(a), Self::BooleanLiteral(b)) => a.content_eq(b),
122 (Self::NullLiteral(a), Self::NullLiteral(b)) => a.content_eq(b),
123 (Self::NumericLiteral(a), Self::NumericLiteral(b)) => a.content_eq(b),
124 (Self::BigIntLiteral(a), Self::BigIntLiteral(b)) => a.content_eq(b),
125 (Self::RegExpLiteral(a), Self::RegExpLiteral(b)) => a.content_eq(b),
126 (Self::StringLiteral(a), Self::StringLiteral(b)) => a.content_eq(b),
127 (Self::TemplateLiteral(a), Self::TemplateLiteral(b)) => a.content_eq(b),
128 (Self::Identifier(a), Self::Identifier(b)) => a.content_eq(b),
129 (Self::MetaProperty(a), Self::MetaProperty(b)) => a.content_eq(b),
130 (Self::Super(a), Self::Super(b)) => a.content_eq(b),
131 (Self::ArrayExpression(a), Self::ArrayExpression(b)) => a.content_eq(b),
132 (Self::ArrowFunctionExpression(a), Self::ArrowFunctionExpression(b)) => a.content_eq(b),
133 (Self::AssignmentExpression(a), Self::AssignmentExpression(b)) => a.content_eq(b),
134 (Self::AwaitExpression(a), Self::AwaitExpression(b)) => a.content_eq(b),
135 (Self::BinaryExpression(a), Self::BinaryExpression(b)) => a.content_eq(b),
136 (Self::CallExpression(a), Self::CallExpression(b)) => a.content_eq(b),
137 (Self::ChainExpression(a), Self::ChainExpression(b)) => a.content_eq(b),
138 (Self::ClassExpression(a), Self::ClassExpression(b)) => a.content_eq(b),
139 (Self::ConditionalExpression(a), Self::ConditionalExpression(b)) => a.content_eq(b),
140 (Self::FunctionExpression(a), Self::FunctionExpression(b)) => a.content_eq(b),
141 (Self::ImportExpression(a), Self::ImportExpression(b)) => a.content_eq(b),
142 (Self::LogicalExpression(a), Self::LogicalExpression(b)) => a.content_eq(b),
143 (Self::NewExpression(a), Self::NewExpression(b)) => a.content_eq(b),
144 (Self::ObjectExpression(a), Self::ObjectExpression(b)) => a.content_eq(b),
145 (Self::ParenthesizedExpression(a), Self::ParenthesizedExpression(b)) => a.content_eq(b),
146 (Self::SequenceExpression(a), Self::SequenceExpression(b)) => a.content_eq(b),
147 (Self::TaggedTemplateExpression(a), Self::TaggedTemplateExpression(b)) => {
148 a.content_eq(b)
149 }
150 (Self::ThisExpression(a), Self::ThisExpression(b)) => a.content_eq(b),
151 (Self::UnaryExpression(a), Self::UnaryExpression(b)) => a.content_eq(b),
152 (Self::UpdateExpression(a), Self::UpdateExpression(b)) => a.content_eq(b),
153 (Self::YieldExpression(a), Self::YieldExpression(b)) => a.content_eq(b),
154 (Self::PrivateInExpression(a), Self::PrivateInExpression(b)) => a.content_eq(b),
155 (Self::JSXElement(a), Self::JSXElement(b)) => a.content_eq(b),
156 (Self::JSXFragment(a), Self::JSXFragment(b)) => a.content_eq(b),
157 (Self::TSAsExpression(a), Self::TSAsExpression(b)) => a.content_eq(b),
158 (Self::TSSatisfiesExpression(a), Self::TSSatisfiesExpression(b)) => a.content_eq(b),
159 (Self::TSTypeAssertion(a), Self::TSTypeAssertion(b)) => a.content_eq(b),
160 (Self::TSNonNullExpression(a), Self::TSNonNullExpression(b)) => a.content_eq(b),
161 (Self::TSInstantiationExpression(a), Self::TSInstantiationExpression(b)) => {
162 a.content_eq(b)
163 }
164 (Self::V8IntrinsicExpression(a), Self::V8IntrinsicExpression(b)) => a.content_eq(b),
165 (Self::ComputedMemberExpression(a), Self::ComputedMemberExpression(b)) => {
166 a.content_eq(b)
167 }
168 (Self::StaticMemberExpression(a), Self::StaticMemberExpression(b)) => a.content_eq(b),
169 (Self::PrivateFieldExpression(a), Self::PrivateFieldExpression(b)) => a.content_eq(b),
170 _ => false,
171 }
172 }
173}
174
175impl ContentEq for Elision {
176 fn content_eq(&self, _: &Self) -> bool {
177 true
178 }
179}
180
181impl ContentEq for ObjectExpression<'_> {
182 fn content_eq(&self, other: &Self) -> bool {
183 ContentEq::content_eq(&self.properties, &other.properties)
184 }
185}
186
187impl ContentEq for ObjectPropertyKind<'_> {
188 fn content_eq(&self, other: &Self) -> bool {
189 match (self, other) {
190 (Self::ObjectProperty(a), Self::ObjectProperty(b)) => a.content_eq(b),
191 (Self::SpreadProperty(a), Self::SpreadProperty(b)) => a.content_eq(b),
192 _ => false,
193 }
194 }
195}
196
197impl ContentEq for ObjectProperty<'_> {
198 fn content_eq(&self, other: &Self) -> bool {
199 ContentEq::content_eq(&self.kind, &other.kind)
200 && ContentEq::content_eq(&self.key, &other.key)
201 && ContentEq::content_eq(&self.value, &other.value)
202 && ContentEq::content_eq(&self.method, &other.method)
203 && ContentEq::content_eq(&self.shorthand, &other.shorthand)
204 && ContentEq::content_eq(&self.computed, &other.computed)
205 }
206}
207
208impl ContentEq for PropertyKey<'_> {
209 fn content_eq(&self, other: &Self) -> bool {
210 match (self, other) {
211 (Self::StaticIdentifier(a), Self::StaticIdentifier(b)) => a.content_eq(b),
212 (Self::PrivateIdentifier(a), Self::PrivateIdentifier(b)) => a.content_eq(b),
213 (Self::BooleanLiteral(a), Self::BooleanLiteral(b)) => a.content_eq(b),
214 (Self::NullLiteral(a), Self::NullLiteral(b)) => a.content_eq(b),
215 (Self::NumericLiteral(a), Self::NumericLiteral(b)) => a.content_eq(b),
216 (Self::BigIntLiteral(a), Self::BigIntLiteral(b)) => a.content_eq(b),
217 (Self::RegExpLiteral(a), Self::RegExpLiteral(b)) => a.content_eq(b),
218 (Self::StringLiteral(a), Self::StringLiteral(b)) => a.content_eq(b),
219 (Self::TemplateLiteral(a), Self::TemplateLiteral(b)) => a.content_eq(b),
220 (Self::Identifier(a), Self::Identifier(b)) => a.content_eq(b),
221 (Self::MetaProperty(a), Self::MetaProperty(b)) => a.content_eq(b),
222 (Self::Super(a), Self::Super(b)) => a.content_eq(b),
223 (Self::ArrayExpression(a), Self::ArrayExpression(b)) => a.content_eq(b),
224 (Self::ArrowFunctionExpression(a), Self::ArrowFunctionExpression(b)) => a.content_eq(b),
225 (Self::AssignmentExpression(a), Self::AssignmentExpression(b)) => a.content_eq(b),
226 (Self::AwaitExpression(a), Self::AwaitExpression(b)) => a.content_eq(b),
227 (Self::BinaryExpression(a), Self::BinaryExpression(b)) => a.content_eq(b),
228 (Self::CallExpression(a), Self::CallExpression(b)) => a.content_eq(b),
229 (Self::ChainExpression(a), Self::ChainExpression(b)) => a.content_eq(b),
230 (Self::ClassExpression(a), Self::ClassExpression(b)) => a.content_eq(b),
231 (Self::ConditionalExpression(a), Self::ConditionalExpression(b)) => a.content_eq(b),
232 (Self::FunctionExpression(a), Self::FunctionExpression(b)) => a.content_eq(b),
233 (Self::ImportExpression(a), Self::ImportExpression(b)) => a.content_eq(b),
234 (Self::LogicalExpression(a), Self::LogicalExpression(b)) => a.content_eq(b),
235 (Self::NewExpression(a), Self::NewExpression(b)) => a.content_eq(b),
236 (Self::ObjectExpression(a), Self::ObjectExpression(b)) => a.content_eq(b),
237 (Self::ParenthesizedExpression(a), Self::ParenthesizedExpression(b)) => a.content_eq(b),
238 (Self::SequenceExpression(a), Self::SequenceExpression(b)) => a.content_eq(b),
239 (Self::TaggedTemplateExpression(a), Self::TaggedTemplateExpression(b)) => {
240 a.content_eq(b)
241 }
242 (Self::ThisExpression(a), Self::ThisExpression(b)) => a.content_eq(b),
243 (Self::UnaryExpression(a), Self::UnaryExpression(b)) => a.content_eq(b),
244 (Self::UpdateExpression(a), Self::UpdateExpression(b)) => a.content_eq(b),
245 (Self::YieldExpression(a), Self::YieldExpression(b)) => a.content_eq(b),
246 (Self::PrivateInExpression(a), Self::PrivateInExpression(b)) => a.content_eq(b),
247 (Self::JSXElement(a), Self::JSXElement(b)) => a.content_eq(b),
248 (Self::JSXFragment(a), Self::JSXFragment(b)) => a.content_eq(b),
249 (Self::TSAsExpression(a), Self::TSAsExpression(b)) => a.content_eq(b),
250 (Self::TSSatisfiesExpression(a), Self::TSSatisfiesExpression(b)) => a.content_eq(b),
251 (Self::TSTypeAssertion(a), Self::TSTypeAssertion(b)) => a.content_eq(b),
252 (Self::TSNonNullExpression(a), Self::TSNonNullExpression(b)) => a.content_eq(b),
253 (Self::TSInstantiationExpression(a), Self::TSInstantiationExpression(b)) => {
254 a.content_eq(b)
255 }
256 (Self::V8IntrinsicExpression(a), Self::V8IntrinsicExpression(b)) => a.content_eq(b),
257 (Self::ComputedMemberExpression(a), Self::ComputedMemberExpression(b)) => {
258 a.content_eq(b)
259 }
260 (Self::StaticMemberExpression(a), Self::StaticMemberExpression(b)) => a.content_eq(b),
261 (Self::PrivateFieldExpression(a), Self::PrivateFieldExpression(b)) => a.content_eq(b),
262 _ => false,
263 }
264 }
265}
266
267impl ContentEq for PropertyKind {
268 fn content_eq(&self, other: &Self) -> bool {
269 self == other
270 }
271}
272
273impl ContentEq for TemplateLiteral<'_> {
274 fn content_eq(&self, other: &Self) -> bool {
275 ContentEq::content_eq(&self.quasis, &other.quasis)
276 && ContentEq::content_eq(&self.expressions, &other.expressions)
277 }
278}
279
280impl ContentEq for TaggedTemplateExpression<'_> {
281 fn content_eq(&self, other: &Self) -> bool {
282 ContentEq::content_eq(&self.tag, &other.tag)
283 && ContentEq::content_eq(&self.type_arguments, &other.type_arguments)
284 && ContentEq::content_eq(&self.quasi, &other.quasi)
285 }
286}
287
288impl ContentEq for TemplateElement<'_> {
289 fn content_eq(&self, other: &Self) -> bool {
290 ContentEq::content_eq(&self.value, &other.value)
291 && ContentEq::content_eq(&self.tail, &other.tail)
292 && ContentEq::content_eq(&self.lone_surrogates, &other.lone_surrogates)
293 }
294}
295
296impl ContentEq for TemplateElementValue<'_> {
297 fn content_eq(&self, other: &Self) -> bool {
298 ContentEq::content_eq(&self.raw, &other.raw)
299 && ContentEq::content_eq(&self.cooked, &other.cooked)
300 }
301}
302
303impl ContentEq for MemberExpression<'_> {
304 fn content_eq(&self, other: &Self) -> bool {
305 match (self, other) {
306 (Self::ComputedMemberExpression(a), Self::ComputedMemberExpression(b)) => {
307 a.content_eq(b)
308 }
309 (Self::StaticMemberExpression(a), Self::StaticMemberExpression(b)) => a.content_eq(b),
310 (Self::PrivateFieldExpression(a), Self::PrivateFieldExpression(b)) => a.content_eq(b),
311 _ => false,
312 }
313 }
314}
315
316impl ContentEq for ComputedMemberExpression<'_> {
317 fn content_eq(&self, other: &Self) -> bool {
318 ContentEq::content_eq(&self.object, &other.object)
319 && ContentEq::content_eq(&self.expression, &other.expression)
320 && ContentEq::content_eq(&self.optional, &other.optional)
321 }
322}
323
324impl ContentEq for StaticMemberExpression<'_> {
325 fn content_eq(&self, other: &Self) -> bool {
326 ContentEq::content_eq(&self.object, &other.object)
327 && ContentEq::content_eq(&self.property, &other.property)
328 && ContentEq::content_eq(&self.optional, &other.optional)
329 }
330}
331
332impl ContentEq for PrivateFieldExpression<'_> {
333 fn content_eq(&self, other: &Self) -> bool {
334 ContentEq::content_eq(&self.object, &other.object)
335 && ContentEq::content_eq(&self.field, &other.field)
336 && ContentEq::content_eq(&self.optional, &other.optional)
337 }
338}
339
340impl ContentEq for CallExpression<'_> {
341 fn content_eq(&self, other: &Self) -> bool {
342 ContentEq::content_eq(&self.callee, &other.callee)
343 && ContentEq::content_eq(&self.type_arguments, &other.type_arguments)
344 && ContentEq::content_eq(&self.arguments, &other.arguments)
345 && ContentEq::content_eq(&self.optional, &other.optional)
346 && ContentEq::content_eq(&self.pure, &other.pure)
347 }
348}
349
350impl ContentEq for NewExpression<'_> {
351 fn content_eq(&self, other: &Self) -> bool {
352 ContentEq::content_eq(&self.callee, &other.callee)
353 && ContentEq::content_eq(&self.type_arguments, &other.type_arguments)
354 && ContentEq::content_eq(&self.arguments, &other.arguments)
355 && ContentEq::content_eq(&self.pure, &other.pure)
356 }
357}
358
359impl ContentEq for MetaProperty<'_> {
360 fn content_eq(&self, other: &Self) -> bool {
361 ContentEq::content_eq(&self.meta, &other.meta)
362 && ContentEq::content_eq(&self.property, &other.property)
363 }
364}
365
366impl ContentEq for SpreadElement<'_> {
367 fn content_eq(&self, other: &Self) -> bool {
368 ContentEq::content_eq(&self.argument, &other.argument)
369 }
370}
371
372impl ContentEq for Argument<'_> {
373 fn content_eq(&self, other: &Self) -> bool {
374 match (self, other) {
375 (Self::SpreadElement(a), Self::SpreadElement(b)) => a.content_eq(b),
376 (Self::BooleanLiteral(a), Self::BooleanLiteral(b)) => a.content_eq(b),
377 (Self::NullLiteral(a), Self::NullLiteral(b)) => a.content_eq(b),
378 (Self::NumericLiteral(a), Self::NumericLiteral(b)) => a.content_eq(b),
379 (Self::BigIntLiteral(a), Self::BigIntLiteral(b)) => a.content_eq(b),
380 (Self::RegExpLiteral(a), Self::RegExpLiteral(b)) => a.content_eq(b),
381 (Self::StringLiteral(a), Self::StringLiteral(b)) => a.content_eq(b),
382 (Self::TemplateLiteral(a), Self::TemplateLiteral(b)) => a.content_eq(b),
383 (Self::Identifier(a), Self::Identifier(b)) => a.content_eq(b),
384 (Self::MetaProperty(a), Self::MetaProperty(b)) => a.content_eq(b),
385 (Self::Super(a), Self::Super(b)) => a.content_eq(b),
386 (Self::ArrayExpression(a), Self::ArrayExpression(b)) => a.content_eq(b),
387 (Self::ArrowFunctionExpression(a), Self::ArrowFunctionExpression(b)) => a.content_eq(b),
388 (Self::AssignmentExpression(a), Self::AssignmentExpression(b)) => a.content_eq(b),
389 (Self::AwaitExpression(a), Self::AwaitExpression(b)) => a.content_eq(b),
390 (Self::BinaryExpression(a), Self::BinaryExpression(b)) => a.content_eq(b),
391 (Self::CallExpression(a), Self::CallExpression(b)) => a.content_eq(b),
392 (Self::ChainExpression(a), Self::ChainExpression(b)) => a.content_eq(b),
393 (Self::ClassExpression(a), Self::ClassExpression(b)) => a.content_eq(b),
394 (Self::ConditionalExpression(a), Self::ConditionalExpression(b)) => a.content_eq(b),
395 (Self::FunctionExpression(a), Self::FunctionExpression(b)) => a.content_eq(b),
396 (Self::ImportExpression(a), Self::ImportExpression(b)) => a.content_eq(b),
397 (Self::LogicalExpression(a), Self::LogicalExpression(b)) => a.content_eq(b),
398 (Self::NewExpression(a), Self::NewExpression(b)) => a.content_eq(b),
399 (Self::ObjectExpression(a), Self::ObjectExpression(b)) => a.content_eq(b),
400 (Self::ParenthesizedExpression(a), Self::ParenthesizedExpression(b)) => a.content_eq(b),
401 (Self::SequenceExpression(a), Self::SequenceExpression(b)) => a.content_eq(b),
402 (Self::TaggedTemplateExpression(a), Self::TaggedTemplateExpression(b)) => {
403 a.content_eq(b)
404 }
405 (Self::ThisExpression(a), Self::ThisExpression(b)) => a.content_eq(b),
406 (Self::UnaryExpression(a), Self::UnaryExpression(b)) => a.content_eq(b),
407 (Self::UpdateExpression(a), Self::UpdateExpression(b)) => a.content_eq(b),
408 (Self::YieldExpression(a), Self::YieldExpression(b)) => a.content_eq(b),
409 (Self::PrivateInExpression(a), Self::PrivateInExpression(b)) => a.content_eq(b),
410 (Self::JSXElement(a), Self::JSXElement(b)) => a.content_eq(b),
411 (Self::JSXFragment(a), Self::JSXFragment(b)) => a.content_eq(b),
412 (Self::TSAsExpression(a), Self::TSAsExpression(b)) => a.content_eq(b),
413 (Self::TSSatisfiesExpression(a), Self::TSSatisfiesExpression(b)) => a.content_eq(b),
414 (Self::TSTypeAssertion(a), Self::TSTypeAssertion(b)) => a.content_eq(b),
415 (Self::TSNonNullExpression(a), Self::TSNonNullExpression(b)) => a.content_eq(b),
416 (Self::TSInstantiationExpression(a), Self::TSInstantiationExpression(b)) => {
417 a.content_eq(b)
418 }
419 (Self::V8IntrinsicExpression(a), Self::V8IntrinsicExpression(b)) => a.content_eq(b),
420 (Self::ComputedMemberExpression(a), Self::ComputedMemberExpression(b)) => {
421 a.content_eq(b)
422 }
423 (Self::StaticMemberExpression(a), Self::StaticMemberExpression(b)) => a.content_eq(b),
424 (Self::PrivateFieldExpression(a), Self::PrivateFieldExpression(b)) => a.content_eq(b),
425 _ => false,
426 }
427 }
428}
429
430impl ContentEq for UpdateExpression<'_> {
431 fn content_eq(&self, other: &Self) -> bool {
432 ContentEq::content_eq(&self.operator, &other.operator)
433 && ContentEq::content_eq(&self.prefix, &other.prefix)
434 && ContentEq::content_eq(&self.argument, &other.argument)
435 }
436}
437
438impl ContentEq for UnaryExpression<'_> {
439 fn content_eq(&self, other: &Self) -> bool {
440 ContentEq::content_eq(&self.operator, &other.operator)
441 && ContentEq::content_eq(&self.argument, &other.argument)
442 }
443}
444
445impl ContentEq for BinaryExpression<'_> {
446 fn content_eq(&self, other: &Self) -> bool {
447 ContentEq::content_eq(&self.left, &other.left)
448 && ContentEq::content_eq(&self.operator, &other.operator)
449 && ContentEq::content_eq(&self.right, &other.right)
450 }
451}
452
453impl ContentEq for PrivateInExpression<'_> {
454 fn content_eq(&self, other: &Self) -> bool {
455 ContentEq::content_eq(&self.left, &other.left)
456 && ContentEq::content_eq(&self.right, &other.right)
457 }
458}
459
460impl ContentEq for LogicalExpression<'_> {
461 fn content_eq(&self, other: &Self) -> bool {
462 ContentEq::content_eq(&self.left, &other.left)
463 && ContentEq::content_eq(&self.operator, &other.operator)
464 && ContentEq::content_eq(&self.right, &other.right)
465 }
466}
467
468impl ContentEq for ConditionalExpression<'_> {
469 fn content_eq(&self, other: &Self) -> bool {
470 ContentEq::content_eq(&self.test, &other.test)
471 && ContentEq::content_eq(&self.consequent, &other.consequent)
472 && ContentEq::content_eq(&self.alternate, &other.alternate)
473 }
474}
475
476impl ContentEq for AssignmentExpression<'_> {
477 fn content_eq(&self, other: &Self) -> bool {
478 ContentEq::content_eq(&self.operator, &other.operator)
479 && ContentEq::content_eq(&self.left, &other.left)
480 && ContentEq::content_eq(&self.right, &other.right)
481 }
482}
483
484impl ContentEq for AssignmentTarget<'_> {
485 fn content_eq(&self, other: &Self) -> bool {
486 match (self, other) {
487 (Self::AssignmentTargetIdentifier(a), Self::AssignmentTargetIdentifier(b)) => {
488 a.content_eq(b)
489 }
490 (Self::TSAsExpression(a), Self::TSAsExpression(b)) => a.content_eq(b),
491 (Self::TSSatisfiesExpression(a), Self::TSSatisfiesExpression(b)) => a.content_eq(b),
492 (Self::TSNonNullExpression(a), Self::TSNonNullExpression(b)) => a.content_eq(b),
493 (Self::TSTypeAssertion(a), Self::TSTypeAssertion(b)) => a.content_eq(b),
494 (Self::ComputedMemberExpression(a), Self::ComputedMemberExpression(b)) => {
495 a.content_eq(b)
496 }
497 (Self::StaticMemberExpression(a), Self::StaticMemberExpression(b)) => a.content_eq(b),
498 (Self::PrivateFieldExpression(a), Self::PrivateFieldExpression(b)) => a.content_eq(b),
499 (Self::ArrayAssignmentTarget(a), Self::ArrayAssignmentTarget(b)) => a.content_eq(b),
500 (Self::ObjectAssignmentTarget(a), Self::ObjectAssignmentTarget(b)) => a.content_eq(b),
501 _ => false,
502 }
503 }
504}
505
506impl ContentEq for SimpleAssignmentTarget<'_> {
507 fn content_eq(&self, other: &Self) -> bool {
508 match (self, other) {
509 (Self::AssignmentTargetIdentifier(a), Self::AssignmentTargetIdentifier(b)) => {
510 a.content_eq(b)
511 }
512 (Self::TSAsExpression(a), Self::TSAsExpression(b)) => a.content_eq(b),
513 (Self::TSSatisfiesExpression(a), Self::TSSatisfiesExpression(b)) => a.content_eq(b),
514 (Self::TSNonNullExpression(a), Self::TSNonNullExpression(b)) => a.content_eq(b),
515 (Self::TSTypeAssertion(a), Self::TSTypeAssertion(b)) => a.content_eq(b),
516 (Self::ComputedMemberExpression(a), Self::ComputedMemberExpression(b)) => {
517 a.content_eq(b)
518 }
519 (Self::StaticMemberExpression(a), Self::StaticMemberExpression(b)) => a.content_eq(b),
520 (Self::PrivateFieldExpression(a), Self::PrivateFieldExpression(b)) => a.content_eq(b),
521 _ => false,
522 }
523 }
524}
525
526impl ContentEq for AssignmentTargetPattern<'_> {
527 fn content_eq(&self, other: &Self) -> bool {
528 match (self, other) {
529 (Self::ArrayAssignmentTarget(a), Self::ArrayAssignmentTarget(b)) => a.content_eq(b),
530 (Self::ObjectAssignmentTarget(a), Self::ObjectAssignmentTarget(b)) => a.content_eq(b),
531 _ => false,
532 }
533 }
534}
535
536impl ContentEq for ArrayAssignmentTarget<'_> {
537 fn content_eq(&self, other: &Self) -> bool {
538 ContentEq::content_eq(&self.elements, &other.elements)
539 && ContentEq::content_eq(&self.rest, &other.rest)
540 }
541}
542
543impl ContentEq for ObjectAssignmentTarget<'_> {
544 fn content_eq(&self, other: &Self) -> bool {
545 ContentEq::content_eq(&self.properties, &other.properties)
546 && ContentEq::content_eq(&self.rest, &other.rest)
547 }
548}
549
550impl ContentEq for AssignmentTargetRest<'_> {
551 fn content_eq(&self, other: &Self) -> bool {
552 ContentEq::content_eq(&self.target, &other.target)
553 }
554}
555
556impl ContentEq for AssignmentTargetMaybeDefault<'_> {
557 fn content_eq(&self, other: &Self) -> bool {
558 match (self, other) {
559 (Self::AssignmentTargetWithDefault(a), Self::AssignmentTargetWithDefault(b)) => {
560 a.content_eq(b)
561 }
562 (Self::AssignmentTargetIdentifier(a), Self::AssignmentTargetIdentifier(b)) => {
563 a.content_eq(b)
564 }
565 (Self::TSAsExpression(a), Self::TSAsExpression(b)) => a.content_eq(b),
566 (Self::TSSatisfiesExpression(a), Self::TSSatisfiesExpression(b)) => a.content_eq(b),
567 (Self::TSNonNullExpression(a), Self::TSNonNullExpression(b)) => a.content_eq(b),
568 (Self::TSTypeAssertion(a), Self::TSTypeAssertion(b)) => a.content_eq(b),
569 (Self::ComputedMemberExpression(a), Self::ComputedMemberExpression(b)) => {
570 a.content_eq(b)
571 }
572 (Self::StaticMemberExpression(a), Self::StaticMemberExpression(b)) => a.content_eq(b),
573 (Self::PrivateFieldExpression(a), Self::PrivateFieldExpression(b)) => a.content_eq(b),
574 (Self::ArrayAssignmentTarget(a), Self::ArrayAssignmentTarget(b)) => a.content_eq(b),
575 (Self::ObjectAssignmentTarget(a), Self::ObjectAssignmentTarget(b)) => a.content_eq(b),
576 _ => false,
577 }
578 }
579}
580
581impl ContentEq for AssignmentTargetWithDefault<'_> {
582 fn content_eq(&self, other: &Self) -> bool {
583 ContentEq::content_eq(&self.binding, &other.binding)
584 && ContentEq::content_eq(&self.init, &other.init)
585 }
586}
587
588impl ContentEq for AssignmentTargetProperty<'_> {
589 fn content_eq(&self, other: &Self) -> bool {
590 match (self, other) {
591 (
592 Self::AssignmentTargetPropertyIdentifier(a),
593 Self::AssignmentTargetPropertyIdentifier(b),
594 ) => a.content_eq(b),
595 (
596 Self::AssignmentTargetPropertyProperty(a),
597 Self::AssignmentTargetPropertyProperty(b),
598 ) => a.content_eq(b),
599 _ => false,
600 }
601 }
602}
603
604impl ContentEq for AssignmentTargetPropertyIdentifier<'_> {
605 fn content_eq(&self, other: &Self) -> bool {
606 ContentEq::content_eq(&self.binding, &other.binding)
607 && ContentEq::content_eq(&self.init, &other.init)
608 }
609}
610
611impl ContentEq for AssignmentTargetPropertyProperty<'_> {
612 fn content_eq(&self, other: &Self) -> bool {
613 ContentEq::content_eq(&self.name, &other.name)
614 && ContentEq::content_eq(&self.binding, &other.binding)
615 && ContentEq::content_eq(&self.computed, &other.computed)
616 }
617}
618
619impl ContentEq for SequenceExpression<'_> {
620 fn content_eq(&self, other: &Self) -> bool {
621 ContentEq::content_eq(&self.expressions, &other.expressions)
622 }
623}
624
625impl ContentEq for Super {
626 fn content_eq(&self, _: &Self) -> bool {
627 true
628 }
629}
630
631impl ContentEq for AwaitExpression<'_> {
632 fn content_eq(&self, other: &Self) -> bool {
633 ContentEq::content_eq(&self.argument, &other.argument)
634 }
635}
636
637impl ContentEq for ChainExpression<'_> {
638 fn content_eq(&self, other: &Self) -> bool {
639 ContentEq::content_eq(&self.expression, &other.expression)
640 }
641}
642
643impl ContentEq for ChainElement<'_> {
644 fn content_eq(&self, other: &Self) -> bool {
645 match (self, other) {
646 (Self::CallExpression(a), Self::CallExpression(b)) => a.content_eq(b),
647 (Self::TSNonNullExpression(a), Self::TSNonNullExpression(b)) => a.content_eq(b),
648 (Self::ComputedMemberExpression(a), Self::ComputedMemberExpression(b)) => {
649 a.content_eq(b)
650 }
651 (Self::StaticMemberExpression(a), Self::StaticMemberExpression(b)) => a.content_eq(b),
652 (Self::PrivateFieldExpression(a), Self::PrivateFieldExpression(b)) => a.content_eq(b),
653 _ => false,
654 }
655 }
656}
657
658impl ContentEq for ParenthesizedExpression<'_> {
659 fn content_eq(&self, other: &Self) -> bool {
660 ContentEq::content_eq(&self.expression, &other.expression)
661 }
662}
663
664impl ContentEq for Statement<'_> {
665 fn content_eq(&self, other: &Self) -> bool {
666 match (self, other) {
667 (Self::BlockStatement(a), Self::BlockStatement(b)) => a.content_eq(b),
668 (Self::BreakStatement(a), Self::BreakStatement(b)) => a.content_eq(b),
669 (Self::ContinueStatement(a), Self::ContinueStatement(b)) => a.content_eq(b),
670 (Self::DebuggerStatement(a), Self::DebuggerStatement(b)) => a.content_eq(b),
671 (Self::DoWhileStatement(a), Self::DoWhileStatement(b)) => a.content_eq(b),
672 (Self::EmptyStatement(a), Self::EmptyStatement(b)) => a.content_eq(b),
673 (Self::ExpressionStatement(a), Self::ExpressionStatement(b)) => a.content_eq(b),
674 (Self::ForInStatement(a), Self::ForInStatement(b)) => a.content_eq(b),
675 (Self::ForOfStatement(a), Self::ForOfStatement(b)) => a.content_eq(b),
676 (Self::ForStatement(a), Self::ForStatement(b)) => a.content_eq(b),
677 (Self::IfStatement(a), Self::IfStatement(b)) => a.content_eq(b),
678 (Self::LabeledStatement(a), Self::LabeledStatement(b)) => a.content_eq(b),
679 (Self::ReturnStatement(a), Self::ReturnStatement(b)) => a.content_eq(b),
680 (Self::SwitchStatement(a), Self::SwitchStatement(b)) => a.content_eq(b),
681 (Self::ThrowStatement(a), Self::ThrowStatement(b)) => a.content_eq(b),
682 (Self::TryStatement(a), Self::TryStatement(b)) => a.content_eq(b),
683 (Self::WhileStatement(a), Self::WhileStatement(b)) => a.content_eq(b),
684 (Self::WithStatement(a), Self::WithStatement(b)) => a.content_eq(b),
685 (Self::VariableDeclaration(a), Self::VariableDeclaration(b)) => a.content_eq(b),
686 (Self::FunctionDeclaration(a), Self::FunctionDeclaration(b)) => a.content_eq(b),
687 (Self::ClassDeclaration(a), Self::ClassDeclaration(b)) => a.content_eq(b),
688 (Self::TSTypeAliasDeclaration(a), Self::TSTypeAliasDeclaration(b)) => a.content_eq(b),
689 (Self::TSInterfaceDeclaration(a), Self::TSInterfaceDeclaration(b)) => a.content_eq(b),
690 (Self::TSEnumDeclaration(a), Self::TSEnumDeclaration(b)) => a.content_eq(b),
691 (Self::TSModuleDeclaration(a), Self::TSModuleDeclaration(b)) => a.content_eq(b),
692 (Self::TSGlobalDeclaration(a), Self::TSGlobalDeclaration(b)) => a.content_eq(b),
693 (Self::TSImportEqualsDeclaration(a), Self::TSImportEqualsDeclaration(b)) => {
694 a.content_eq(b)
695 }
696 (Self::ImportDeclaration(a), Self::ImportDeclaration(b)) => a.content_eq(b),
697 (Self::ExportAllDeclaration(a), Self::ExportAllDeclaration(b)) => a.content_eq(b),
698 (Self::ExportDefaultDeclaration(a), Self::ExportDefaultDeclaration(b)) => {
699 a.content_eq(b)
700 }
701 (Self::ExportNamedDeclaration(a), Self::ExportNamedDeclaration(b)) => a.content_eq(b),
702 (Self::TSExportAssignment(a), Self::TSExportAssignment(b)) => a.content_eq(b),
703 (Self::TSNamespaceExportDeclaration(a), Self::TSNamespaceExportDeclaration(b)) => {
704 a.content_eq(b)
705 }
706 _ => false,
707 }
708 }
709}
710
711impl ContentEq for Directive<'_> {
712 fn content_eq(&self, other: &Self) -> bool {
713 ContentEq::content_eq(&self.expression, &other.expression)
714 && ContentEq::content_eq(&self.directive, &other.directive)
715 }
716}
717
718impl ContentEq for Hashbang<'_> {
719 fn content_eq(&self, other: &Self) -> bool {
720 ContentEq::content_eq(&self.value, &other.value)
721 }
722}
723
724impl ContentEq for BlockStatement<'_> {
725 fn content_eq(&self, other: &Self) -> bool {
726 ContentEq::content_eq(&self.body, &other.body)
727 }
728}
729
730impl ContentEq for Declaration<'_> {
731 fn content_eq(&self, other: &Self) -> bool {
732 match (self, other) {
733 (Self::VariableDeclaration(a), Self::VariableDeclaration(b)) => a.content_eq(b),
734 (Self::FunctionDeclaration(a), Self::FunctionDeclaration(b)) => a.content_eq(b),
735 (Self::ClassDeclaration(a), Self::ClassDeclaration(b)) => a.content_eq(b),
736 (Self::TSTypeAliasDeclaration(a), Self::TSTypeAliasDeclaration(b)) => a.content_eq(b),
737 (Self::TSInterfaceDeclaration(a), Self::TSInterfaceDeclaration(b)) => a.content_eq(b),
738 (Self::TSEnumDeclaration(a), Self::TSEnumDeclaration(b)) => a.content_eq(b),
739 (Self::TSModuleDeclaration(a), Self::TSModuleDeclaration(b)) => a.content_eq(b),
740 (Self::TSGlobalDeclaration(a), Self::TSGlobalDeclaration(b)) => a.content_eq(b),
741 (Self::TSImportEqualsDeclaration(a), Self::TSImportEqualsDeclaration(b)) => {
742 a.content_eq(b)
743 }
744 _ => false,
745 }
746 }
747}
748
749impl ContentEq for VariableDeclaration<'_> {
750 fn content_eq(&self, other: &Self) -> bool {
751 ContentEq::content_eq(&self.kind, &other.kind)
752 && ContentEq::content_eq(&self.declarations, &other.declarations)
753 && ContentEq::content_eq(&self.declare, &other.declare)
754 }
755}
756
757impl ContentEq for VariableDeclarationKind {
758 fn content_eq(&self, other: &Self) -> bool {
759 self == other
760 }
761}
762
763impl ContentEq for VariableDeclarator<'_> {
764 fn content_eq(&self, other: &Self) -> bool {
765 ContentEq::content_eq(&self.kind, &other.kind)
766 && ContentEq::content_eq(&self.id, &other.id)
767 && ContentEq::content_eq(&self.init, &other.init)
768 && ContentEq::content_eq(&self.definite, &other.definite)
769 }
770}
771
772impl ContentEq for EmptyStatement {
773 fn content_eq(&self, _: &Self) -> bool {
774 true
775 }
776}
777
778impl ContentEq for ExpressionStatement<'_> {
779 fn content_eq(&self, other: &Self) -> bool {
780 ContentEq::content_eq(&self.expression, &other.expression)
781 }
782}
783
784impl ContentEq for IfStatement<'_> {
785 fn content_eq(&self, other: &Self) -> bool {
786 ContentEq::content_eq(&self.test, &other.test)
787 && ContentEq::content_eq(&self.consequent, &other.consequent)
788 && ContentEq::content_eq(&self.alternate, &other.alternate)
789 }
790}
791
792impl ContentEq for DoWhileStatement<'_> {
793 fn content_eq(&self, other: &Self) -> bool {
794 ContentEq::content_eq(&self.body, &other.body)
795 && ContentEq::content_eq(&self.test, &other.test)
796 }
797}
798
799impl ContentEq for WhileStatement<'_> {
800 fn content_eq(&self, other: &Self) -> bool {
801 ContentEq::content_eq(&self.test, &other.test)
802 && ContentEq::content_eq(&self.body, &other.body)
803 }
804}
805
806impl ContentEq for ForStatement<'_> {
807 fn content_eq(&self, other: &Self) -> bool {
808 ContentEq::content_eq(&self.init, &other.init)
809 && ContentEq::content_eq(&self.test, &other.test)
810 && ContentEq::content_eq(&self.update, &other.update)
811 && ContentEq::content_eq(&self.body, &other.body)
812 }
813}
814
815impl ContentEq for ForStatementInit<'_> {
816 fn content_eq(&self, other: &Self) -> bool {
817 match (self, other) {
818 (Self::VariableDeclaration(a), Self::VariableDeclaration(b)) => a.content_eq(b),
819 (Self::BooleanLiteral(a), Self::BooleanLiteral(b)) => a.content_eq(b),
820 (Self::NullLiteral(a), Self::NullLiteral(b)) => a.content_eq(b),
821 (Self::NumericLiteral(a), Self::NumericLiteral(b)) => a.content_eq(b),
822 (Self::BigIntLiteral(a), Self::BigIntLiteral(b)) => a.content_eq(b),
823 (Self::RegExpLiteral(a), Self::RegExpLiteral(b)) => a.content_eq(b),
824 (Self::StringLiteral(a), Self::StringLiteral(b)) => a.content_eq(b),
825 (Self::TemplateLiteral(a), Self::TemplateLiteral(b)) => a.content_eq(b),
826 (Self::Identifier(a), Self::Identifier(b)) => a.content_eq(b),
827 (Self::MetaProperty(a), Self::MetaProperty(b)) => a.content_eq(b),
828 (Self::Super(a), Self::Super(b)) => a.content_eq(b),
829 (Self::ArrayExpression(a), Self::ArrayExpression(b)) => a.content_eq(b),
830 (Self::ArrowFunctionExpression(a), Self::ArrowFunctionExpression(b)) => a.content_eq(b),
831 (Self::AssignmentExpression(a), Self::AssignmentExpression(b)) => a.content_eq(b),
832 (Self::AwaitExpression(a), Self::AwaitExpression(b)) => a.content_eq(b),
833 (Self::BinaryExpression(a), Self::BinaryExpression(b)) => a.content_eq(b),
834 (Self::CallExpression(a), Self::CallExpression(b)) => a.content_eq(b),
835 (Self::ChainExpression(a), Self::ChainExpression(b)) => a.content_eq(b),
836 (Self::ClassExpression(a), Self::ClassExpression(b)) => a.content_eq(b),
837 (Self::ConditionalExpression(a), Self::ConditionalExpression(b)) => a.content_eq(b),
838 (Self::FunctionExpression(a), Self::FunctionExpression(b)) => a.content_eq(b),
839 (Self::ImportExpression(a), Self::ImportExpression(b)) => a.content_eq(b),
840 (Self::LogicalExpression(a), Self::LogicalExpression(b)) => a.content_eq(b),
841 (Self::NewExpression(a), Self::NewExpression(b)) => a.content_eq(b),
842 (Self::ObjectExpression(a), Self::ObjectExpression(b)) => a.content_eq(b),
843 (Self::ParenthesizedExpression(a), Self::ParenthesizedExpression(b)) => a.content_eq(b),
844 (Self::SequenceExpression(a), Self::SequenceExpression(b)) => a.content_eq(b),
845 (Self::TaggedTemplateExpression(a), Self::TaggedTemplateExpression(b)) => {
846 a.content_eq(b)
847 }
848 (Self::ThisExpression(a), Self::ThisExpression(b)) => a.content_eq(b),
849 (Self::UnaryExpression(a), Self::UnaryExpression(b)) => a.content_eq(b),
850 (Self::UpdateExpression(a), Self::UpdateExpression(b)) => a.content_eq(b),
851 (Self::YieldExpression(a), Self::YieldExpression(b)) => a.content_eq(b),
852 (Self::PrivateInExpression(a), Self::PrivateInExpression(b)) => a.content_eq(b),
853 (Self::JSXElement(a), Self::JSXElement(b)) => a.content_eq(b),
854 (Self::JSXFragment(a), Self::JSXFragment(b)) => a.content_eq(b),
855 (Self::TSAsExpression(a), Self::TSAsExpression(b)) => a.content_eq(b),
856 (Self::TSSatisfiesExpression(a), Self::TSSatisfiesExpression(b)) => a.content_eq(b),
857 (Self::TSTypeAssertion(a), Self::TSTypeAssertion(b)) => a.content_eq(b),
858 (Self::TSNonNullExpression(a), Self::TSNonNullExpression(b)) => a.content_eq(b),
859 (Self::TSInstantiationExpression(a), Self::TSInstantiationExpression(b)) => {
860 a.content_eq(b)
861 }
862 (Self::V8IntrinsicExpression(a), Self::V8IntrinsicExpression(b)) => a.content_eq(b),
863 (Self::ComputedMemberExpression(a), Self::ComputedMemberExpression(b)) => {
864 a.content_eq(b)
865 }
866 (Self::StaticMemberExpression(a), Self::StaticMemberExpression(b)) => a.content_eq(b),
867 (Self::PrivateFieldExpression(a), Self::PrivateFieldExpression(b)) => a.content_eq(b),
868 _ => false,
869 }
870 }
871}
872
873impl ContentEq for ForInStatement<'_> {
874 fn content_eq(&self, other: &Self) -> bool {
875 ContentEq::content_eq(&self.left, &other.left)
876 && ContentEq::content_eq(&self.right, &other.right)
877 && ContentEq::content_eq(&self.body, &other.body)
878 }
879}
880
881impl ContentEq for ForStatementLeft<'_> {
882 fn content_eq(&self, other: &Self) -> bool {
883 match (self, other) {
884 (Self::VariableDeclaration(a), Self::VariableDeclaration(b)) => a.content_eq(b),
885 (Self::AssignmentTargetIdentifier(a), Self::AssignmentTargetIdentifier(b)) => {
886 a.content_eq(b)
887 }
888 (Self::TSAsExpression(a), Self::TSAsExpression(b)) => a.content_eq(b),
889 (Self::TSSatisfiesExpression(a), Self::TSSatisfiesExpression(b)) => a.content_eq(b),
890 (Self::TSNonNullExpression(a), Self::TSNonNullExpression(b)) => a.content_eq(b),
891 (Self::TSTypeAssertion(a), Self::TSTypeAssertion(b)) => a.content_eq(b),
892 (Self::ComputedMemberExpression(a), Self::ComputedMemberExpression(b)) => {
893 a.content_eq(b)
894 }
895 (Self::StaticMemberExpression(a), Self::StaticMemberExpression(b)) => a.content_eq(b),
896 (Self::PrivateFieldExpression(a), Self::PrivateFieldExpression(b)) => a.content_eq(b),
897 (Self::ArrayAssignmentTarget(a), Self::ArrayAssignmentTarget(b)) => a.content_eq(b),
898 (Self::ObjectAssignmentTarget(a), Self::ObjectAssignmentTarget(b)) => a.content_eq(b),
899 _ => false,
900 }
901 }
902}
903
904impl ContentEq for ForOfStatement<'_> {
905 fn content_eq(&self, other: &Self) -> bool {
906 ContentEq::content_eq(&self.r#await, &other.r#await)
907 && ContentEq::content_eq(&self.left, &other.left)
908 && ContentEq::content_eq(&self.right, &other.right)
909 && ContentEq::content_eq(&self.body, &other.body)
910 }
911}
912
913impl ContentEq for ContinueStatement<'_> {
914 fn content_eq(&self, other: &Self) -> bool {
915 ContentEq::content_eq(&self.label, &other.label)
916 }
917}
918
919impl ContentEq for BreakStatement<'_> {
920 fn content_eq(&self, other: &Self) -> bool {
921 ContentEq::content_eq(&self.label, &other.label)
922 }
923}
924
925impl ContentEq for ReturnStatement<'_> {
926 fn content_eq(&self, other: &Self) -> bool {
927 ContentEq::content_eq(&self.argument, &other.argument)
928 }
929}
930
931impl ContentEq for WithStatement<'_> {
932 fn content_eq(&self, other: &Self) -> bool {
933 ContentEq::content_eq(&self.object, &other.object)
934 && ContentEq::content_eq(&self.body, &other.body)
935 }
936}
937
938impl ContentEq for SwitchStatement<'_> {
939 fn content_eq(&self, other: &Self) -> bool {
940 ContentEq::content_eq(&self.discriminant, &other.discriminant)
941 && ContentEq::content_eq(&self.cases, &other.cases)
942 }
943}
944
945impl ContentEq for SwitchCase<'_> {
946 fn content_eq(&self, other: &Self) -> bool {
947 ContentEq::content_eq(&self.test, &other.test)
948 && ContentEq::content_eq(&self.consequent, &other.consequent)
949 }
950}
951
952impl ContentEq for LabeledStatement<'_> {
953 fn content_eq(&self, other: &Self) -> bool {
954 ContentEq::content_eq(&self.label, &other.label)
955 && ContentEq::content_eq(&self.body, &other.body)
956 }
957}
958
959impl ContentEq for ThrowStatement<'_> {
960 fn content_eq(&self, other: &Self) -> bool {
961 ContentEq::content_eq(&self.argument, &other.argument)
962 }
963}
964
965impl ContentEq for TryStatement<'_> {
966 fn content_eq(&self, other: &Self) -> bool {
967 ContentEq::content_eq(&self.block, &other.block)
968 && ContentEq::content_eq(&self.handler, &other.handler)
969 && ContentEq::content_eq(&self.finalizer, &other.finalizer)
970 }
971}
972
973impl ContentEq for CatchClause<'_> {
974 fn content_eq(&self, other: &Self) -> bool {
975 ContentEq::content_eq(&self.param, &other.param)
976 && ContentEq::content_eq(&self.body, &other.body)
977 }
978}
979
980impl ContentEq for CatchParameter<'_> {
981 fn content_eq(&self, other: &Self) -> bool {
982 ContentEq::content_eq(&self.pattern, &other.pattern)
983 }
984}
985
986impl ContentEq for DebuggerStatement {
987 fn content_eq(&self, _: &Self) -> bool {
988 true
989 }
990}
991
992impl ContentEq for BindingPattern<'_> {
993 fn content_eq(&self, other: &Self) -> bool {
994 ContentEq::content_eq(&self.kind, &other.kind)
995 && ContentEq::content_eq(&self.type_annotation, &other.type_annotation)
996 && ContentEq::content_eq(&self.optional, &other.optional)
997 }
998}
999
1000impl ContentEq for BindingPatternKind<'_> {
1001 fn content_eq(&self, other: &Self) -> bool {
1002 match (self, other) {
1003 (Self::BindingIdentifier(a), Self::BindingIdentifier(b)) => a.content_eq(b),
1004 (Self::ObjectPattern(a), Self::ObjectPattern(b)) => a.content_eq(b),
1005 (Self::ArrayPattern(a), Self::ArrayPattern(b)) => a.content_eq(b),
1006 (Self::AssignmentPattern(a), Self::AssignmentPattern(b)) => a.content_eq(b),
1007 _ => false,
1008 }
1009 }
1010}
1011
1012impl ContentEq for AssignmentPattern<'_> {
1013 fn content_eq(&self, other: &Self) -> bool {
1014 ContentEq::content_eq(&self.left, &other.left)
1015 && ContentEq::content_eq(&self.right, &other.right)
1016 }
1017}
1018
1019impl ContentEq for ObjectPattern<'_> {
1020 fn content_eq(&self, other: &Self) -> bool {
1021 ContentEq::content_eq(&self.properties, &other.properties)
1022 && ContentEq::content_eq(&self.rest, &other.rest)
1023 }
1024}
1025
1026impl ContentEq for BindingProperty<'_> {
1027 fn content_eq(&self, other: &Self) -> bool {
1028 ContentEq::content_eq(&self.key, &other.key)
1029 && ContentEq::content_eq(&self.value, &other.value)
1030 && ContentEq::content_eq(&self.shorthand, &other.shorthand)
1031 && ContentEq::content_eq(&self.computed, &other.computed)
1032 }
1033}
1034
1035impl ContentEq for ArrayPattern<'_> {
1036 fn content_eq(&self, other: &Self) -> bool {
1037 ContentEq::content_eq(&self.elements, &other.elements)
1038 && ContentEq::content_eq(&self.rest, &other.rest)
1039 }
1040}
1041
1042impl ContentEq for BindingRestElement<'_> {
1043 fn content_eq(&self, other: &Self) -> bool {
1044 ContentEq::content_eq(&self.argument, &other.argument)
1045 }
1046}
1047
1048impl ContentEq for Function<'_> {
1049 fn content_eq(&self, other: &Self) -> bool {
1050 ContentEq::content_eq(&self.r#type, &other.r#type)
1051 && ContentEq::content_eq(&self.id, &other.id)
1052 && ContentEq::content_eq(&self.generator, &other.generator)
1053 && ContentEq::content_eq(&self.r#async, &other.r#async)
1054 && ContentEq::content_eq(&self.declare, &other.declare)
1055 && ContentEq::content_eq(&self.type_parameters, &other.type_parameters)
1056 && ContentEq::content_eq(&self.this_param, &other.this_param)
1057 && ContentEq::content_eq(&self.params, &other.params)
1058 && ContentEq::content_eq(&self.return_type, &other.return_type)
1059 && ContentEq::content_eq(&self.body, &other.body)
1060 && ContentEq::content_eq(&self.pure, &other.pure)
1061 && ContentEq::content_eq(&self.pife, &other.pife)
1062 }
1063}
1064
1065impl ContentEq for FunctionType {
1066 fn content_eq(&self, other: &Self) -> bool {
1067 self == other
1068 }
1069}
1070
1071impl ContentEq for FormalParameters<'_> {
1072 fn content_eq(&self, other: &Self) -> bool {
1073 ContentEq::content_eq(&self.kind, &other.kind)
1074 && ContentEq::content_eq(&self.items, &other.items)
1075 && ContentEq::content_eq(&self.rest, &other.rest)
1076 }
1077}
1078
1079impl ContentEq for FormalParameter<'_> {
1080 fn content_eq(&self, other: &Self) -> bool {
1081 ContentEq::content_eq(&self.decorators, &other.decorators)
1082 && ContentEq::content_eq(&self.pattern, &other.pattern)
1083 && ContentEq::content_eq(&self.accessibility, &other.accessibility)
1084 && ContentEq::content_eq(&self.readonly, &other.readonly)
1085 && ContentEq::content_eq(&self.r#override, &other.r#override)
1086 }
1087}
1088
1089impl ContentEq for FormalParameterKind {
1090 fn content_eq(&self, other: &Self) -> bool {
1091 self == other
1092 }
1093}
1094
1095impl ContentEq for FunctionBody<'_> {
1096 fn content_eq(&self, other: &Self) -> bool {
1097 ContentEq::content_eq(&self.directives, &other.directives)
1098 && ContentEq::content_eq(&self.statements, &other.statements)
1099 }
1100}
1101
1102impl ContentEq for ArrowFunctionExpression<'_> {
1103 fn content_eq(&self, other: &Self) -> bool {
1104 ContentEq::content_eq(&self.expression, &other.expression)
1105 && ContentEq::content_eq(&self.r#async, &other.r#async)
1106 && ContentEq::content_eq(&self.type_parameters, &other.type_parameters)
1107 && ContentEq::content_eq(&self.params, &other.params)
1108 && ContentEq::content_eq(&self.return_type, &other.return_type)
1109 && ContentEq::content_eq(&self.body, &other.body)
1110 && ContentEq::content_eq(&self.pure, &other.pure)
1111 && ContentEq::content_eq(&self.pife, &other.pife)
1112 }
1113}
1114
1115impl ContentEq for YieldExpression<'_> {
1116 fn content_eq(&self, other: &Self) -> bool {
1117 ContentEq::content_eq(&self.delegate, &other.delegate)
1118 && ContentEq::content_eq(&self.argument, &other.argument)
1119 }
1120}
1121
1122impl ContentEq for Class<'_> {
1123 fn content_eq(&self, other: &Self) -> bool {
1124 ContentEq::content_eq(&self.r#type, &other.r#type)
1125 && ContentEq::content_eq(&self.decorators, &other.decorators)
1126 && ContentEq::content_eq(&self.id, &other.id)
1127 && ContentEq::content_eq(&self.type_parameters, &other.type_parameters)
1128 && ContentEq::content_eq(&self.super_class, &other.super_class)
1129 && ContentEq::content_eq(&self.super_type_arguments, &other.super_type_arguments)
1130 && ContentEq::content_eq(&self.implements, &other.implements)
1131 && ContentEq::content_eq(&self.body, &other.body)
1132 && ContentEq::content_eq(&self.r#abstract, &other.r#abstract)
1133 && ContentEq::content_eq(&self.declare, &other.declare)
1134 }
1135}
1136
1137impl ContentEq for ClassType {
1138 fn content_eq(&self, other: &Self) -> bool {
1139 self == other
1140 }
1141}
1142
1143impl ContentEq for ClassBody<'_> {
1144 fn content_eq(&self, other: &Self) -> bool {
1145 ContentEq::content_eq(&self.body, &other.body)
1146 }
1147}
1148
1149impl ContentEq for ClassElement<'_> {
1150 fn content_eq(&self, other: &Self) -> bool {
1151 match (self, other) {
1152 (Self::StaticBlock(a), Self::StaticBlock(b)) => a.content_eq(b),
1153 (Self::MethodDefinition(a), Self::MethodDefinition(b)) => a.content_eq(b),
1154 (Self::PropertyDefinition(a), Self::PropertyDefinition(b)) => a.content_eq(b),
1155 (Self::AccessorProperty(a), Self::AccessorProperty(b)) => a.content_eq(b),
1156 (Self::TSIndexSignature(a), Self::TSIndexSignature(b)) => a.content_eq(b),
1157 _ => false,
1158 }
1159 }
1160}
1161
1162impl ContentEq for MethodDefinition<'_> {
1163 fn content_eq(&self, other: &Self) -> bool {
1164 ContentEq::content_eq(&self.r#type, &other.r#type)
1165 && ContentEq::content_eq(&self.decorators, &other.decorators)
1166 && ContentEq::content_eq(&self.key, &other.key)
1167 && ContentEq::content_eq(&self.value, &other.value)
1168 && ContentEq::content_eq(&self.kind, &other.kind)
1169 && ContentEq::content_eq(&self.computed, &other.computed)
1170 && ContentEq::content_eq(&self.r#static, &other.r#static)
1171 && ContentEq::content_eq(&self.r#override, &other.r#override)
1172 && ContentEq::content_eq(&self.optional, &other.optional)
1173 && ContentEq::content_eq(&self.accessibility, &other.accessibility)
1174 }
1175}
1176
1177impl ContentEq for MethodDefinitionType {
1178 fn content_eq(&self, other: &Self) -> bool {
1179 self == other
1180 }
1181}
1182
1183impl ContentEq for PropertyDefinition<'_> {
1184 fn content_eq(&self, other: &Self) -> bool {
1185 ContentEq::content_eq(&self.r#type, &other.r#type)
1186 && ContentEq::content_eq(&self.decorators, &other.decorators)
1187 && ContentEq::content_eq(&self.key, &other.key)
1188 && ContentEq::content_eq(&self.type_annotation, &other.type_annotation)
1189 && ContentEq::content_eq(&self.value, &other.value)
1190 && ContentEq::content_eq(&self.computed, &other.computed)
1191 && ContentEq::content_eq(&self.r#static, &other.r#static)
1192 && ContentEq::content_eq(&self.declare, &other.declare)
1193 && ContentEq::content_eq(&self.r#override, &other.r#override)
1194 && ContentEq::content_eq(&self.optional, &other.optional)
1195 && ContentEq::content_eq(&self.definite, &other.definite)
1196 && ContentEq::content_eq(&self.readonly, &other.readonly)
1197 && ContentEq::content_eq(&self.accessibility, &other.accessibility)
1198 }
1199}
1200
1201impl ContentEq for PropertyDefinitionType {
1202 fn content_eq(&self, other: &Self) -> bool {
1203 self == other
1204 }
1205}
1206
1207impl ContentEq for MethodDefinitionKind {
1208 fn content_eq(&self, other: &Self) -> bool {
1209 self == other
1210 }
1211}
1212
1213impl ContentEq for PrivateIdentifier<'_> {
1214 fn content_eq(&self, other: &Self) -> bool {
1215 ContentEq::content_eq(&self.name, &other.name)
1216 }
1217}
1218
1219impl ContentEq for StaticBlock<'_> {
1220 fn content_eq(&self, other: &Self) -> bool {
1221 ContentEq::content_eq(&self.body, &other.body)
1222 }
1223}
1224
1225impl ContentEq for ModuleDeclaration<'_> {
1226 fn content_eq(&self, other: &Self) -> bool {
1227 match (self, other) {
1228 (Self::ImportDeclaration(a), Self::ImportDeclaration(b)) => a.content_eq(b),
1229 (Self::ExportAllDeclaration(a), Self::ExportAllDeclaration(b)) => a.content_eq(b),
1230 (Self::ExportDefaultDeclaration(a), Self::ExportDefaultDeclaration(b)) => {
1231 a.content_eq(b)
1232 }
1233 (Self::ExportNamedDeclaration(a), Self::ExportNamedDeclaration(b)) => a.content_eq(b),
1234 (Self::TSExportAssignment(a), Self::TSExportAssignment(b)) => a.content_eq(b),
1235 (Self::TSNamespaceExportDeclaration(a), Self::TSNamespaceExportDeclaration(b)) => {
1236 a.content_eq(b)
1237 }
1238 _ => false,
1239 }
1240 }
1241}
1242
1243impl ContentEq for AccessorPropertyType {
1244 fn content_eq(&self, other: &Self) -> bool {
1245 self == other
1246 }
1247}
1248
1249impl ContentEq for AccessorProperty<'_> {
1250 fn content_eq(&self, other: &Self) -> bool {
1251 ContentEq::content_eq(&self.r#type, &other.r#type)
1252 && ContentEq::content_eq(&self.decorators, &other.decorators)
1253 && ContentEq::content_eq(&self.key, &other.key)
1254 && ContentEq::content_eq(&self.type_annotation, &other.type_annotation)
1255 && ContentEq::content_eq(&self.value, &other.value)
1256 && ContentEq::content_eq(&self.computed, &other.computed)
1257 && ContentEq::content_eq(&self.r#static, &other.r#static)
1258 && ContentEq::content_eq(&self.r#override, &other.r#override)
1259 && ContentEq::content_eq(&self.definite, &other.definite)
1260 && ContentEq::content_eq(&self.accessibility, &other.accessibility)
1261 }
1262}
1263
1264impl ContentEq for ImportExpression<'_> {
1265 fn content_eq(&self, other: &Self) -> bool {
1266 ContentEq::content_eq(&self.source, &other.source)
1267 && ContentEq::content_eq(&self.options, &other.options)
1268 && ContentEq::content_eq(&self.phase, &other.phase)
1269 }
1270}
1271
1272impl ContentEq for ImportDeclaration<'_> {
1273 fn content_eq(&self, other: &Self) -> bool {
1274 ContentEq::content_eq(&self.specifiers, &other.specifiers)
1275 && ContentEq::content_eq(&self.source, &other.source)
1276 && ContentEq::content_eq(&self.phase, &other.phase)
1277 && ContentEq::content_eq(&self.with_clause, &other.with_clause)
1278 && ContentEq::content_eq(&self.import_kind, &other.import_kind)
1279 }
1280}
1281
1282impl ContentEq for ImportPhase {
1283 fn content_eq(&self, other: &Self) -> bool {
1284 self == other
1285 }
1286}
1287
1288impl ContentEq for ImportDeclarationSpecifier<'_> {
1289 fn content_eq(&self, other: &Self) -> bool {
1290 match (self, other) {
1291 (Self::ImportSpecifier(a), Self::ImportSpecifier(b)) => a.content_eq(b),
1292 (Self::ImportDefaultSpecifier(a), Self::ImportDefaultSpecifier(b)) => a.content_eq(b),
1293 (Self::ImportNamespaceSpecifier(a), Self::ImportNamespaceSpecifier(b)) => {
1294 a.content_eq(b)
1295 }
1296 _ => false,
1297 }
1298 }
1299}
1300
1301impl ContentEq for ImportSpecifier<'_> {
1302 fn content_eq(&self, other: &Self) -> bool {
1303 ContentEq::content_eq(&self.imported, &other.imported)
1304 && ContentEq::content_eq(&self.local, &other.local)
1305 && ContentEq::content_eq(&self.import_kind, &other.import_kind)
1306 }
1307}
1308
1309impl ContentEq for ImportDefaultSpecifier<'_> {
1310 fn content_eq(&self, other: &Self) -> bool {
1311 ContentEq::content_eq(&self.local, &other.local)
1312 }
1313}
1314
1315impl ContentEq for ImportNamespaceSpecifier<'_> {
1316 fn content_eq(&self, other: &Self) -> bool {
1317 ContentEq::content_eq(&self.local, &other.local)
1318 }
1319}
1320
1321impl ContentEq for WithClause<'_> {
1322 fn content_eq(&self, other: &Self) -> bool {
1323 ContentEq::content_eq(&self.keyword, &other.keyword)
1324 && ContentEq::content_eq(&self.with_entries, &other.with_entries)
1325 }
1326}
1327
1328impl ContentEq for WithClauseKeyword {
1329 fn content_eq(&self, other: &Self) -> bool {
1330 self == other
1331 }
1332}
1333
1334impl ContentEq for ImportAttribute<'_> {
1335 fn content_eq(&self, other: &Self) -> bool {
1336 ContentEq::content_eq(&self.key, &other.key)
1337 && ContentEq::content_eq(&self.value, &other.value)
1338 }
1339}
1340
1341impl ContentEq for ImportAttributeKey<'_> {
1342 fn content_eq(&self, other: &Self) -> bool {
1343 match (self, other) {
1344 (Self::Identifier(a), Self::Identifier(b)) => a.content_eq(b),
1345 (Self::StringLiteral(a), Self::StringLiteral(b)) => a.content_eq(b),
1346 _ => false,
1347 }
1348 }
1349}
1350
1351impl ContentEq for ExportNamedDeclaration<'_> {
1352 fn content_eq(&self, other: &Self) -> bool {
1353 ContentEq::content_eq(&self.declaration, &other.declaration)
1354 && ContentEq::content_eq(&self.specifiers, &other.specifiers)
1355 && ContentEq::content_eq(&self.source, &other.source)
1356 && ContentEq::content_eq(&self.export_kind, &other.export_kind)
1357 && ContentEq::content_eq(&self.with_clause, &other.with_clause)
1358 }
1359}
1360
1361impl ContentEq for ExportDefaultDeclaration<'_> {
1362 fn content_eq(&self, other: &Self) -> bool {
1363 ContentEq::content_eq(&self.declaration, &other.declaration)
1364 }
1365}
1366
1367impl ContentEq for ExportAllDeclaration<'_> {
1368 fn content_eq(&self, other: &Self) -> bool {
1369 ContentEq::content_eq(&self.exported, &other.exported)
1370 && ContentEq::content_eq(&self.source, &other.source)
1371 && ContentEq::content_eq(&self.with_clause, &other.with_clause)
1372 && ContentEq::content_eq(&self.export_kind, &other.export_kind)
1373 }
1374}
1375
1376impl ContentEq for ExportSpecifier<'_> {
1377 fn content_eq(&self, other: &Self) -> bool {
1378 ContentEq::content_eq(&self.local, &other.local)
1379 && ContentEq::content_eq(&self.exported, &other.exported)
1380 && ContentEq::content_eq(&self.export_kind, &other.export_kind)
1381 }
1382}
1383
1384impl ContentEq for ExportDefaultDeclarationKind<'_> {
1385 fn content_eq(&self, other: &Self) -> bool {
1386 match (self, other) {
1387 (Self::FunctionDeclaration(a), Self::FunctionDeclaration(b)) => a.content_eq(b),
1388 (Self::ClassDeclaration(a), Self::ClassDeclaration(b)) => a.content_eq(b),
1389 (Self::TSInterfaceDeclaration(a), Self::TSInterfaceDeclaration(b)) => a.content_eq(b),
1390 (Self::BooleanLiteral(a), Self::BooleanLiteral(b)) => a.content_eq(b),
1391 (Self::NullLiteral(a), Self::NullLiteral(b)) => a.content_eq(b),
1392 (Self::NumericLiteral(a), Self::NumericLiteral(b)) => a.content_eq(b),
1393 (Self::BigIntLiteral(a), Self::BigIntLiteral(b)) => a.content_eq(b),
1394 (Self::RegExpLiteral(a), Self::RegExpLiteral(b)) => a.content_eq(b),
1395 (Self::StringLiteral(a), Self::StringLiteral(b)) => a.content_eq(b),
1396 (Self::TemplateLiteral(a), Self::TemplateLiteral(b)) => a.content_eq(b),
1397 (Self::Identifier(a), Self::Identifier(b)) => a.content_eq(b),
1398 (Self::MetaProperty(a), Self::MetaProperty(b)) => a.content_eq(b),
1399 (Self::Super(a), Self::Super(b)) => a.content_eq(b),
1400 (Self::ArrayExpression(a), Self::ArrayExpression(b)) => a.content_eq(b),
1401 (Self::ArrowFunctionExpression(a), Self::ArrowFunctionExpression(b)) => a.content_eq(b),
1402 (Self::AssignmentExpression(a), Self::AssignmentExpression(b)) => a.content_eq(b),
1403 (Self::AwaitExpression(a), Self::AwaitExpression(b)) => a.content_eq(b),
1404 (Self::BinaryExpression(a), Self::BinaryExpression(b)) => a.content_eq(b),
1405 (Self::CallExpression(a), Self::CallExpression(b)) => a.content_eq(b),
1406 (Self::ChainExpression(a), Self::ChainExpression(b)) => a.content_eq(b),
1407 (Self::ClassExpression(a), Self::ClassExpression(b)) => a.content_eq(b),
1408 (Self::ConditionalExpression(a), Self::ConditionalExpression(b)) => a.content_eq(b),
1409 (Self::FunctionExpression(a), Self::FunctionExpression(b)) => a.content_eq(b),
1410 (Self::ImportExpression(a), Self::ImportExpression(b)) => a.content_eq(b),
1411 (Self::LogicalExpression(a), Self::LogicalExpression(b)) => a.content_eq(b),
1412 (Self::NewExpression(a), Self::NewExpression(b)) => a.content_eq(b),
1413 (Self::ObjectExpression(a), Self::ObjectExpression(b)) => a.content_eq(b),
1414 (Self::ParenthesizedExpression(a), Self::ParenthesizedExpression(b)) => a.content_eq(b),
1415 (Self::SequenceExpression(a), Self::SequenceExpression(b)) => a.content_eq(b),
1416 (Self::TaggedTemplateExpression(a), Self::TaggedTemplateExpression(b)) => {
1417 a.content_eq(b)
1418 }
1419 (Self::ThisExpression(a), Self::ThisExpression(b)) => a.content_eq(b),
1420 (Self::UnaryExpression(a), Self::UnaryExpression(b)) => a.content_eq(b),
1421 (Self::UpdateExpression(a), Self::UpdateExpression(b)) => a.content_eq(b),
1422 (Self::YieldExpression(a), Self::YieldExpression(b)) => a.content_eq(b),
1423 (Self::PrivateInExpression(a), Self::PrivateInExpression(b)) => a.content_eq(b),
1424 (Self::JSXElement(a), Self::JSXElement(b)) => a.content_eq(b),
1425 (Self::JSXFragment(a), Self::JSXFragment(b)) => a.content_eq(b),
1426 (Self::TSAsExpression(a), Self::TSAsExpression(b)) => a.content_eq(b),
1427 (Self::TSSatisfiesExpression(a), Self::TSSatisfiesExpression(b)) => a.content_eq(b),
1428 (Self::TSTypeAssertion(a), Self::TSTypeAssertion(b)) => a.content_eq(b),
1429 (Self::TSNonNullExpression(a), Self::TSNonNullExpression(b)) => a.content_eq(b),
1430 (Self::TSInstantiationExpression(a), Self::TSInstantiationExpression(b)) => {
1431 a.content_eq(b)
1432 }
1433 (Self::V8IntrinsicExpression(a), Self::V8IntrinsicExpression(b)) => a.content_eq(b),
1434 (Self::ComputedMemberExpression(a), Self::ComputedMemberExpression(b)) => {
1435 a.content_eq(b)
1436 }
1437 (Self::StaticMemberExpression(a), Self::StaticMemberExpression(b)) => a.content_eq(b),
1438 (Self::PrivateFieldExpression(a), Self::PrivateFieldExpression(b)) => a.content_eq(b),
1439 _ => false,
1440 }
1441 }
1442}
1443
1444impl ContentEq for ModuleExportName<'_> {
1445 fn content_eq(&self, other: &Self) -> bool {
1446 match (self, other) {
1447 (Self::IdentifierName(a), Self::IdentifierName(b)) => a.content_eq(b),
1448 (Self::IdentifierReference(a), Self::IdentifierReference(b)) => a.content_eq(b),
1449 (Self::StringLiteral(a), Self::StringLiteral(b)) => a.content_eq(b),
1450 _ => false,
1451 }
1452 }
1453}
1454
1455impl ContentEq for V8IntrinsicExpression<'_> {
1456 fn content_eq(&self, other: &Self) -> bool {
1457 ContentEq::content_eq(&self.name, &other.name)
1458 && ContentEq::content_eq(&self.arguments, &other.arguments)
1459 }
1460}
1461
1462impl ContentEq for BooleanLiteral {
1463 fn content_eq(&self, other: &Self) -> bool {
1464 ContentEq::content_eq(&self.value, &other.value)
1465 }
1466}
1467
1468impl ContentEq for NullLiteral {
1469 fn content_eq(&self, _: &Self) -> bool {
1470 true
1471 }
1472}
1473
1474impl ContentEq for NumericLiteral<'_> {
1475 fn content_eq(&self, other: &Self) -> bool {
1476 ContentEq::content_eq(&self.value, &other.value)
1477 }
1478}
1479
1480impl ContentEq for StringLiteral<'_> {
1481 fn content_eq(&self, other: &Self) -> bool {
1482 ContentEq::content_eq(&self.value, &other.value)
1483 && ContentEq::content_eq(&self.lone_surrogates, &other.lone_surrogates)
1484 }
1485}
1486
1487impl ContentEq for BigIntLiteral<'_> {
1488 fn content_eq(&self, other: &Self) -> bool {
1489 ContentEq::content_eq(&self.value, &other.value)
1490 }
1491}
1492
1493impl ContentEq for RegExpLiteral<'_> {
1494 fn content_eq(&self, other: &Self) -> bool {
1495 ContentEq::content_eq(&self.regex, &other.regex)
1496 }
1497}
1498
1499impl ContentEq for RegExp<'_> {
1500 fn content_eq(&self, other: &Self) -> bool {
1501 ContentEq::content_eq(&self.pattern, &other.pattern)
1502 && ContentEq::content_eq(&self.flags, &other.flags)
1503 }
1504}
1505
1506impl ContentEq for RegExpPattern<'_> {
1507 fn content_eq(&self, other: &Self) -> bool {
1508 ContentEq::content_eq(&self.text, &other.text)
1509 }
1510}
1511
1512impl ContentEq for JSXElement<'_> {
1513 fn content_eq(&self, other: &Self) -> bool {
1514 ContentEq::content_eq(&self.opening_element, &other.opening_element)
1515 && ContentEq::content_eq(&self.children, &other.children)
1516 && ContentEq::content_eq(&self.closing_element, &other.closing_element)
1517 }
1518}
1519
1520impl ContentEq for JSXOpeningElement<'_> {
1521 fn content_eq(&self, other: &Self) -> bool {
1522 ContentEq::content_eq(&self.name, &other.name)
1523 && ContentEq::content_eq(&self.type_arguments, &other.type_arguments)
1524 && ContentEq::content_eq(&self.attributes, &other.attributes)
1525 }
1526}
1527
1528impl ContentEq for JSXClosingElement<'_> {
1529 fn content_eq(&self, other: &Self) -> bool {
1530 ContentEq::content_eq(&self.name, &other.name)
1531 }
1532}
1533
1534impl ContentEq for JSXFragment<'_> {
1535 fn content_eq(&self, other: &Self) -> bool {
1536 ContentEq::content_eq(&self.opening_fragment, &other.opening_fragment)
1537 && ContentEq::content_eq(&self.children, &other.children)
1538 && ContentEq::content_eq(&self.closing_fragment, &other.closing_fragment)
1539 }
1540}
1541
1542impl ContentEq for JSXOpeningFragment {
1543 fn content_eq(&self, _: &Self) -> bool {
1544 true
1545 }
1546}
1547
1548impl ContentEq for JSXClosingFragment {
1549 fn content_eq(&self, _: &Self) -> bool {
1550 true
1551 }
1552}
1553
1554impl ContentEq for JSXElementName<'_> {
1555 fn content_eq(&self, other: &Self) -> bool {
1556 match (self, other) {
1557 (Self::Identifier(a), Self::Identifier(b)) => a.content_eq(b),
1558 (Self::IdentifierReference(a), Self::IdentifierReference(b)) => a.content_eq(b),
1559 (Self::NamespacedName(a), Self::NamespacedName(b)) => a.content_eq(b),
1560 (Self::MemberExpression(a), Self::MemberExpression(b)) => a.content_eq(b),
1561 (Self::ThisExpression(a), Self::ThisExpression(b)) => a.content_eq(b),
1562 _ => false,
1563 }
1564 }
1565}
1566
1567impl ContentEq for JSXNamespacedName<'_> {
1568 fn content_eq(&self, other: &Self) -> bool {
1569 ContentEq::content_eq(&self.namespace, &other.namespace)
1570 && ContentEq::content_eq(&self.name, &other.name)
1571 }
1572}
1573
1574impl ContentEq for JSXMemberExpression<'_> {
1575 fn content_eq(&self, other: &Self) -> bool {
1576 ContentEq::content_eq(&self.object, &other.object)
1577 && ContentEq::content_eq(&self.property, &other.property)
1578 }
1579}
1580
1581impl ContentEq for JSXMemberExpressionObject<'_> {
1582 fn content_eq(&self, other: &Self) -> bool {
1583 match (self, other) {
1584 (Self::IdentifierReference(a), Self::IdentifierReference(b)) => a.content_eq(b),
1585 (Self::MemberExpression(a), Self::MemberExpression(b)) => a.content_eq(b),
1586 (Self::ThisExpression(a), Self::ThisExpression(b)) => a.content_eq(b),
1587 _ => false,
1588 }
1589 }
1590}
1591
1592impl ContentEq for JSXExpressionContainer<'_> {
1593 fn content_eq(&self, other: &Self) -> bool {
1594 ContentEq::content_eq(&self.expression, &other.expression)
1595 }
1596}
1597
1598impl ContentEq for JSXExpression<'_> {
1599 fn content_eq(&self, other: &Self) -> bool {
1600 match (self, other) {
1601 (Self::EmptyExpression(a), Self::EmptyExpression(b)) => a.content_eq(b),
1602 (Self::BooleanLiteral(a), Self::BooleanLiteral(b)) => a.content_eq(b),
1603 (Self::NullLiteral(a), Self::NullLiteral(b)) => a.content_eq(b),
1604 (Self::NumericLiteral(a), Self::NumericLiteral(b)) => a.content_eq(b),
1605 (Self::BigIntLiteral(a), Self::BigIntLiteral(b)) => a.content_eq(b),
1606 (Self::RegExpLiteral(a), Self::RegExpLiteral(b)) => a.content_eq(b),
1607 (Self::StringLiteral(a), Self::StringLiteral(b)) => a.content_eq(b),
1608 (Self::TemplateLiteral(a), Self::TemplateLiteral(b)) => a.content_eq(b),
1609 (Self::Identifier(a), Self::Identifier(b)) => a.content_eq(b),
1610 (Self::MetaProperty(a), Self::MetaProperty(b)) => a.content_eq(b),
1611 (Self::Super(a), Self::Super(b)) => a.content_eq(b),
1612 (Self::ArrayExpression(a), Self::ArrayExpression(b)) => a.content_eq(b),
1613 (Self::ArrowFunctionExpression(a), Self::ArrowFunctionExpression(b)) => a.content_eq(b),
1614 (Self::AssignmentExpression(a), Self::AssignmentExpression(b)) => a.content_eq(b),
1615 (Self::AwaitExpression(a), Self::AwaitExpression(b)) => a.content_eq(b),
1616 (Self::BinaryExpression(a), Self::BinaryExpression(b)) => a.content_eq(b),
1617 (Self::CallExpression(a), Self::CallExpression(b)) => a.content_eq(b),
1618 (Self::ChainExpression(a), Self::ChainExpression(b)) => a.content_eq(b),
1619 (Self::ClassExpression(a), Self::ClassExpression(b)) => a.content_eq(b),
1620 (Self::ConditionalExpression(a), Self::ConditionalExpression(b)) => a.content_eq(b),
1621 (Self::FunctionExpression(a), Self::FunctionExpression(b)) => a.content_eq(b),
1622 (Self::ImportExpression(a), Self::ImportExpression(b)) => a.content_eq(b),
1623 (Self::LogicalExpression(a), Self::LogicalExpression(b)) => a.content_eq(b),
1624 (Self::NewExpression(a), Self::NewExpression(b)) => a.content_eq(b),
1625 (Self::ObjectExpression(a), Self::ObjectExpression(b)) => a.content_eq(b),
1626 (Self::ParenthesizedExpression(a), Self::ParenthesizedExpression(b)) => a.content_eq(b),
1627 (Self::SequenceExpression(a), Self::SequenceExpression(b)) => a.content_eq(b),
1628 (Self::TaggedTemplateExpression(a), Self::TaggedTemplateExpression(b)) => {
1629 a.content_eq(b)
1630 }
1631 (Self::ThisExpression(a), Self::ThisExpression(b)) => a.content_eq(b),
1632 (Self::UnaryExpression(a), Self::UnaryExpression(b)) => a.content_eq(b),
1633 (Self::UpdateExpression(a), Self::UpdateExpression(b)) => a.content_eq(b),
1634 (Self::YieldExpression(a), Self::YieldExpression(b)) => a.content_eq(b),
1635 (Self::PrivateInExpression(a), Self::PrivateInExpression(b)) => a.content_eq(b),
1636 (Self::JSXElement(a), Self::JSXElement(b)) => a.content_eq(b),
1637 (Self::JSXFragment(a), Self::JSXFragment(b)) => a.content_eq(b),
1638 (Self::TSAsExpression(a), Self::TSAsExpression(b)) => a.content_eq(b),
1639 (Self::TSSatisfiesExpression(a), Self::TSSatisfiesExpression(b)) => a.content_eq(b),
1640 (Self::TSTypeAssertion(a), Self::TSTypeAssertion(b)) => a.content_eq(b),
1641 (Self::TSNonNullExpression(a), Self::TSNonNullExpression(b)) => a.content_eq(b),
1642 (Self::TSInstantiationExpression(a), Self::TSInstantiationExpression(b)) => {
1643 a.content_eq(b)
1644 }
1645 (Self::V8IntrinsicExpression(a), Self::V8IntrinsicExpression(b)) => a.content_eq(b),
1646 (Self::ComputedMemberExpression(a), Self::ComputedMemberExpression(b)) => {
1647 a.content_eq(b)
1648 }
1649 (Self::StaticMemberExpression(a), Self::StaticMemberExpression(b)) => a.content_eq(b),
1650 (Self::PrivateFieldExpression(a), Self::PrivateFieldExpression(b)) => a.content_eq(b),
1651 _ => false,
1652 }
1653 }
1654}
1655
1656impl ContentEq for JSXEmptyExpression {
1657 fn content_eq(&self, _: &Self) -> bool {
1658 true
1659 }
1660}
1661
1662impl ContentEq for JSXAttributeItem<'_> {
1663 fn content_eq(&self, other: &Self) -> bool {
1664 match (self, other) {
1665 (Self::Attribute(a), Self::Attribute(b)) => a.content_eq(b),
1666 (Self::SpreadAttribute(a), Self::SpreadAttribute(b)) => a.content_eq(b),
1667 _ => false,
1668 }
1669 }
1670}
1671
1672impl ContentEq for JSXAttribute<'_> {
1673 fn content_eq(&self, other: &Self) -> bool {
1674 ContentEq::content_eq(&self.name, &other.name)
1675 && ContentEq::content_eq(&self.value, &other.value)
1676 }
1677}
1678
1679impl ContentEq for JSXSpreadAttribute<'_> {
1680 fn content_eq(&self, other: &Self) -> bool {
1681 ContentEq::content_eq(&self.argument, &other.argument)
1682 }
1683}
1684
1685impl ContentEq for JSXAttributeName<'_> {
1686 fn content_eq(&self, other: &Self) -> bool {
1687 match (self, other) {
1688 (Self::Identifier(a), Self::Identifier(b)) => a.content_eq(b),
1689 (Self::NamespacedName(a), Self::NamespacedName(b)) => a.content_eq(b),
1690 _ => false,
1691 }
1692 }
1693}
1694
1695impl ContentEq for JSXAttributeValue<'_> {
1696 fn content_eq(&self, other: &Self) -> bool {
1697 match (self, other) {
1698 (Self::StringLiteral(a), Self::StringLiteral(b)) => a.content_eq(b),
1699 (Self::ExpressionContainer(a), Self::ExpressionContainer(b)) => a.content_eq(b),
1700 (Self::Element(a), Self::Element(b)) => a.content_eq(b),
1701 (Self::Fragment(a), Self::Fragment(b)) => a.content_eq(b),
1702 _ => false,
1703 }
1704 }
1705}
1706
1707impl ContentEq for JSXIdentifier<'_> {
1708 fn content_eq(&self, other: &Self) -> bool {
1709 ContentEq::content_eq(&self.name, &other.name)
1710 }
1711}
1712
1713impl ContentEq for JSXChild<'_> {
1714 fn content_eq(&self, other: &Self) -> bool {
1715 match (self, other) {
1716 (Self::Text(a), Self::Text(b)) => a.content_eq(b),
1717 (Self::Element(a), Self::Element(b)) => a.content_eq(b),
1718 (Self::Fragment(a), Self::Fragment(b)) => a.content_eq(b),
1719 (Self::ExpressionContainer(a), Self::ExpressionContainer(b)) => a.content_eq(b),
1720 (Self::Spread(a), Self::Spread(b)) => a.content_eq(b),
1721 _ => false,
1722 }
1723 }
1724}
1725
1726impl ContentEq for JSXSpreadChild<'_> {
1727 fn content_eq(&self, other: &Self) -> bool {
1728 ContentEq::content_eq(&self.expression, &other.expression)
1729 }
1730}
1731
1732impl ContentEq for JSXText<'_> {
1733 fn content_eq(&self, other: &Self) -> bool {
1734 ContentEq::content_eq(&self.value, &other.value)
1735 }
1736}
1737
1738impl ContentEq for TSThisParameter<'_> {
1739 fn content_eq(&self, other: &Self) -> bool {
1740 ContentEq::content_eq(&self.type_annotation, &other.type_annotation)
1741 }
1742}
1743
1744impl ContentEq for TSEnumDeclaration<'_> {
1745 fn content_eq(&self, other: &Self) -> bool {
1746 ContentEq::content_eq(&self.id, &other.id)
1747 && ContentEq::content_eq(&self.body, &other.body)
1748 && ContentEq::content_eq(&self.r#const, &other.r#const)
1749 && ContentEq::content_eq(&self.declare, &other.declare)
1750 }
1751}
1752
1753impl ContentEq for TSEnumBody<'_> {
1754 fn content_eq(&self, other: &Self) -> bool {
1755 ContentEq::content_eq(&self.members, &other.members)
1756 }
1757}
1758
1759impl ContentEq for TSEnumMember<'_> {
1760 fn content_eq(&self, other: &Self) -> bool {
1761 ContentEq::content_eq(&self.id, &other.id)
1762 && ContentEq::content_eq(&self.initializer, &other.initializer)
1763 }
1764}
1765
1766impl ContentEq for TSEnumMemberName<'_> {
1767 fn content_eq(&self, other: &Self) -> bool {
1768 match (self, other) {
1769 (Self::Identifier(a), Self::Identifier(b)) => a.content_eq(b),
1770 (Self::String(a), Self::String(b)) => a.content_eq(b),
1771 (Self::ComputedString(a), Self::ComputedString(b)) => a.content_eq(b),
1772 (Self::ComputedTemplateString(a), Self::ComputedTemplateString(b)) => a.content_eq(b),
1773 _ => false,
1774 }
1775 }
1776}
1777
1778impl ContentEq for TSTypeAnnotation<'_> {
1779 fn content_eq(&self, other: &Self) -> bool {
1780 ContentEq::content_eq(&self.type_annotation, &other.type_annotation)
1781 }
1782}
1783
1784impl ContentEq for TSLiteralType<'_> {
1785 fn content_eq(&self, other: &Self) -> bool {
1786 ContentEq::content_eq(&self.literal, &other.literal)
1787 }
1788}
1789
1790impl ContentEq for TSLiteral<'_> {
1791 fn content_eq(&self, other: &Self) -> bool {
1792 match (self, other) {
1793 (Self::BooleanLiteral(a), Self::BooleanLiteral(b)) => a.content_eq(b),
1794 (Self::NumericLiteral(a), Self::NumericLiteral(b)) => a.content_eq(b),
1795 (Self::BigIntLiteral(a), Self::BigIntLiteral(b)) => a.content_eq(b),
1796 (Self::StringLiteral(a), Self::StringLiteral(b)) => a.content_eq(b),
1797 (Self::TemplateLiteral(a), Self::TemplateLiteral(b)) => a.content_eq(b),
1798 (Self::UnaryExpression(a), Self::UnaryExpression(b)) => a.content_eq(b),
1799 _ => false,
1800 }
1801 }
1802}
1803
1804impl ContentEq for TSType<'_> {
1805 fn content_eq(&self, other: &Self) -> bool {
1806 match (self, other) {
1807 (Self::TSAnyKeyword(a), Self::TSAnyKeyword(b)) => a.content_eq(b),
1808 (Self::TSBigIntKeyword(a), Self::TSBigIntKeyword(b)) => a.content_eq(b),
1809 (Self::TSBooleanKeyword(a), Self::TSBooleanKeyword(b)) => a.content_eq(b),
1810 (Self::TSIntrinsicKeyword(a), Self::TSIntrinsicKeyword(b)) => a.content_eq(b),
1811 (Self::TSNeverKeyword(a), Self::TSNeverKeyword(b)) => a.content_eq(b),
1812 (Self::TSNullKeyword(a), Self::TSNullKeyword(b)) => a.content_eq(b),
1813 (Self::TSNumberKeyword(a), Self::TSNumberKeyword(b)) => a.content_eq(b),
1814 (Self::TSObjectKeyword(a), Self::TSObjectKeyword(b)) => a.content_eq(b),
1815 (Self::TSStringKeyword(a), Self::TSStringKeyword(b)) => a.content_eq(b),
1816 (Self::TSSymbolKeyword(a), Self::TSSymbolKeyword(b)) => a.content_eq(b),
1817 (Self::TSUndefinedKeyword(a), Self::TSUndefinedKeyword(b)) => a.content_eq(b),
1818 (Self::TSUnknownKeyword(a), Self::TSUnknownKeyword(b)) => a.content_eq(b),
1819 (Self::TSVoidKeyword(a), Self::TSVoidKeyword(b)) => a.content_eq(b),
1820 (Self::TSArrayType(a), Self::TSArrayType(b)) => a.content_eq(b),
1821 (Self::TSConditionalType(a), Self::TSConditionalType(b)) => a.content_eq(b),
1822 (Self::TSConstructorType(a), Self::TSConstructorType(b)) => a.content_eq(b),
1823 (Self::TSFunctionType(a), Self::TSFunctionType(b)) => a.content_eq(b),
1824 (Self::TSImportType(a), Self::TSImportType(b)) => a.content_eq(b),
1825 (Self::TSIndexedAccessType(a), Self::TSIndexedAccessType(b)) => a.content_eq(b),
1826 (Self::TSInferType(a), Self::TSInferType(b)) => a.content_eq(b),
1827 (Self::TSIntersectionType(a), Self::TSIntersectionType(b)) => a.content_eq(b),
1828 (Self::TSLiteralType(a), Self::TSLiteralType(b)) => a.content_eq(b),
1829 (Self::TSMappedType(a), Self::TSMappedType(b)) => a.content_eq(b),
1830 (Self::TSNamedTupleMember(a), Self::TSNamedTupleMember(b)) => a.content_eq(b),
1831 (Self::TSTemplateLiteralType(a), Self::TSTemplateLiteralType(b)) => a.content_eq(b),
1832 (Self::TSThisType(a), Self::TSThisType(b)) => a.content_eq(b),
1833 (Self::TSTupleType(a), Self::TSTupleType(b)) => a.content_eq(b),
1834 (Self::TSTypeLiteral(a), Self::TSTypeLiteral(b)) => a.content_eq(b),
1835 (Self::TSTypeOperatorType(a), Self::TSTypeOperatorType(b)) => a.content_eq(b),
1836 (Self::TSTypePredicate(a), Self::TSTypePredicate(b)) => a.content_eq(b),
1837 (Self::TSTypeQuery(a), Self::TSTypeQuery(b)) => a.content_eq(b),
1838 (Self::TSTypeReference(a), Self::TSTypeReference(b)) => a.content_eq(b),
1839 (Self::TSUnionType(a), Self::TSUnionType(b)) => a.content_eq(b),
1840 (Self::TSParenthesizedType(a), Self::TSParenthesizedType(b)) => a.content_eq(b),
1841 (Self::JSDocNullableType(a), Self::JSDocNullableType(b)) => a.content_eq(b),
1842 (Self::JSDocNonNullableType(a), Self::JSDocNonNullableType(b)) => a.content_eq(b),
1843 (Self::JSDocUnknownType(a), Self::JSDocUnknownType(b)) => a.content_eq(b),
1844 _ => false,
1845 }
1846 }
1847}
1848
1849impl ContentEq for TSConditionalType<'_> {
1850 fn content_eq(&self, other: &Self) -> bool {
1851 ContentEq::content_eq(&self.check_type, &other.check_type)
1852 && ContentEq::content_eq(&self.extends_type, &other.extends_type)
1853 && ContentEq::content_eq(&self.true_type, &other.true_type)
1854 && ContentEq::content_eq(&self.false_type, &other.false_type)
1855 }
1856}
1857
1858impl ContentEq for TSUnionType<'_> {
1859 fn content_eq(&self, other: &Self) -> bool {
1860 ContentEq::content_eq(&self.types, &other.types)
1861 }
1862}
1863
1864impl ContentEq for TSIntersectionType<'_> {
1865 fn content_eq(&self, other: &Self) -> bool {
1866 ContentEq::content_eq(&self.types, &other.types)
1867 }
1868}
1869
1870impl ContentEq for TSParenthesizedType<'_> {
1871 fn content_eq(&self, other: &Self) -> bool {
1872 ContentEq::content_eq(&self.type_annotation, &other.type_annotation)
1873 }
1874}
1875
1876impl ContentEq for TSTypeOperator<'_> {
1877 fn content_eq(&self, other: &Self) -> bool {
1878 ContentEq::content_eq(&self.operator, &other.operator)
1879 && ContentEq::content_eq(&self.type_annotation, &other.type_annotation)
1880 }
1881}
1882
1883impl ContentEq for TSTypeOperatorOperator {
1884 fn content_eq(&self, other: &Self) -> bool {
1885 self == other
1886 }
1887}
1888
1889impl ContentEq for TSArrayType<'_> {
1890 fn content_eq(&self, other: &Self) -> bool {
1891 ContentEq::content_eq(&self.element_type, &other.element_type)
1892 }
1893}
1894
1895impl ContentEq for TSIndexedAccessType<'_> {
1896 fn content_eq(&self, other: &Self) -> bool {
1897 ContentEq::content_eq(&self.object_type, &other.object_type)
1898 && ContentEq::content_eq(&self.index_type, &other.index_type)
1899 }
1900}
1901
1902impl ContentEq for TSTupleType<'_> {
1903 fn content_eq(&self, other: &Self) -> bool {
1904 ContentEq::content_eq(&self.element_types, &other.element_types)
1905 }
1906}
1907
1908impl ContentEq for TSNamedTupleMember<'_> {
1909 fn content_eq(&self, other: &Self) -> bool {
1910 ContentEq::content_eq(&self.label, &other.label)
1911 && ContentEq::content_eq(&self.element_type, &other.element_type)
1912 && ContentEq::content_eq(&self.optional, &other.optional)
1913 }
1914}
1915
1916impl ContentEq for TSOptionalType<'_> {
1917 fn content_eq(&self, other: &Self) -> bool {
1918 ContentEq::content_eq(&self.type_annotation, &other.type_annotation)
1919 }
1920}
1921
1922impl ContentEq for TSRestType<'_> {
1923 fn content_eq(&self, other: &Self) -> bool {
1924 ContentEq::content_eq(&self.type_annotation, &other.type_annotation)
1925 }
1926}
1927
1928impl ContentEq for TSTupleElement<'_> {
1929 fn content_eq(&self, other: &Self) -> bool {
1930 match (self, other) {
1931 (Self::TSOptionalType(a), Self::TSOptionalType(b)) => a.content_eq(b),
1932 (Self::TSRestType(a), Self::TSRestType(b)) => a.content_eq(b),
1933 (Self::TSAnyKeyword(a), Self::TSAnyKeyword(b)) => a.content_eq(b),
1934 (Self::TSBigIntKeyword(a), Self::TSBigIntKeyword(b)) => a.content_eq(b),
1935 (Self::TSBooleanKeyword(a), Self::TSBooleanKeyword(b)) => a.content_eq(b),
1936 (Self::TSIntrinsicKeyword(a), Self::TSIntrinsicKeyword(b)) => a.content_eq(b),
1937 (Self::TSNeverKeyword(a), Self::TSNeverKeyword(b)) => a.content_eq(b),
1938 (Self::TSNullKeyword(a), Self::TSNullKeyword(b)) => a.content_eq(b),
1939 (Self::TSNumberKeyword(a), Self::TSNumberKeyword(b)) => a.content_eq(b),
1940 (Self::TSObjectKeyword(a), Self::TSObjectKeyword(b)) => a.content_eq(b),
1941 (Self::TSStringKeyword(a), Self::TSStringKeyword(b)) => a.content_eq(b),
1942 (Self::TSSymbolKeyword(a), Self::TSSymbolKeyword(b)) => a.content_eq(b),
1943 (Self::TSUndefinedKeyword(a), Self::TSUndefinedKeyword(b)) => a.content_eq(b),
1944 (Self::TSUnknownKeyword(a), Self::TSUnknownKeyword(b)) => a.content_eq(b),
1945 (Self::TSVoidKeyword(a), Self::TSVoidKeyword(b)) => a.content_eq(b),
1946 (Self::TSArrayType(a), Self::TSArrayType(b)) => a.content_eq(b),
1947 (Self::TSConditionalType(a), Self::TSConditionalType(b)) => a.content_eq(b),
1948 (Self::TSConstructorType(a), Self::TSConstructorType(b)) => a.content_eq(b),
1949 (Self::TSFunctionType(a), Self::TSFunctionType(b)) => a.content_eq(b),
1950 (Self::TSImportType(a), Self::TSImportType(b)) => a.content_eq(b),
1951 (Self::TSIndexedAccessType(a), Self::TSIndexedAccessType(b)) => a.content_eq(b),
1952 (Self::TSInferType(a), Self::TSInferType(b)) => a.content_eq(b),
1953 (Self::TSIntersectionType(a), Self::TSIntersectionType(b)) => a.content_eq(b),
1954 (Self::TSLiteralType(a), Self::TSLiteralType(b)) => a.content_eq(b),
1955 (Self::TSMappedType(a), Self::TSMappedType(b)) => a.content_eq(b),
1956 (Self::TSNamedTupleMember(a), Self::TSNamedTupleMember(b)) => a.content_eq(b),
1957 (Self::TSTemplateLiteralType(a), Self::TSTemplateLiteralType(b)) => a.content_eq(b),
1958 (Self::TSThisType(a), Self::TSThisType(b)) => a.content_eq(b),
1959 (Self::TSTupleType(a), Self::TSTupleType(b)) => a.content_eq(b),
1960 (Self::TSTypeLiteral(a), Self::TSTypeLiteral(b)) => a.content_eq(b),
1961 (Self::TSTypeOperatorType(a), Self::TSTypeOperatorType(b)) => a.content_eq(b),
1962 (Self::TSTypePredicate(a), Self::TSTypePredicate(b)) => a.content_eq(b),
1963 (Self::TSTypeQuery(a), Self::TSTypeQuery(b)) => a.content_eq(b),
1964 (Self::TSTypeReference(a), Self::TSTypeReference(b)) => a.content_eq(b),
1965 (Self::TSUnionType(a), Self::TSUnionType(b)) => a.content_eq(b),
1966 (Self::TSParenthesizedType(a), Self::TSParenthesizedType(b)) => a.content_eq(b),
1967 (Self::JSDocNullableType(a), Self::JSDocNullableType(b)) => a.content_eq(b),
1968 (Self::JSDocNonNullableType(a), Self::JSDocNonNullableType(b)) => a.content_eq(b),
1969 (Self::JSDocUnknownType(a), Self::JSDocUnknownType(b)) => a.content_eq(b),
1970 _ => false,
1971 }
1972 }
1973}
1974
1975impl ContentEq for TSAnyKeyword {
1976 fn content_eq(&self, _: &Self) -> bool {
1977 true
1978 }
1979}
1980
1981impl ContentEq for TSStringKeyword {
1982 fn content_eq(&self, _: &Self) -> bool {
1983 true
1984 }
1985}
1986
1987impl ContentEq for TSBooleanKeyword {
1988 fn content_eq(&self, _: &Self) -> bool {
1989 true
1990 }
1991}
1992
1993impl ContentEq for TSNumberKeyword {
1994 fn content_eq(&self, _: &Self) -> bool {
1995 true
1996 }
1997}
1998
1999impl ContentEq for TSNeverKeyword {
2000 fn content_eq(&self, _: &Self) -> bool {
2001 true
2002 }
2003}
2004
2005impl ContentEq for TSIntrinsicKeyword {
2006 fn content_eq(&self, _: &Self) -> bool {
2007 true
2008 }
2009}
2010
2011impl ContentEq for TSUnknownKeyword {
2012 fn content_eq(&self, _: &Self) -> bool {
2013 true
2014 }
2015}
2016
2017impl ContentEq for TSNullKeyword {
2018 fn content_eq(&self, _: &Self) -> bool {
2019 true
2020 }
2021}
2022
2023impl ContentEq for TSUndefinedKeyword {
2024 fn content_eq(&self, _: &Self) -> bool {
2025 true
2026 }
2027}
2028
2029impl ContentEq for TSVoidKeyword {
2030 fn content_eq(&self, _: &Self) -> bool {
2031 true
2032 }
2033}
2034
2035impl ContentEq for TSSymbolKeyword {
2036 fn content_eq(&self, _: &Self) -> bool {
2037 true
2038 }
2039}
2040
2041impl ContentEq for TSThisType {
2042 fn content_eq(&self, _: &Self) -> bool {
2043 true
2044 }
2045}
2046
2047impl ContentEq for TSObjectKeyword {
2048 fn content_eq(&self, _: &Self) -> bool {
2049 true
2050 }
2051}
2052
2053impl ContentEq for TSBigIntKeyword {
2054 fn content_eq(&self, _: &Self) -> bool {
2055 true
2056 }
2057}
2058
2059impl ContentEq for TSTypeReference<'_> {
2060 fn content_eq(&self, other: &Self) -> bool {
2061 ContentEq::content_eq(&self.type_name, &other.type_name)
2062 && ContentEq::content_eq(&self.type_arguments, &other.type_arguments)
2063 }
2064}
2065
2066impl ContentEq for TSTypeName<'_> {
2067 fn content_eq(&self, other: &Self) -> bool {
2068 match (self, other) {
2069 (Self::IdentifierReference(a), Self::IdentifierReference(b)) => a.content_eq(b),
2070 (Self::QualifiedName(a), Self::QualifiedName(b)) => a.content_eq(b),
2071 (Self::ThisExpression(a), Self::ThisExpression(b)) => a.content_eq(b),
2072 _ => false,
2073 }
2074 }
2075}
2076
2077impl ContentEq for TSQualifiedName<'_> {
2078 fn content_eq(&self, other: &Self) -> bool {
2079 ContentEq::content_eq(&self.left, &other.left)
2080 && ContentEq::content_eq(&self.right, &other.right)
2081 }
2082}
2083
2084impl ContentEq for TSTypeParameterInstantiation<'_> {
2085 fn content_eq(&self, other: &Self) -> bool {
2086 ContentEq::content_eq(&self.params, &other.params)
2087 }
2088}
2089
2090impl ContentEq for TSTypeParameter<'_> {
2091 fn content_eq(&self, other: &Self) -> bool {
2092 ContentEq::content_eq(&self.name, &other.name)
2093 && ContentEq::content_eq(&self.constraint, &other.constraint)
2094 && ContentEq::content_eq(&self.default, &other.default)
2095 && ContentEq::content_eq(&self.r#in, &other.r#in)
2096 && ContentEq::content_eq(&self.out, &other.out)
2097 && ContentEq::content_eq(&self.r#const, &other.r#const)
2098 }
2099}
2100
2101impl ContentEq for TSTypeParameterDeclaration<'_> {
2102 fn content_eq(&self, other: &Self) -> bool {
2103 ContentEq::content_eq(&self.params, &other.params)
2104 }
2105}
2106
2107impl ContentEq for TSTypeAliasDeclaration<'_> {
2108 fn content_eq(&self, other: &Self) -> bool {
2109 ContentEq::content_eq(&self.id, &other.id)
2110 && ContentEq::content_eq(&self.type_parameters, &other.type_parameters)
2111 && ContentEq::content_eq(&self.type_annotation, &other.type_annotation)
2112 && ContentEq::content_eq(&self.declare, &other.declare)
2113 }
2114}
2115
2116impl ContentEq for TSAccessibility {
2117 fn content_eq(&self, other: &Self) -> bool {
2118 self == other
2119 }
2120}
2121
2122impl ContentEq for TSClassImplements<'_> {
2123 fn content_eq(&self, other: &Self) -> bool {
2124 ContentEq::content_eq(&self.expression, &other.expression)
2125 && ContentEq::content_eq(&self.type_arguments, &other.type_arguments)
2126 }
2127}
2128
2129impl ContentEq for TSInterfaceDeclaration<'_> {
2130 fn content_eq(&self, other: &Self) -> bool {
2131 ContentEq::content_eq(&self.id, &other.id)
2132 && ContentEq::content_eq(&self.type_parameters, &other.type_parameters)
2133 && ContentEq::content_eq(&self.extends, &other.extends)
2134 && ContentEq::content_eq(&self.body, &other.body)
2135 && ContentEq::content_eq(&self.declare, &other.declare)
2136 }
2137}
2138
2139impl ContentEq for TSInterfaceBody<'_> {
2140 fn content_eq(&self, other: &Self) -> bool {
2141 ContentEq::content_eq(&self.body, &other.body)
2142 }
2143}
2144
2145impl ContentEq for TSPropertySignature<'_> {
2146 fn content_eq(&self, other: &Self) -> bool {
2147 ContentEq::content_eq(&self.computed, &other.computed)
2148 && ContentEq::content_eq(&self.optional, &other.optional)
2149 && ContentEq::content_eq(&self.readonly, &other.readonly)
2150 && ContentEq::content_eq(&self.key, &other.key)
2151 && ContentEq::content_eq(&self.type_annotation, &other.type_annotation)
2152 }
2153}
2154
2155impl ContentEq for TSSignature<'_> {
2156 fn content_eq(&self, other: &Self) -> bool {
2157 match (self, other) {
2158 (Self::TSIndexSignature(a), Self::TSIndexSignature(b)) => a.content_eq(b),
2159 (Self::TSPropertySignature(a), Self::TSPropertySignature(b)) => a.content_eq(b),
2160 (Self::TSCallSignatureDeclaration(a), Self::TSCallSignatureDeclaration(b)) => {
2161 a.content_eq(b)
2162 }
2163 (
2164 Self::TSConstructSignatureDeclaration(a),
2165 Self::TSConstructSignatureDeclaration(b),
2166 ) => a.content_eq(b),
2167 (Self::TSMethodSignature(a), Self::TSMethodSignature(b)) => a.content_eq(b),
2168 _ => false,
2169 }
2170 }
2171}
2172
2173impl ContentEq for TSIndexSignature<'_> {
2174 fn content_eq(&self, other: &Self) -> bool {
2175 ContentEq::content_eq(&self.parameters, &other.parameters)
2176 && ContentEq::content_eq(&self.type_annotation, &other.type_annotation)
2177 && ContentEq::content_eq(&self.readonly, &other.readonly)
2178 && ContentEq::content_eq(&self.r#static, &other.r#static)
2179 }
2180}
2181
2182impl ContentEq for TSCallSignatureDeclaration<'_> {
2183 fn content_eq(&self, other: &Self) -> bool {
2184 ContentEq::content_eq(&self.type_parameters, &other.type_parameters)
2185 && ContentEq::content_eq(&self.this_param, &other.this_param)
2186 && ContentEq::content_eq(&self.params, &other.params)
2187 && ContentEq::content_eq(&self.return_type, &other.return_type)
2188 }
2189}
2190
2191impl ContentEq for TSMethodSignatureKind {
2192 fn content_eq(&self, other: &Self) -> bool {
2193 self == other
2194 }
2195}
2196
2197impl ContentEq for TSMethodSignature<'_> {
2198 fn content_eq(&self, other: &Self) -> bool {
2199 ContentEq::content_eq(&self.key, &other.key)
2200 && ContentEq::content_eq(&self.computed, &other.computed)
2201 && ContentEq::content_eq(&self.optional, &other.optional)
2202 && ContentEq::content_eq(&self.kind, &other.kind)
2203 && ContentEq::content_eq(&self.type_parameters, &other.type_parameters)
2204 && ContentEq::content_eq(&self.this_param, &other.this_param)
2205 && ContentEq::content_eq(&self.params, &other.params)
2206 && ContentEq::content_eq(&self.return_type, &other.return_type)
2207 }
2208}
2209
2210impl ContentEq for TSConstructSignatureDeclaration<'_> {
2211 fn content_eq(&self, other: &Self) -> bool {
2212 ContentEq::content_eq(&self.type_parameters, &other.type_parameters)
2213 && ContentEq::content_eq(&self.params, &other.params)
2214 && ContentEq::content_eq(&self.return_type, &other.return_type)
2215 }
2216}
2217
2218impl ContentEq for TSIndexSignatureName<'_> {
2219 fn content_eq(&self, other: &Self) -> bool {
2220 ContentEq::content_eq(&self.name, &other.name)
2221 && ContentEq::content_eq(&self.type_annotation, &other.type_annotation)
2222 }
2223}
2224
2225impl ContentEq for TSInterfaceHeritage<'_> {
2226 fn content_eq(&self, other: &Self) -> bool {
2227 ContentEq::content_eq(&self.expression, &other.expression)
2228 && ContentEq::content_eq(&self.type_arguments, &other.type_arguments)
2229 }
2230}
2231
2232impl ContentEq for TSTypePredicate<'_> {
2233 fn content_eq(&self, other: &Self) -> bool {
2234 ContentEq::content_eq(&self.parameter_name, &other.parameter_name)
2235 && ContentEq::content_eq(&self.asserts, &other.asserts)
2236 && ContentEq::content_eq(&self.type_annotation, &other.type_annotation)
2237 }
2238}
2239
2240impl ContentEq for TSTypePredicateName<'_> {
2241 fn content_eq(&self, other: &Self) -> bool {
2242 match (self, other) {
2243 (Self::Identifier(a), Self::Identifier(b)) => a.content_eq(b),
2244 (Self::This(a), Self::This(b)) => a.content_eq(b),
2245 _ => false,
2246 }
2247 }
2248}
2249
2250impl ContentEq for TSModuleDeclaration<'_> {
2251 fn content_eq(&self, other: &Self) -> bool {
2252 ContentEq::content_eq(&self.id, &other.id)
2253 && ContentEq::content_eq(&self.body, &other.body)
2254 && ContentEq::content_eq(&self.kind, &other.kind)
2255 && ContentEq::content_eq(&self.declare, &other.declare)
2256 }
2257}
2258
2259impl ContentEq for TSModuleDeclarationKind {
2260 fn content_eq(&self, other: &Self) -> bool {
2261 self == other
2262 }
2263}
2264
2265impl ContentEq for TSModuleDeclarationName<'_> {
2266 fn content_eq(&self, other: &Self) -> bool {
2267 match (self, other) {
2268 (Self::Identifier(a), Self::Identifier(b)) => a.content_eq(b),
2269 (Self::StringLiteral(a), Self::StringLiteral(b)) => a.content_eq(b),
2270 _ => false,
2271 }
2272 }
2273}
2274
2275impl ContentEq for TSModuleDeclarationBody<'_> {
2276 fn content_eq(&self, other: &Self) -> bool {
2277 match (self, other) {
2278 (Self::TSModuleDeclaration(a), Self::TSModuleDeclaration(b)) => a.content_eq(b),
2279 (Self::TSModuleBlock(a), Self::TSModuleBlock(b)) => a.content_eq(b),
2280 _ => false,
2281 }
2282 }
2283}
2284
2285impl ContentEq for TSGlobalDeclaration<'_> {
2286 fn content_eq(&self, other: &Self) -> bool {
2287 ContentEq::content_eq(&self.body, &other.body)
2288 && ContentEq::content_eq(&self.declare, &other.declare)
2289 }
2290}
2291
2292impl ContentEq for TSModuleBlock<'_> {
2293 fn content_eq(&self, other: &Self) -> bool {
2294 ContentEq::content_eq(&self.directives, &other.directives)
2295 && ContentEq::content_eq(&self.body, &other.body)
2296 }
2297}
2298
2299impl ContentEq for TSTypeLiteral<'_> {
2300 fn content_eq(&self, other: &Self) -> bool {
2301 ContentEq::content_eq(&self.members, &other.members)
2302 }
2303}
2304
2305impl ContentEq for TSInferType<'_> {
2306 fn content_eq(&self, other: &Self) -> bool {
2307 ContentEq::content_eq(&self.type_parameter, &other.type_parameter)
2308 }
2309}
2310
2311impl ContentEq for TSTypeQuery<'_> {
2312 fn content_eq(&self, other: &Self) -> bool {
2313 ContentEq::content_eq(&self.expr_name, &other.expr_name)
2314 && ContentEq::content_eq(&self.type_arguments, &other.type_arguments)
2315 }
2316}
2317
2318impl ContentEq for TSTypeQueryExprName<'_> {
2319 fn content_eq(&self, other: &Self) -> bool {
2320 match (self, other) {
2321 (Self::TSImportType(a), Self::TSImportType(b)) => a.content_eq(b),
2322 (Self::IdentifierReference(a), Self::IdentifierReference(b)) => a.content_eq(b),
2323 (Self::QualifiedName(a), Self::QualifiedName(b)) => a.content_eq(b),
2324 (Self::ThisExpression(a), Self::ThisExpression(b)) => a.content_eq(b),
2325 _ => false,
2326 }
2327 }
2328}
2329
2330impl ContentEq for TSImportType<'_> {
2331 fn content_eq(&self, other: &Self) -> bool {
2332 ContentEq::content_eq(&self.argument, &other.argument)
2333 && ContentEq::content_eq(&self.options, &other.options)
2334 && ContentEq::content_eq(&self.qualifier, &other.qualifier)
2335 && ContentEq::content_eq(&self.type_arguments, &other.type_arguments)
2336 }
2337}
2338
2339impl ContentEq for TSImportTypeQualifier<'_> {
2340 fn content_eq(&self, other: &Self) -> bool {
2341 match (self, other) {
2342 (Self::Identifier(a), Self::Identifier(b)) => a.content_eq(b),
2343 (Self::QualifiedName(a), Self::QualifiedName(b)) => a.content_eq(b),
2344 _ => false,
2345 }
2346 }
2347}
2348
2349impl ContentEq for TSImportTypeQualifiedName<'_> {
2350 fn content_eq(&self, other: &Self) -> bool {
2351 ContentEq::content_eq(&self.left, &other.left)
2352 && ContentEq::content_eq(&self.right, &other.right)
2353 }
2354}
2355
2356impl ContentEq for TSFunctionType<'_> {
2357 fn content_eq(&self, other: &Self) -> bool {
2358 ContentEq::content_eq(&self.type_parameters, &other.type_parameters)
2359 && ContentEq::content_eq(&self.this_param, &other.this_param)
2360 && ContentEq::content_eq(&self.params, &other.params)
2361 && ContentEq::content_eq(&self.return_type, &other.return_type)
2362 }
2363}
2364
2365impl ContentEq for TSConstructorType<'_> {
2366 fn content_eq(&self, other: &Self) -> bool {
2367 ContentEq::content_eq(&self.r#abstract, &other.r#abstract)
2368 && ContentEq::content_eq(&self.type_parameters, &other.type_parameters)
2369 && ContentEq::content_eq(&self.params, &other.params)
2370 && ContentEq::content_eq(&self.return_type, &other.return_type)
2371 }
2372}
2373
2374impl ContentEq for TSMappedType<'_> {
2375 fn content_eq(&self, other: &Self) -> bool {
2376 ContentEq::content_eq(&self.type_parameter, &other.type_parameter)
2377 && ContentEq::content_eq(&self.name_type, &other.name_type)
2378 && ContentEq::content_eq(&self.type_annotation, &other.type_annotation)
2379 && ContentEq::content_eq(&self.optional, &other.optional)
2380 && ContentEq::content_eq(&self.readonly, &other.readonly)
2381 }
2382}
2383
2384impl ContentEq for TSMappedTypeModifierOperator {
2385 fn content_eq(&self, other: &Self) -> bool {
2386 self == other
2387 }
2388}
2389
2390impl ContentEq for TSTemplateLiteralType<'_> {
2391 fn content_eq(&self, other: &Self) -> bool {
2392 ContentEq::content_eq(&self.quasis, &other.quasis)
2393 && ContentEq::content_eq(&self.types, &other.types)
2394 }
2395}
2396
2397impl ContentEq for TSAsExpression<'_> {
2398 fn content_eq(&self, other: &Self) -> bool {
2399 ContentEq::content_eq(&self.expression, &other.expression)
2400 && ContentEq::content_eq(&self.type_annotation, &other.type_annotation)
2401 }
2402}
2403
2404impl ContentEq for TSSatisfiesExpression<'_> {
2405 fn content_eq(&self, other: &Self) -> bool {
2406 ContentEq::content_eq(&self.expression, &other.expression)
2407 && ContentEq::content_eq(&self.type_annotation, &other.type_annotation)
2408 }
2409}
2410
2411impl ContentEq for TSTypeAssertion<'_> {
2412 fn content_eq(&self, other: &Self) -> bool {
2413 ContentEq::content_eq(&self.type_annotation, &other.type_annotation)
2414 && ContentEq::content_eq(&self.expression, &other.expression)
2415 }
2416}
2417
2418impl ContentEq for TSImportEqualsDeclaration<'_> {
2419 fn content_eq(&self, other: &Self) -> bool {
2420 ContentEq::content_eq(&self.id, &other.id)
2421 && ContentEq::content_eq(&self.module_reference, &other.module_reference)
2422 && ContentEq::content_eq(&self.import_kind, &other.import_kind)
2423 }
2424}
2425
2426impl ContentEq for TSModuleReference<'_> {
2427 fn content_eq(&self, other: &Self) -> bool {
2428 match (self, other) {
2429 (Self::ExternalModuleReference(a), Self::ExternalModuleReference(b)) => a.content_eq(b),
2430 (Self::IdentifierReference(a), Self::IdentifierReference(b)) => a.content_eq(b),
2431 (Self::QualifiedName(a), Self::QualifiedName(b)) => a.content_eq(b),
2432 (Self::ThisExpression(a), Self::ThisExpression(b)) => a.content_eq(b),
2433 _ => false,
2434 }
2435 }
2436}
2437
2438impl ContentEq for TSExternalModuleReference<'_> {
2439 fn content_eq(&self, other: &Self) -> bool {
2440 ContentEq::content_eq(&self.expression, &other.expression)
2441 }
2442}
2443
2444impl ContentEq for TSNonNullExpression<'_> {
2445 fn content_eq(&self, other: &Self) -> bool {
2446 ContentEq::content_eq(&self.expression, &other.expression)
2447 }
2448}
2449
2450impl ContentEq for Decorator<'_> {
2451 fn content_eq(&self, other: &Self) -> bool {
2452 ContentEq::content_eq(&self.expression, &other.expression)
2453 }
2454}
2455
2456impl ContentEq for TSExportAssignment<'_> {
2457 fn content_eq(&self, other: &Self) -> bool {
2458 ContentEq::content_eq(&self.expression, &other.expression)
2459 }
2460}
2461
2462impl ContentEq for TSNamespaceExportDeclaration<'_> {
2463 fn content_eq(&self, other: &Self) -> bool {
2464 ContentEq::content_eq(&self.id, &other.id)
2465 }
2466}
2467
2468impl ContentEq for TSInstantiationExpression<'_> {
2469 fn content_eq(&self, other: &Self) -> bool {
2470 ContentEq::content_eq(&self.expression, &other.expression)
2471 && ContentEq::content_eq(&self.type_arguments, &other.type_arguments)
2472 }
2473}
2474
2475impl ContentEq for ImportOrExportKind {
2476 fn content_eq(&self, other: &Self) -> bool {
2477 self == other
2478 }
2479}
2480
2481impl ContentEq for JSDocNullableType<'_> {
2482 fn content_eq(&self, other: &Self) -> bool {
2483 ContentEq::content_eq(&self.type_annotation, &other.type_annotation)
2484 && ContentEq::content_eq(&self.postfix, &other.postfix)
2485 }
2486}
2487
2488impl ContentEq for JSDocNonNullableType<'_> {
2489 fn content_eq(&self, other: &Self) -> bool {
2490 ContentEq::content_eq(&self.type_annotation, &other.type_annotation)
2491 && ContentEq::content_eq(&self.postfix, &other.postfix)
2492 }
2493}
2494
2495impl ContentEq for JSDocUnknownType {
2496 fn content_eq(&self, _: &Self) -> bool {
2497 true
2498 }
2499}
2500
2501impl ContentEq for CommentKind {
2502 fn content_eq(&self, other: &Self) -> bool {
2503 self == other
2504 }
2505}
2506
2507impl ContentEq for CommentPosition {
2508 fn content_eq(&self, other: &Self) -> bool {
2509 self == other
2510 }
2511}
2512
2513impl ContentEq for CommentContent {
2514 fn content_eq(&self, other: &Self) -> bool {
2515 self == other
2516 }
2517}
2518
2519impl ContentEq for Comment {
2520 fn content_eq(&self, other: &Self) -> bool {
2521 ContentEq::content_eq(&self.attached_to, &other.attached_to)
2522 && ContentEq::content_eq(&self.kind, &other.kind)
2523 && ContentEq::content_eq(&self.position, &other.position)
2524 && ContentEq::content_eq(&self.newlines, &other.newlines)
2525 && ContentEq::content_eq(&self.content, &other.content)
2526 }
2527}