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