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