1#![allow(unused_variables, clippy::default_trait_access, clippy::inline_always)]
5
6use oxc_allocator::{Allocator, CloneIn};
7
8use crate::ast::comment::*;
9use crate::ast::js::*;
10use crate::ast::jsx::*;
11use crate::ast::literal::*;
12use crate::ast::ts::*;
13
14impl<'new_alloc> CloneIn<'new_alloc> for Program<'_> {
15 type Cloned = Program<'new_alloc>;
16
17 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
18 Program {
19 span: CloneIn::clone_in(&self.span, allocator),
20 source_type: CloneIn::clone_in(&self.source_type, allocator),
21 source_text: CloneIn::clone_in(&self.source_text, allocator),
22 comments: CloneIn::clone_in(&self.comments, allocator),
23 hashbang: CloneIn::clone_in(&self.hashbang, allocator),
24 directives: CloneIn::clone_in(&self.directives, allocator),
25 body: CloneIn::clone_in(&self.body, allocator),
26 scope_id: Default::default(),
27 }
28 }
29
30 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
31 Program {
32 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
33 source_type: CloneIn::clone_in_with_semantic_ids(&self.source_type, allocator),
34 source_text: CloneIn::clone_in_with_semantic_ids(&self.source_text, allocator),
35 comments: CloneIn::clone_in_with_semantic_ids(&self.comments, allocator),
36 hashbang: CloneIn::clone_in_with_semantic_ids(&self.hashbang, allocator),
37 directives: CloneIn::clone_in_with_semantic_ids(&self.directives, allocator),
38 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
39 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
40 }
41 }
42}
43
44impl<'new_alloc> CloneIn<'new_alloc> for Expression<'_> {
45 type Cloned = Expression<'new_alloc>;
46
47 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
48 match self {
49 Self::BooleanLiteral(it) => {
50 Expression::BooleanLiteral(CloneIn::clone_in(it, allocator))
51 }
52 Self::NullLiteral(it) => Expression::NullLiteral(CloneIn::clone_in(it, allocator)),
53 Self::NumericLiteral(it) => {
54 Expression::NumericLiteral(CloneIn::clone_in(it, allocator))
55 }
56 Self::BigIntLiteral(it) => Expression::BigIntLiteral(CloneIn::clone_in(it, allocator)),
57 Self::RegExpLiteral(it) => Expression::RegExpLiteral(CloneIn::clone_in(it, allocator)),
58 Self::StringLiteral(it) => Expression::StringLiteral(CloneIn::clone_in(it, allocator)),
59 Self::TemplateLiteral(it) => {
60 Expression::TemplateLiteral(CloneIn::clone_in(it, allocator))
61 }
62 Self::Identifier(it) => Expression::Identifier(CloneIn::clone_in(it, allocator)),
63 Self::MetaProperty(it) => Expression::MetaProperty(CloneIn::clone_in(it, allocator)),
64 Self::Super(it) => Expression::Super(CloneIn::clone_in(it, allocator)),
65 Self::ArrayExpression(it) => {
66 Expression::ArrayExpression(CloneIn::clone_in(it, allocator))
67 }
68 Self::ArrowFunctionExpression(it) => {
69 Expression::ArrowFunctionExpression(CloneIn::clone_in(it, allocator))
70 }
71 Self::AssignmentExpression(it) => {
72 Expression::AssignmentExpression(CloneIn::clone_in(it, allocator))
73 }
74 Self::AwaitExpression(it) => {
75 Expression::AwaitExpression(CloneIn::clone_in(it, allocator))
76 }
77 Self::BinaryExpression(it) => {
78 Expression::BinaryExpression(CloneIn::clone_in(it, allocator))
79 }
80 Self::CallExpression(it) => {
81 Expression::CallExpression(CloneIn::clone_in(it, allocator))
82 }
83 Self::ChainExpression(it) => {
84 Expression::ChainExpression(CloneIn::clone_in(it, allocator))
85 }
86 Self::ClassExpression(it) => {
87 Expression::ClassExpression(CloneIn::clone_in(it, allocator))
88 }
89 Self::ConditionalExpression(it) => {
90 Expression::ConditionalExpression(CloneIn::clone_in(it, allocator))
91 }
92 Self::FunctionExpression(it) => {
93 Expression::FunctionExpression(CloneIn::clone_in(it, allocator))
94 }
95 Self::ImportExpression(it) => {
96 Expression::ImportExpression(CloneIn::clone_in(it, allocator))
97 }
98 Self::LogicalExpression(it) => {
99 Expression::LogicalExpression(CloneIn::clone_in(it, allocator))
100 }
101 Self::NewExpression(it) => Expression::NewExpression(CloneIn::clone_in(it, allocator)),
102 Self::ObjectExpression(it) => {
103 Expression::ObjectExpression(CloneIn::clone_in(it, allocator))
104 }
105 Self::ParenthesizedExpression(it) => {
106 Expression::ParenthesizedExpression(CloneIn::clone_in(it, allocator))
107 }
108 Self::SequenceExpression(it) => {
109 Expression::SequenceExpression(CloneIn::clone_in(it, allocator))
110 }
111 Self::TaggedTemplateExpression(it) => {
112 Expression::TaggedTemplateExpression(CloneIn::clone_in(it, allocator))
113 }
114 Self::ThisExpression(it) => {
115 Expression::ThisExpression(CloneIn::clone_in(it, allocator))
116 }
117 Self::UnaryExpression(it) => {
118 Expression::UnaryExpression(CloneIn::clone_in(it, allocator))
119 }
120 Self::UpdateExpression(it) => {
121 Expression::UpdateExpression(CloneIn::clone_in(it, allocator))
122 }
123 Self::YieldExpression(it) => {
124 Expression::YieldExpression(CloneIn::clone_in(it, allocator))
125 }
126 Self::PrivateInExpression(it) => {
127 Expression::PrivateInExpression(CloneIn::clone_in(it, allocator))
128 }
129 Self::JSXElement(it) => Expression::JSXElement(CloneIn::clone_in(it, allocator)),
130 Self::JSXFragment(it) => Expression::JSXFragment(CloneIn::clone_in(it, allocator)),
131 Self::TSAsExpression(it) => {
132 Expression::TSAsExpression(CloneIn::clone_in(it, allocator))
133 }
134 Self::TSSatisfiesExpression(it) => {
135 Expression::TSSatisfiesExpression(CloneIn::clone_in(it, allocator))
136 }
137 Self::TSTypeAssertion(it) => {
138 Expression::TSTypeAssertion(CloneIn::clone_in(it, allocator))
139 }
140 Self::TSNonNullExpression(it) => {
141 Expression::TSNonNullExpression(CloneIn::clone_in(it, allocator))
142 }
143 Self::TSInstantiationExpression(it) => {
144 Expression::TSInstantiationExpression(CloneIn::clone_in(it, allocator))
145 }
146 Self::V8IntrinsicExpression(it) => {
147 Expression::V8IntrinsicExpression(CloneIn::clone_in(it, allocator))
148 }
149 Self::ComputedMemberExpression(it) => {
150 Expression::ComputedMemberExpression(CloneIn::clone_in(it, allocator))
151 }
152 Self::StaticMemberExpression(it) => {
153 Expression::StaticMemberExpression(CloneIn::clone_in(it, allocator))
154 }
155 Self::PrivateFieldExpression(it) => {
156 Expression::PrivateFieldExpression(CloneIn::clone_in(it, allocator))
157 }
158 }
159 }
160
161 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
162 match self {
163 Self::BooleanLiteral(it) => {
164 Expression::BooleanLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
165 }
166 Self::NullLiteral(it) => {
167 Expression::NullLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
168 }
169 Self::NumericLiteral(it) => {
170 Expression::NumericLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
171 }
172 Self::BigIntLiteral(it) => {
173 Expression::BigIntLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
174 }
175 Self::RegExpLiteral(it) => {
176 Expression::RegExpLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
177 }
178 Self::StringLiteral(it) => {
179 Expression::StringLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
180 }
181 Self::TemplateLiteral(it) => {
182 Expression::TemplateLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
183 }
184 Self::Identifier(it) => {
185 Expression::Identifier(CloneIn::clone_in_with_semantic_ids(it, allocator))
186 }
187 Self::MetaProperty(it) => {
188 Expression::MetaProperty(CloneIn::clone_in_with_semantic_ids(it, allocator))
189 }
190 Self::Super(it) => {
191 Expression::Super(CloneIn::clone_in_with_semantic_ids(it, allocator))
192 }
193 Self::ArrayExpression(it) => {
194 Expression::ArrayExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
195 }
196 Self::ArrowFunctionExpression(it) => Expression::ArrowFunctionExpression(
197 CloneIn::clone_in_with_semantic_ids(it, allocator),
198 ),
199 Self::AssignmentExpression(it) => {
200 Expression::AssignmentExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
201 }
202 Self::AwaitExpression(it) => {
203 Expression::AwaitExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
204 }
205 Self::BinaryExpression(it) => {
206 Expression::BinaryExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
207 }
208 Self::CallExpression(it) => {
209 Expression::CallExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
210 }
211 Self::ChainExpression(it) => {
212 Expression::ChainExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
213 }
214 Self::ClassExpression(it) => {
215 Expression::ClassExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
216 }
217 Self::ConditionalExpression(it) => Expression::ConditionalExpression(
218 CloneIn::clone_in_with_semantic_ids(it, allocator),
219 ),
220 Self::FunctionExpression(it) => {
221 Expression::FunctionExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
222 }
223 Self::ImportExpression(it) => {
224 Expression::ImportExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
225 }
226 Self::LogicalExpression(it) => {
227 Expression::LogicalExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
228 }
229 Self::NewExpression(it) => {
230 Expression::NewExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
231 }
232 Self::ObjectExpression(it) => {
233 Expression::ObjectExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
234 }
235 Self::ParenthesizedExpression(it) => Expression::ParenthesizedExpression(
236 CloneIn::clone_in_with_semantic_ids(it, allocator),
237 ),
238 Self::SequenceExpression(it) => {
239 Expression::SequenceExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
240 }
241 Self::TaggedTemplateExpression(it) => Expression::TaggedTemplateExpression(
242 CloneIn::clone_in_with_semantic_ids(it, allocator),
243 ),
244 Self::ThisExpression(it) => {
245 Expression::ThisExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
246 }
247 Self::UnaryExpression(it) => {
248 Expression::UnaryExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
249 }
250 Self::UpdateExpression(it) => {
251 Expression::UpdateExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
252 }
253 Self::YieldExpression(it) => {
254 Expression::YieldExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
255 }
256 Self::PrivateInExpression(it) => {
257 Expression::PrivateInExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
258 }
259 Self::JSXElement(it) => {
260 Expression::JSXElement(CloneIn::clone_in_with_semantic_ids(it, allocator))
261 }
262 Self::JSXFragment(it) => {
263 Expression::JSXFragment(CloneIn::clone_in_with_semantic_ids(it, allocator))
264 }
265 Self::TSAsExpression(it) => {
266 Expression::TSAsExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
267 }
268 Self::TSSatisfiesExpression(it) => Expression::TSSatisfiesExpression(
269 CloneIn::clone_in_with_semantic_ids(it, allocator),
270 ),
271 Self::TSTypeAssertion(it) => {
272 Expression::TSTypeAssertion(CloneIn::clone_in_with_semantic_ids(it, allocator))
273 }
274 Self::TSNonNullExpression(it) => {
275 Expression::TSNonNullExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
276 }
277 Self::TSInstantiationExpression(it) => Expression::TSInstantiationExpression(
278 CloneIn::clone_in_with_semantic_ids(it, allocator),
279 ),
280 Self::V8IntrinsicExpression(it) => Expression::V8IntrinsicExpression(
281 CloneIn::clone_in_with_semantic_ids(it, allocator),
282 ),
283 Self::ComputedMemberExpression(it) => Expression::ComputedMemberExpression(
284 CloneIn::clone_in_with_semantic_ids(it, allocator),
285 ),
286 Self::StaticMemberExpression(it) => Expression::StaticMemberExpression(
287 CloneIn::clone_in_with_semantic_ids(it, allocator),
288 ),
289 Self::PrivateFieldExpression(it) => Expression::PrivateFieldExpression(
290 CloneIn::clone_in_with_semantic_ids(it, allocator),
291 ),
292 }
293 }
294}
295
296impl<'new_alloc> CloneIn<'new_alloc> for IdentifierName<'_> {
297 type Cloned = IdentifierName<'new_alloc>;
298
299 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
300 IdentifierName {
301 span: CloneIn::clone_in(&self.span, allocator),
302 name: CloneIn::clone_in(&self.name, allocator),
303 }
304 }
305
306 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
307 IdentifierName {
308 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
309 name: CloneIn::clone_in_with_semantic_ids(&self.name, allocator),
310 }
311 }
312}
313
314impl<'new_alloc> CloneIn<'new_alloc> for IdentifierReference<'_> {
315 type Cloned = IdentifierReference<'new_alloc>;
316
317 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
318 IdentifierReference {
319 span: CloneIn::clone_in(&self.span, allocator),
320 name: CloneIn::clone_in(&self.name, allocator),
321 reference_id: Default::default(),
322 }
323 }
324
325 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
326 IdentifierReference {
327 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
328 name: CloneIn::clone_in_with_semantic_ids(&self.name, allocator),
329 reference_id: CloneIn::clone_in_with_semantic_ids(&self.reference_id, allocator),
330 }
331 }
332}
333
334impl<'new_alloc> CloneIn<'new_alloc> for BindingIdentifier<'_> {
335 type Cloned = BindingIdentifier<'new_alloc>;
336
337 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
338 BindingIdentifier {
339 span: CloneIn::clone_in(&self.span, allocator),
340 name: CloneIn::clone_in(&self.name, allocator),
341 symbol_id: Default::default(),
342 }
343 }
344
345 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
346 BindingIdentifier {
347 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
348 name: CloneIn::clone_in_with_semantic_ids(&self.name, allocator),
349 symbol_id: CloneIn::clone_in_with_semantic_ids(&self.symbol_id, allocator),
350 }
351 }
352}
353
354impl<'new_alloc> CloneIn<'new_alloc> for LabelIdentifier<'_> {
355 type Cloned = LabelIdentifier<'new_alloc>;
356
357 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
358 LabelIdentifier {
359 span: CloneIn::clone_in(&self.span, allocator),
360 name: CloneIn::clone_in(&self.name, allocator),
361 }
362 }
363
364 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
365 LabelIdentifier {
366 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
367 name: CloneIn::clone_in_with_semantic_ids(&self.name, allocator),
368 }
369 }
370}
371
372impl<'new_alloc> CloneIn<'new_alloc> for ThisExpression {
373 type Cloned = ThisExpression;
374
375 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
376 ThisExpression { span: CloneIn::clone_in(&self.span, allocator) }
377 }
378
379 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
380 ThisExpression { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
381 }
382}
383
384impl<'new_alloc> CloneIn<'new_alloc> for ArrayExpression<'_> {
385 type Cloned = ArrayExpression<'new_alloc>;
386
387 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
388 ArrayExpression {
389 span: CloneIn::clone_in(&self.span, allocator),
390 elements: CloneIn::clone_in(&self.elements, allocator),
391 }
392 }
393
394 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
395 ArrayExpression {
396 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
397 elements: CloneIn::clone_in_with_semantic_ids(&self.elements, allocator),
398 }
399 }
400}
401
402impl<'new_alloc> CloneIn<'new_alloc> for ArrayExpressionElement<'_> {
403 type Cloned = ArrayExpressionElement<'new_alloc>;
404
405 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
406 match self {
407 Self::SpreadElement(it) => {
408 ArrayExpressionElement::SpreadElement(CloneIn::clone_in(it, allocator))
409 }
410 Self::Elision(it) => ArrayExpressionElement::Elision(CloneIn::clone_in(it, allocator)),
411 Self::BooleanLiteral(it) => {
412 ArrayExpressionElement::BooleanLiteral(CloneIn::clone_in(it, allocator))
413 }
414 Self::NullLiteral(it) => {
415 ArrayExpressionElement::NullLiteral(CloneIn::clone_in(it, allocator))
416 }
417 Self::NumericLiteral(it) => {
418 ArrayExpressionElement::NumericLiteral(CloneIn::clone_in(it, allocator))
419 }
420 Self::BigIntLiteral(it) => {
421 ArrayExpressionElement::BigIntLiteral(CloneIn::clone_in(it, allocator))
422 }
423 Self::RegExpLiteral(it) => {
424 ArrayExpressionElement::RegExpLiteral(CloneIn::clone_in(it, allocator))
425 }
426 Self::StringLiteral(it) => {
427 ArrayExpressionElement::StringLiteral(CloneIn::clone_in(it, allocator))
428 }
429 Self::TemplateLiteral(it) => {
430 ArrayExpressionElement::TemplateLiteral(CloneIn::clone_in(it, allocator))
431 }
432 Self::Identifier(it) => {
433 ArrayExpressionElement::Identifier(CloneIn::clone_in(it, allocator))
434 }
435 Self::MetaProperty(it) => {
436 ArrayExpressionElement::MetaProperty(CloneIn::clone_in(it, allocator))
437 }
438 Self::Super(it) => ArrayExpressionElement::Super(CloneIn::clone_in(it, allocator)),
439 Self::ArrayExpression(it) => {
440 ArrayExpressionElement::ArrayExpression(CloneIn::clone_in(it, allocator))
441 }
442 Self::ArrowFunctionExpression(it) => {
443 ArrayExpressionElement::ArrowFunctionExpression(CloneIn::clone_in(it, allocator))
444 }
445 Self::AssignmentExpression(it) => {
446 ArrayExpressionElement::AssignmentExpression(CloneIn::clone_in(it, allocator))
447 }
448 Self::AwaitExpression(it) => {
449 ArrayExpressionElement::AwaitExpression(CloneIn::clone_in(it, allocator))
450 }
451 Self::BinaryExpression(it) => {
452 ArrayExpressionElement::BinaryExpression(CloneIn::clone_in(it, allocator))
453 }
454 Self::CallExpression(it) => {
455 ArrayExpressionElement::CallExpression(CloneIn::clone_in(it, allocator))
456 }
457 Self::ChainExpression(it) => {
458 ArrayExpressionElement::ChainExpression(CloneIn::clone_in(it, allocator))
459 }
460 Self::ClassExpression(it) => {
461 ArrayExpressionElement::ClassExpression(CloneIn::clone_in(it, allocator))
462 }
463 Self::ConditionalExpression(it) => {
464 ArrayExpressionElement::ConditionalExpression(CloneIn::clone_in(it, allocator))
465 }
466 Self::FunctionExpression(it) => {
467 ArrayExpressionElement::FunctionExpression(CloneIn::clone_in(it, allocator))
468 }
469 Self::ImportExpression(it) => {
470 ArrayExpressionElement::ImportExpression(CloneIn::clone_in(it, allocator))
471 }
472 Self::LogicalExpression(it) => {
473 ArrayExpressionElement::LogicalExpression(CloneIn::clone_in(it, allocator))
474 }
475 Self::NewExpression(it) => {
476 ArrayExpressionElement::NewExpression(CloneIn::clone_in(it, allocator))
477 }
478 Self::ObjectExpression(it) => {
479 ArrayExpressionElement::ObjectExpression(CloneIn::clone_in(it, allocator))
480 }
481 Self::ParenthesizedExpression(it) => {
482 ArrayExpressionElement::ParenthesizedExpression(CloneIn::clone_in(it, allocator))
483 }
484 Self::SequenceExpression(it) => {
485 ArrayExpressionElement::SequenceExpression(CloneIn::clone_in(it, allocator))
486 }
487 Self::TaggedTemplateExpression(it) => {
488 ArrayExpressionElement::TaggedTemplateExpression(CloneIn::clone_in(it, allocator))
489 }
490 Self::ThisExpression(it) => {
491 ArrayExpressionElement::ThisExpression(CloneIn::clone_in(it, allocator))
492 }
493 Self::UnaryExpression(it) => {
494 ArrayExpressionElement::UnaryExpression(CloneIn::clone_in(it, allocator))
495 }
496 Self::UpdateExpression(it) => {
497 ArrayExpressionElement::UpdateExpression(CloneIn::clone_in(it, allocator))
498 }
499 Self::YieldExpression(it) => {
500 ArrayExpressionElement::YieldExpression(CloneIn::clone_in(it, allocator))
501 }
502 Self::PrivateInExpression(it) => {
503 ArrayExpressionElement::PrivateInExpression(CloneIn::clone_in(it, allocator))
504 }
505 Self::JSXElement(it) => {
506 ArrayExpressionElement::JSXElement(CloneIn::clone_in(it, allocator))
507 }
508 Self::JSXFragment(it) => {
509 ArrayExpressionElement::JSXFragment(CloneIn::clone_in(it, allocator))
510 }
511 Self::TSAsExpression(it) => {
512 ArrayExpressionElement::TSAsExpression(CloneIn::clone_in(it, allocator))
513 }
514 Self::TSSatisfiesExpression(it) => {
515 ArrayExpressionElement::TSSatisfiesExpression(CloneIn::clone_in(it, allocator))
516 }
517 Self::TSTypeAssertion(it) => {
518 ArrayExpressionElement::TSTypeAssertion(CloneIn::clone_in(it, allocator))
519 }
520 Self::TSNonNullExpression(it) => {
521 ArrayExpressionElement::TSNonNullExpression(CloneIn::clone_in(it, allocator))
522 }
523 Self::TSInstantiationExpression(it) => {
524 ArrayExpressionElement::TSInstantiationExpression(CloneIn::clone_in(it, allocator))
525 }
526 Self::V8IntrinsicExpression(it) => {
527 ArrayExpressionElement::V8IntrinsicExpression(CloneIn::clone_in(it, allocator))
528 }
529 Self::ComputedMemberExpression(it) => {
530 ArrayExpressionElement::ComputedMemberExpression(CloneIn::clone_in(it, allocator))
531 }
532 Self::StaticMemberExpression(it) => {
533 ArrayExpressionElement::StaticMemberExpression(CloneIn::clone_in(it, allocator))
534 }
535 Self::PrivateFieldExpression(it) => {
536 ArrayExpressionElement::PrivateFieldExpression(CloneIn::clone_in(it, allocator))
537 }
538 }
539 }
540
541 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
542 match self {
543 Self::SpreadElement(it) => ArrayExpressionElement::SpreadElement(
544 CloneIn::clone_in_with_semantic_ids(it, allocator),
545 ),
546 Self::Elision(it) => {
547 ArrayExpressionElement::Elision(CloneIn::clone_in_with_semantic_ids(it, allocator))
548 }
549 Self::BooleanLiteral(it) => ArrayExpressionElement::BooleanLiteral(
550 CloneIn::clone_in_with_semantic_ids(it, allocator),
551 ),
552 Self::NullLiteral(it) => ArrayExpressionElement::NullLiteral(
553 CloneIn::clone_in_with_semantic_ids(it, allocator),
554 ),
555 Self::NumericLiteral(it) => ArrayExpressionElement::NumericLiteral(
556 CloneIn::clone_in_with_semantic_ids(it, allocator),
557 ),
558 Self::BigIntLiteral(it) => ArrayExpressionElement::BigIntLiteral(
559 CloneIn::clone_in_with_semantic_ids(it, allocator),
560 ),
561 Self::RegExpLiteral(it) => ArrayExpressionElement::RegExpLiteral(
562 CloneIn::clone_in_with_semantic_ids(it, allocator),
563 ),
564 Self::StringLiteral(it) => ArrayExpressionElement::StringLiteral(
565 CloneIn::clone_in_with_semantic_ids(it, allocator),
566 ),
567 Self::TemplateLiteral(it) => ArrayExpressionElement::TemplateLiteral(
568 CloneIn::clone_in_with_semantic_ids(it, allocator),
569 ),
570 Self::Identifier(it) => ArrayExpressionElement::Identifier(
571 CloneIn::clone_in_with_semantic_ids(it, allocator),
572 ),
573 Self::MetaProperty(it) => ArrayExpressionElement::MetaProperty(
574 CloneIn::clone_in_with_semantic_ids(it, allocator),
575 ),
576 Self::Super(it) => {
577 ArrayExpressionElement::Super(CloneIn::clone_in_with_semantic_ids(it, allocator))
578 }
579 Self::ArrayExpression(it) => ArrayExpressionElement::ArrayExpression(
580 CloneIn::clone_in_with_semantic_ids(it, allocator),
581 ),
582 Self::ArrowFunctionExpression(it) => ArrayExpressionElement::ArrowFunctionExpression(
583 CloneIn::clone_in_with_semantic_ids(it, allocator),
584 ),
585 Self::AssignmentExpression(it) => ArrayExpressionElement::AssignmentExpression(
586 CloneIn::clone_in_with_semantic_ids(it, allocator),
587 ),
588 Self::AwaitExpression(it) => ArrayExpressionElement::AwaitExpression(
589 CloneIn::clone_in_with_semantic_ids(it, allocator),
590 ),
591 Self::BinaryExpression(it) => ArrayExpressionElement::BinaryExpression(
592 CloneIn::clone_in_with_semantic_ids(it, allocator),
593 ),
594 Self::CallExpression(it) => ArrayExpressionElement::CallExpression(
595 CloneIn::clone_in_with_semantic_ids(it, allocator),
596 ),
597 Self::ChainExpression(it) => ArrayExpressionElement::ChainExpression(
598 CloneIn::clone_in_with_semantic_ids(it, allocator),
599 ),
600 Self::ClassExpression(it) => ArrayExpressionElement::ClassExpression(
601 CloneIn::clone_in_with_semantic_ids(it, allocator),
602 ),
603 Self::ConditionalExpression(it) => ArrayExpressionElement::ConditionalExpression(
604 CloneIn::clone_in_with_semantic_ids(it, allocator),
605 ),
606 Self::FunctionExpression(it) => ArrayExpressionElement::FunctionExpression(
607 CloneIn::clone_in_with_semantic_ids(it, allocator),
608 ),
609 Self::ImportExpression(it) => ArrayExpressionElement::ImportExpression(
610 CloneIn::clone_in_with_semantic_ids(it, allocator),
611 ),
612 Self::LogicalExpression(it) => ArrayExpressionElement::LogicalExpression(
613 CloneIn::clone_in_with_semantic_ids(it, allocator),
614 ),
615 Self::NewExpression(it) => ArrayExpressionElement::NewExpression(
616 CloneIn::clone_in_with_semantic_ids(it, allocator),
617 ),
618 Self::ObjectExpression(it) => ArrayExpressionElement::ObjectExpression(
619 CloneIn::clone_in_with_semantic_ids(it, allocator),
620 ),
621 Self::ParenthesizedExpression(it) => ArrayExpressionElement::ParenthesizedExpression(
622 CloneIn::clone_in_with_semantic_ids(it, allocator),
623 ),
624 Self::SequenceExpression(it) => ArrayExpressionElement::SequenceExpression(
625 CloneIn::clone_in_with_semantic_ids(it, allocator),
626 ),
627 Self::TaggedTemplateExpression(it) => ArrayExpressionElement::TaggedTemplateExpression(
628 CloneIn::clone_in_with_semantic_ids(it, allocator),
629 ),
630 Self::ThisExpression(it) => ArrayExpressionElement::ThisExpression(
631 CloneIn::clone_in_with_semantic_ids(it, allocator),
632 ),
633 Self::UnaryExpression(it) => ArrayExpressionElement::UnaryExpression(
634 CloneIn::clone_in_with_semantic_ids(it, allocator),
635 ),
636 Self::UpdateExpression(it) => ArrayExpressionElement::UpdateExpression(
637 CloneIn::clone_in_with_semantic_ids(it, allocator),
638 ),
639 Self::YieldExpression(it) => ArrayExpressionElement::YieldExpression(
640 CloneIn::clone_in_with_semantic_ids(it, allocator),
641 ),
642 Self::PrivateInExpression(it) => ArrayExpressionElement::PrivateInExpression(
643 CloneIn::clone_in_with_semantic_ids(it, allocator),
644 ),
645 Self::JSXElement(it) => ArrayExpressionElement::JSXElement(
646 CloneIn::clone_in_with_semantic_ids(it, allocator),
647 ),
648 Self::JSXFragment(it) => ArrayExpressionElement::JSXFragment(
649 CloneIn::clone_in_with_semantic_ids(it, allocator),
650 ),
651 Self::TSAsExpression(it) => ArrayExpressionElement::TSAsExpression(
652 CloneIn::clone_in_with_semantic_ids(it, allocator),
653 ),
654 Self::TSSatisfiesExpression(it) => ArrayExpressionElement::TSSatisfiesExpression(
655 CloneIn::clone_in_with_semantic_ids(it, allocator),
656 ),
657 Self::TSTypeAssertion(it) => ArrayExpressionElement::TSTypeAssertion(
658 CloneIn::clone_in_with_semantic_ids(it, allocator),
659 ),
660 Self::TSNonNullExpression(it) => ArrayExpressionElement::TSNonNullExpression(
661 CloneIn::clone_in_with_semantic_ids(it, allocator),
662 ),
663 Self::TSInstantiationExpression(it) => {
664 ArrayExpressionElement::TSInstantiationExpression(
665 CloneIn::clone_in_with_semantic_ids(it, allocator),
666 )
667 }
668 Self::V8IntrinsicExpression(it) => ArrayExpressionElement::V8IntrinsicExpression(
669 CloneIn::clone_in_with_semantic_ids(it, allocator),
670 ),
671 Self::ComputedMemberExpression(it) => ArrayExpressionElement::ComputedMemberExpression(
672 CloneIn::clone_in_with_semantic_ids(it, allocator),
673 ),
674 Self::StaticMemberExpression(it) => ArrayExpressionElement::StaticMemberExpression(
675 CloneIn::clone_in_with_semantic_ids(it, allocator),
676 ),
677 Self::PrivateFieldExpression(it) => ArrayExpressionElement::PrivateFieldExpression(
678 CloneIn::clone_in_with_semantic_ids(it, allocator),
679 ),
680 }
681 }
682}
683
684impl<'new_alloc> CloneIn<'new_alloc> for Elision {
685 type Cloned = Elision;
686
687 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
688 Elision { span: CloneIn::clone_in(&self.span, allocator) }
689 }
690
691 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
692 Elision { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
693 }
694}
695
696impl<'new_alloc> CloneIn<'new_alloc> for ObjectExpression<'_> {
697 type Cloned = ObjectExpression<'new_alloc>;
698
699 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
700 ObjectExpression {
701 span: CloneIn::clone_in(&self.span, allocator),
702 properties: CloneIn::clone_in(&self.properties, allocator),
703 }
704 }
705
706 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
707 ObjectExpression {
708 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
709 properties: CloneIn::clone_in_with_semantic_ids(&self.properties, allocator),
710 }
711 }
712}
713
714impl<'new_alloc> CloneIn<'new_alloc> for ObjectPropertyKind<'_> {
715 type Cloned = ObjectPropertyKind<'new_alloc>;
716
717 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
718 match self {
719 Self::ObjectProperty(it) => {
720 ObjectPropertyKind::ObjectProperty(CloneIn::clone_in(it, allocator))
721 }
722 Self::SpreadProperty(it) => {
723 ObjectPropertyKind::SpreadProperty(CloneIn::clone_in(it, allocator))
724 }
725 }
726 }
727
728 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
729 match self {
730 Self::ObjectProperty(it) => ObjectPropertyKind::ObjectProperty(
731 CloneIn::clone_in_with_semantic_ids(it, allocator),
732 ),
733 Self::SpreadProperty(it) => ObjectPropertyKind::SpreadProperty(
734 CloneIn::clone_in_with_semantic_ids(it, allocator),
735 ),
736 }
737 }
738}
739
740impl<'new_alloc> CloneIn<'new_alloc> for ObjectProperty<'_> {
741 type Cloned = ObjectProperty<'new_alloc>;
742
743 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
744 ObjectProperty {
745 span: CloneIn::clone_in(&self.span, allocator),
746 kind: CloneIn::clone_in(&self.kind, allocator),
747 key: CloneIn::clone_in(&self.key, allocator),
748 value: CloneIn::clone_in(&self.value, allocator),
749 method: CloneIn::clone_in(&self.method, allocator),
750 shorthand: CloneIn::clone_in(&self.shorthand, allocator),
751 computed: CloneIn::clone_in(&self.computed, allocator),
752 }
753 }
754
755 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
756 ObjectProperty {
757 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
758 kind: CloneIn::clone_in_with_semantic_ids(&self.kind, allocator),
759 key: CloneIn::clone_in_with_semantic_ids(&self.key, allocator),
760 value: CloneIn::clone_in_with_semantic_ids(&self.value, allocator),
761 method: CloneIn::clone_in_with_semantic_ids(&self.method, allocator),
762 shorthand: CloneIn::clone_in_with_semantic_ids(&self.shorthand, allocator),
763 computed: CloneIn::clone_in_with_semantic_ids(&self.computed, allocator),
764 }
765 }
766}
767
768impl<'new_alloc> CloneIn<'new_alloc> for PropertyKey<'_> {
769 type Cloned = PropertyKey<'new_alloc>;
770
771 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
772 match self {
773 Self::StaticIdentifier(it) => {
774 PropertyKey::StaticIdentifier(CloneIn::clone_in(it, allocator))
775 }
776 Self::PrivateIdentifier(it) => {
777 PropertyKey::PrivateIdentifier(CloneIn::clone_in(it, allocator))
778 }
779 Self::BooleanLiteral(it) => {
780 PropertyKey::BooleanLiteral(CloneIn::clone_in(it, allocator))
781 }
782 Self::NullLiteral(it) => PropertyKey::NullLiteral(CloneIn::clone_in(it, allocator)),
783 Self::NumericLiteral(it) => {
784 PropertyKey::NumericLiteral(CloneIn::clone_in(it, allocator))
785 }
786 Self::BigIntLiteral(it) => PropertyKey::BigIntLiteral(CloneIn::clone_in(it, allocator)),
787 Self::RegExpLiteral(it) => PropertyKey::RegExpLiteral(CloneIn::clone_in(it, allocator)),
788 Self::StringLiteral(it) => PropertyKey::StringLiteral(CloneIn::clone_in(it, allocator)),
789 Self::TemplateLiteral(it) => {
790 PropertyKey::TemplateLiteral(CloneIn::clone_in(it, allocator))
791 }
792 Self::Identifier(it) => PropertyKey::Identifier(CloneIn::clone_in(it, allocator)),
793 Self::MetaProperty(it) => PropertyKey::MetaProperty(CloneIn::clone_in(it, allocator)),
794 Self::Super(it) => PropertyKey::Super(CloneIn::clone_in(it, allocator)),
795 Self::ArrayExpression(it) => {
796 PropertyKey::ArrayExpression(CloneIn::clone_in(it, allocator))
797 }
798 Self::ArrowFunctionExpression(it) => {
799 PropertyKey::ArrowFunctionExpression(CloneIn::clone_in(it, allocator))
800 }
801 Self::AssignmentExpression(it) => {
802 PropertyKey::AssignmentExpression(CloneIn::clone_in(it, allocator))
803 }
804 Self::AwaitExpression(it) => {
805 PropertyKey::AwaitExpression(CloneIn::clone_in(it, allocator))
806 }
807 Self::BinaryExpression(it) => {
808 PropertyKey::BinaryExpression(CloneIn::clone_in(it, allocator))
809 }
810 Self::CallExpression(it) => {
811 PropertyKey::CallExpression(CloneIn::clone_in(it, allocator))
812 }
813 Self::ChainExpression(it) => {
814 PropertyKey::ChainExpression(CloneIn::clone_in(it, allocator))
815 }
816 Self::ClassExpression(it) => {
817 PropertyKey::ClassExpression(CloneIn::clone_in(it, allocator))
818 }
819 Self::ConditionalExpression(it) => {
820 PropertyKey::ConditionalExpression(CloneIn::clone_in(it, allocator))
821 }
822 Self::FunctionExpression(it) => {
823 PropertyKey::FunctionExpression(CloneIn::clone_in(it, allocator))
824 }
825 Self::ImportExpression(it) => {
826 PropertyKey::ImportExpression(CloneIn::clone_in(it, allocator))
827 }
828 Self::LogicalExpression(it) => {
829 PropertyKey::LogicalExpression(CloneIn::clone_in(it, allocator))
830 }
831 Self::NewExpression(it) => PropertyKey::NewExpression(CloneIn::clone_in(it, allocator)),
832 Self::ObjectExpression(it) => {
833 PropertyKey::ObjectExpression(CloneIn::clone_in(it, allocator))
834 }
835 Self::ParenthesizedExpression(it) => {
836 PropertyKey::ParenthesizedExpression(CloneIn::clone_in(it, allocator))
837 }
838 Self::SequenceExpression(it) => {
839 PropertyKey::SequenceExpression(CloneIn::clone_in(it, allocator))
840 }
841 Self::TaggedTemplateExpression(it) => {
842 PropertyKey::TaggedTemplateExpression(CloneIn::clone_in(it, allocator))
843 }
844 Self::ThisExpression(it) => {
845 PropertyKey::ThisExpression(CloneIn::clone_in(it, allocator))
846 }
847 Self::UnaryExpression(it) => {
848 PropertyKey::UnaryExpression(CloneIn::clone_in(it, allocator))
849 }
850 Self::UpdateExpression(it) => {
851 PropertyKey::UpdateExpression(CloneIn::clone_in(it, allocator))
852 }
853 Self::YieldExpression(it) => {
854 PropertyKey::YieldExpression(CloneIn::clone_in(it, allocator))
855 }
856 Self::PrivateInExpression(it) => {
857 PropertyKey::PrivateInExpression(CloneIn::clone_in(it, allocator))
858 }
859 Self::JSXElement(it) => PropertyKey::JSXElement(CloneIn::clone_in(it, allocator)),
860 Self::JSXFragment(it) => PropertyKey::JSXFragment(CloneIn::clone_in(it, allocator)),
861 Self::TSAsExpression(it) => {
862 PropertyKey::TSAsExpression(CloneIn::clone_in(it, allocator))
863 }
864 Self::TSSatisfiesExpression(it) => {
865 PropertyKey::TSSatisfiesExpression(CloneIn::clone_in(it, allocator))
866 }
867 Self::TSTypeAssertion(it) => {
868 PropertyKey::TSTypeAssertion(CloneIn::clone_in(it, allocator))
869 }
870 Self::TSNonNullExpression(it) => {
871 PropertyKey::TSNonNullExpression(CloneIn::clone_in(it, allocator))
872 }
873 Self::TSInstantiationExpression(it) => {
874 PropertyKey::TSInstantiationExpression(CloneIn::clone_in(it, allocator))
875 }
876 Self::V8IntrinsicExpression(it) => {
877 PropertyKey::V8IntrinsicExpression(CloneIn::clone_in(it, allocator))
878 }
879 Self::ComputedMemberExpression(it) => {
880 PropertyKey::ComputedMemberExpression(CloneIn::clone_in(it, allocator))
881 }
882 Self::StaticMemberExpression(it) => {
883 PropertyKey::StaticMemberExpression(CloneIn::clone_in(it, allocator))
884 }
885 Self::PrivateFieldExpression(it) => {
886 PropertyKey::PrivateFieldExpression(CloneIn::clone_in(it, allocator))
887 }
888 }
889 }
890
891 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
892 match self {
893 Self::StaticIdentifier(it) => {
894 PropertyKey::StaticIdentifier(CloneIn::clone_in_with_semantic_ids(it, allocator))
895 }
896 Self::PrivateIdentifier(it) => {
897 PropertyKey::PrivateIdentifier(CloneIn::clone_in_with_semantic_ids(it, allocator))
898 }
899 Self::BooleanLiteral(it) => {
900 PropertyKey::BooleanLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
901 }
902 Self::NullLiteral(it) => {
903 PropertyKey::NullLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
904 }
905 Self::NumericLiteral(it) => {
906 PropertyKey::NumericLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
907 }
908 Self::BigIntLiteral(it) => {
909 PropertyKey::BigIntLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
910 }
911 Self::RegExpLiteral(it) => {
912 PropertyKey::RegExpLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
913 }
914 Self::StringLiteral(it) => {
915 PropertyKey::StringLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
916 }
917 Self::TemplateLiteral(it) => {
918 PropertyKey::TemplateLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
919 }
920 Self::Identifier(it) => {
921 PropertyKey::Identifier(CloneIn::clone_in_with_semantic_ids(it, allocator))
922 }
923 Self::MetaProperty(it) => {
924 PropertyKey::MetaProperty(CloneIn::clone_in_with_semantic_ids(it, allocator))
925 }
926 Self::Super(it) => {
927 PropertyKey::Super(CloneIn::clone_in_with_semantic_ids(it, allocator))
928 }
929 Self::ArrayExpression(it) => {
930 PropertyKey::ArrayExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
931 }
932 Self::ArrowFunctionExpression(it) => PropertyKey::ArrowFunctionExpression(
933 CloneIn::clone_in_with_semantic_ids(it, allocator),
934 ),
935 Self::AssignmentExpression(it) => PropertyKey::AssignmentExpression(
936 CloneIn::clone_in_with_semantic_ids(it, allocator),
937 ),
938 Self::AwaitExpression(it) => {
939 PropertyKey::AwaitExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
940 }
941 Self::BinaryExpression(it) => {
942 PropertyKey::BinaryExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
943 }
944 Self::CallExpression(it) => {
945 PropertyKey::CallExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
946 }
947 Self::ChainExpression(it) => {
948 PropertyKey::ChainExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
949 }
950 Self::ClassExpression(it) => {
951 PropertyKey::ClassExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
952 }
953 Self::ConditionalExpression(it) => PropertyKey::ConditionalExpression(
954 CloneIn::clone_in_with_semantic_ids(it, allocator),
955 ),
956 Self::FunctionExpression(it) => {
957 PropertyKey::FunctionExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
958 }
959 Self::ImportExpression(it) => {
960 PropertyKey::ImportExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
961 }
962 Self::LogicalExpression(it) => {
963 PropertyKey::LogicalExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
964 }
965 Self::NewExpression(it) => {
966 PropertyKey::NewExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
967 }
968 Self::ObjectExpression(it) => {
969 PropertyKey::ObjectExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
970 }
971 Self::ParenthesizedExpression(it) => PropertyKey::ParenthesizedExpression(
972 CloneIn::clone_in_with_semantic_ids(it, allocator),
973 ),
974 Self::SequenceExpression(it) => {
975 PropertyKey::SequenceExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
976 }
977 Self::TaggedTemplateExpression(it) => PropertyKey::TaggedTemplateExpression(
978 CloneIn::clone_in_with_semantic_ids(it, allocator),
979 ),
980 Self::ThisExpression(it) => {
981 PropertyKey::ThisExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
982 }
983 Self::UnaryExpression(it) => {
984 PropertyKey::UnaryExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
985 }
986 Self::UpdateExpression(it) => {
987 PropertyKey::UpdateExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
988 }
989 Self::YieldExpression(it) => {
990 PropertyKey::YieldExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
991 }
992 Self::PrivateInExpression(it) => {
993 PropertyKey::PrivateInExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
994 }
995 Self::JSXElement(it) => {
996 PropertyKey::JSXElement(CloneIn::clone_in_with_semantic_ids(it, allocator))
997 }
998 Self::JSXFragment(it) => {
999 PropertyKey::JSXFragment(CloneIn::clone_in_with_semantic_ids(it, allocator))
1000 }
1001 Self::TSAsExpression(it) => {
1002 PropertyKey::TSAsExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1003 }
1004 Self::TSSatisfiesExpression(it) => PropertyKey::TSSatisfiesExpression(
1005 CloneIn::clone_in_with_semantic_ids(it, allocator),
1006 ),
1007 Self::TSTypeAssertion(it) => {
1008 PropertyKey::TSTypeAssertion(CloneIn::clone_in_with_semantic_ids(it, allocator))
1009 }
1010 Self::TSNonNullExpression(it) => {
1011 PropertyKey::TSNonNullExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1012 }
1013 Self::TSInstantiationExpression(it) => PropertyKey::TSInstantiationExpression(
1014 CloneIn::clone_in_with_semantic_ids(it, allocator),
1015 ),
1016 Self::V8IntrinsicExpression(it) => PropertyKey::V8IntrinsicExpression(
1017 CloneIn::clone_in_with_semantic_ids(it, allocator),
1018 ),
1019 Self::ComputedMemberExpression(it) => PropertyKey::ComputedMemberExpression(
1020 CloneIn::clone_in_with_semantic_ids(it, allocator),
1021 ),
1022 Self::StaticMemberExpression(it) => PropertyKey::StaticMemberExpression(
1023 CloneIn::clone_in_with_semantic_ids(it, allocator),
1024 ),
1025 Self::PrivateFieldExpression(it) => PropertyKey::PrivateFieldExpression(
1026 CloneIn::clone_in_with_semantic_ids(it, allocator),
1027 ),
1028 }
1029 }
1030}
1031
1032impl<'new_alloc> CloneIn<'new_alloc> for PropertyKind {
1033 type Cloned = PropertyKind;
1034
1035 #[inline(always)]
1036 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1037 *self
1038 }
1039
1040 #[inline(always)]
1041 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1042 *self
1043 }
1044}
1045
1046impl<'new_alloc> CloneIn<'new_alloc> for TemplateLiteral<'_> {
1047 type Cloned = TemplateLiteral<'new_alloc>;
1048
1049 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1050 TemplateLiteral {
1051 span: CloneIn::clone_in(&self.span, allocator),
1052 quasis: CloneIn::clone_in(&self.quasis, allocator),
1053 expressions: CloneIn::clone_in(&self.expressions, allocator),
1054 }
1055 }
1056
1057 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1058 TemplateLiteral {
1059 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
1060 quasis: CloneIn::clone_in_with_semantic_ids(&self.quasis, allocator),
1061 expressions: CloneIn::clone_in_with_semantic_ids(&self.expressions, allocator),
1062 }
1063 }
1064}
1065
1066impl<'new_alloc> CloneIn<'new_alloc> for TaggedTemplateExpression<'_> {
1067 type Cloned = TaggedTemplateExpression<'new_alloc>;
1068
1069 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1070 TaggedTemplateExpression {
1071 span: CloneIn::clone_in(&self.span, allocator),
1072 tag: CloneIn::clone_in(&self.tag, allocator),
1073 type_arguments: CloneIn::clone_in(&self.type_arguments, allocator),
1074 quasi: CloneIn::clone_in(&self.quasi, allocator),
1075 }
1076 }
1077
1078 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1079 TaggedTemplateExpression {
1080 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
1081 tag: CloneIn::clone_in_with_semantic_ids(&self.tag, allocator),
1082 type_arguments: CloneIn::clone_in_with_semantic_ids(&self.type_arguments, allocator),
1083 quasi: CloneIn::clone_in_with_semantic_ids(&self.quasi, allocator),
1084 }
1085 }
1086}
1087
1088impl<'new_alloc> CloneIn<'new_alloc> for TemplateElement<'_> {
1089 type Cloned = TemplateElement<'new_alloc>;
1090
1091 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1092 TemplateElement {
1093 span: CloneIn::clone_in(&self.span, allocator),
1094 value: CloneIn::clone_in(&self.value, allocator),
1095 tail: CloneIn::clone_in(&self.tail, allocator),
1096 lone_surrogates: CloneIn::clone_in(&self.lone_surrogates, allocator),
1097 }
1098 }
1099
1100 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1101 TemplateElement {
1102 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
1103 value: CloneIn::clone_in_with_semantic_ids(&self.value, allocator),
1104 tail: CloneIn::clone_in_with_semantic_ids(&self.tail, allocator),
1105 lone_surrogates: CloneIn::clone_in_with_semantic_ids(&self.lone_surrogates, allocator),
1106 }
1107 }
1108}
1109
1110impl<'new_alloc> CloneIn<'new_alloc> for TemplateElementValue<'_> {
1111 type Cloned = TemplateElementValue<'new_alloc>;
1112
1113 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1114 TemplateElementValue {
1115 raw: CloneIn::clone_in(&self.raw, allocator),
1116 cooked: CloneIn::clone_in(&self.cooked, allocator),
1117 }
1118 }
1119
1120 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1121 TemplateElementValue {
1122 raw: CloneIn::clone_in_with_semantic_ids(&self.raw, allocator),
1123 cooked: CloneIn::clone_in_with_semantic_ids(&self.cooked, allocator),
1124 }
1125 }
1126}
1127
1128impl<'new_alloc> CloneIn<'new_alloc> for MemberExpression<'_> {
1129 type Cloned = MemberExpression<'new_alloc>;
1130
1131 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1132 match self {
1133 Self::ComputedMemberExpression(it) => {
1134 MemberExpression::ComputedMemberExpression(CloneIn::clone_in(it, allocator))
1135 }
1136 Self::StaticMemberExpression(it) => {
1137 MemberExpression::StaticMemberExpression(CloneIn::clone_in(it, allocator))
1138 }
1139 Self::PrivateFieldExpression(it) => {
1140 MemberExpression::PrivateFieldExpression(CloneIn::clone_in(it, allocator))
1141 }
1142 }
1143 }
1144
1145 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1146 match self {
1147 Self::ComputedMemberExpression(it) => MemberExpression::ComputedMemberExpression(
1148 CloneIn::clone_in_with_semantic_ids(it, allocator),
1149 ),
1150 Self::StaticMemberExpression(it) => MemberExpression::StaticMemberExpression(
1151 CloneIn::clone_in_with_semantic_ids(it, allocator),
1152 ),
1153 Self::PrivateFieldExpression(it) => MemberExpression::PrivateFieldExpression(
1154 CloneIn::clone_in_with_semantic_ids(it, allocator),
1155 ),
1156 }
1157 }
1158}
1159
1160impl<'new_alloc> CloneIn<'new_alloc> for ComputedMemberExpression<'_> {
1161 type Cloned = ComputedMemberExpression<'new_alloc>;
1162
1163 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1164 ComputedMemberExpression {
1165 span: CloneIn::clone_in(&self.span, allocator),
1166 object: CloneIn::clone_in(&self.object, allocator),
1167 expression: CloneIn::clone_in(&self.expression, allocator),
1168 optional: CloneIn::clone_in(&self.optional, allocator),
1169 }
1170 }
1171
1172 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1173 ComputedMemberExpression {
1174 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
1175 object: CloneIn::clone_in_with_semantic_ids(&self.object, allocator),
1176 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
1177 optional: CloneIn::clone_in_with_semantic_ids(&self.optional, allocator),
1178 }
1179 }
1180}
1181
1182impl<'new_alloc> CloneIn<'new_alloc> for StaticMemberExpression<'_> {
1183 type Cloned = StaticMemberExpression<'new_alloc>;
1184
1185 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1186 StaticMemberExpression {
1187 span: CloneIn::clone_in(&self.span, allocator),
1188 object: CloneIn::clone_in(&self.object, allocator),
1189 property: CloneIn::clone_in(&self.property, allocator),
1190 optional: CloneIn::clone_in(&self.optional, allocator),
1191 }
1192 }
1193
1194 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1195 StaticMemberExpression {
1196 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
1197 object: CloneIn::clone_in_with_semantic_ids(&self.object, allocator),
1198 property: CloneIn::clone_in_with_semantic_ids(&self.property, allocator),
1199 optional: CloneIn::clone_in_with_semantic_ids(&self.optional, allocator),
1200 }
1201 }
1202}
1203
1204impl<'new_alloc> CloneIn<'new_alloc> for PrivateFieldExpression<'_> {
1205 type Cloned = PrivateFieldExpression<'new_alloc>;
1206
1207 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1208 PrivateFieldExpression {
1209 span: CloneIn::clone_in(&self.span, allocator),
1210 object: CloneIn::clone_in(&self.object, allocator),
1211 field: CloneIn::clone_in(&self.field, allocator),
1212 optional: CloneIn::clone_in(&self.optional, allocator),
1213 }
1214 }
1215
1216 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1217 PrivateFieldExpression {
1218 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
1219 object: CloneIn::clone_in_with_semantic_ids(&self.object, allocator),
1220 field: CloneIn::clone_in_with_semantic_ids(&self.field, allocator),
1221 optional: CloneIn::clone_in_with_semantic_ids(&self.optional, allocator),
1222 }
1223 }
1224}
1225
1226impl<'new_alloc> CloneIn<'new_alloc> for CallExpression<'_> {
1227 type Cloned = CallExpression<'new_alloc>;
1228
1229 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1230 CallExpression {
1231 span: CloneIn::clone_in(&self.span, allocator),
1232 callee: CloneIn::clone_in(&self.callee, allocator),
1233 type_arguments: CloneIn::clone_in(&self.type_arguments, allocator),
1234 arguments: CloneIn::clone_in(&self.arguments, allocator),
1235 optional: CloneIn::clone_in(&self.optional, allocator),
1236 pure: CloneIn::clone_in(&self.pure, allocator),
1237 }
1238 }
1239
1240 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1241 CallExpression {
1242 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
1243 callee: CloneIn::clone_in_with_semantic_ids(&self.callee, allocator),
1244 type_arguments: CloneIn::clone_in_with_semantic_ids(&self.type_arguments, allocator),
1245 arguments: CloneIn::clone_in_with_semantic_ids(&self.arguments, allocator),
1246 optional: CloneIn::clone_in_with_semantic_ids(&self.optional, allocator),
1247 pure: CloneIn::clone_in_with_semantic_ids(&self.pure, allocator),
1248 }
1249 }
1250}
1251
1252impl<'new_alloc> CloneIn<'new_alloc> for NewExpression<'_> {
1253 type Cloned = NewExpression<'new_alloc>;
1254
1255 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1256 NewExpression {
1257 span: CloneIn::clone_in(&self.span, allocator),
1258 callee: CloneIn::clone_in(&self.callee, allocator),
1259 type_arguments: CloneIn::clone_in(&self.type_arguments, allocator),
1260 arguments: CloneIn::clone_in(&self.arguments, allocator),
1261 pure: CloneIn::clone_in(&self.pure, allocator),
1262 }
1263 }
1264
1265 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1266 NewExpression {
1267 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
1268 callee: CloneIn::clone_in_with_semantic_ids(&self.callee, allocator),
1269 type_arguments: CloneIn::clone_in_with_semantic_ids(&self.type_arguments, allocator),
1270 arguments: CloneIn::clone_in_with_semantic_ids(&self.arguments, allocator),
1271 pure: CloneIn::clone_in_with_semantic_ids(&self.pure, allocator),
1272 }
1273 }
1274}
1275
1276impl<'new_alloc> CloneIn<'new_alloc> for MetaProperty<'_> {
1277 type Cloned = MetaProperty<'new_alloc>;
1278
1279 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1280 MetaProperty {
1281 span: CloneIn::clone_in(&self.span, allocator),
1282 meta: CloneIn::clone_in(&self.meta, allocator),
1283 property: CloneIn::clone_in(&self.property, allocator),
1284 }
1285 }
1286
1287 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1288 MetaProperty {
1289 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
1290 meta: CloneIn::clone_in_with_semantic_ids(&self.meta, allocator),
1291 property: CloneIn::clone_in_with_semantic_ids(&self.property, allocator),
1292 }
1293 }
1294}
1295
1296impl<'new_alloc> CloneIn<'new_alloc> for SpreadElement<'_> {
1297 type Cloned = SpreadElement<'new_alloc>;
1298
1299 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1300 SpreadElement {
1301 span: CloneIn::clone_in(&self.span, allocator),
1302 argument: CloneIn::clone_in(&self.argument, allocator),
1303 }
1304 }
1305
1306 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1307 SpreadElement {
1308 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
1309 argument: CloneIn::clone_in_with_semantic_ids(&self.argument, allocator),
1310 }
1311 }
1312}
1313
1314impl<'new_alloc> CloneIn<'new_alloc> for Argument<'_> {
1315 type Cloned = Argument<'new_alloc>;
1316
1317 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1318 match self {
1319 Self::SpreadElement(it) => Argument::SpreadElement(CloneIn::clone_in(it, allocator)),
1320 Self::BooleanLiteral(it) => Argument::BooleanLiteral(CloneIn::clone_in(it, allocator)),
1321 Self::NullLiteral(it) => Argument::NullLiteral(CloneIn::clone_in(it, allocator)),
1322 Self::NumericLiteral(it) => Argument::NumericLiteral(CloneIn::clone_in(it, allocator)),
1323 Self::BigIntLiteral(it) => Argument::BigIntLiteral(CloneIn::clone_in(it, allocator)),
1324 Self::RegExpLiteral(it) => Argument::RegExpLiteral(CloneIn::clone_in(it, allocator)),
1325 Self::StringLiteral(it) => Argument::StringLiteral(CloneIn::clone_in(it, allocator)),
1326 Self::TemplateLiteral(it) => {
1327 Argument::TemplateLiteral(CloneIn::clone_in(it, allocator))
1328 }
1329 Self::Identifier(it) => Argument::Identifier(CloneIn::clone_in(it, allocator)),
1330 Self::MetaProperty(it) => Argument::MetaProperty(CloneIn::clone_in(it, allocator)),
1331 Self::Super(it) => Argument::Super(CloneIn::clone_in(it, allocator)),
1332 Self::ArrayExpression(it) => {
1333 Argument::ArrayExpression(CloneIn::clone_in(it, allocator))
1334 }
1335 Self::ArrowFunctionExpression(it) => {
1336 Argument::ArrowFunctionExpression(CloneIn::clone_in(it, allocator))
1337 }
1338 Self::AssignmentExpression(it) => {
1339 Argument::AssignmentExpression(CloneIn::clone_in(it, allocator))
1340 }
1341 Self::AwaitExpression(it) => {
1342 Argument::AwaitExpression(CloneIn::clone_in(it, allocator))
1343 }
1344 Self::BinaryExpression(it) => {
1345 Argument::BinaryExpression(CloneIn::clone_in(it, allocator))
1346 }
1347 Self::CallExpression(it) => Argument::CallExpression(CloneIn::clone_in(it, allocator)),
1348 Self::ChainExpression(it) => {
1349 Argument::ChainExpression(CloneIn::clone_in(it, allocator))
1350 }
1351 Self::ClassExpression(it) => {
1352 Argument::ClassExpression(CloneIn::clone_in(it, allocator))
1353 }
1354 Self::ConditionalExpression(it) => {
1355 Argument::ConditionalExpression(CloneIn::clone_in(it, allocator))
1356 }
1357 Self::FunctionExpression(it) => {
1358 Argument::FunctionExpression(CloneIn::clone_in(it, allocator))
1359 }
1360 Self::ImportExpression(it) => {
1361 Argument::ImportExpression(CloneIn::clone_in(it, allocator))
1362 }
1363 Self::LogicalExpression(it) => {
1364 Argument::LogicalExpression(CloneIn::clone_in(it, allocator))
1365 }
1366 Self::NewExpression(it) => Argument::NewExpression(CloneIn::clone_in(it, allocator)),
1367 Self::ObjectExpression(it) => {
1368 Argument::ObjectExpression(CloneIn::clone_in(it, allocator))
1369 }
1370 Self::ParenthesizedExpression(it) => {
1371 Argument::ParenthesizedExpression(CloneIn::clone_in(it, allocator))
1372 }
1373 Self::SequenceExpression(it) => {
1374 Argument::SequenceExpression(CloneIn::clone_in(it, allocator))
1375 }
1376 Self::TaggedTemplateExpression(it) => {
1377 Argument::TaggedTemplateExpression(CloneIn::clone_in(it, allocator))
1378 }
1379 Self::ThisExpression(it) => Argument::ThisExpression(CloneIn::clone_in(it, allocator)),
1380 Self::UnaryExpression(it) => {
1381 Argument::UnaryExpression(CloneIn::clone_in(it, allocator))
1382 }
1383 Self::UpdateExpression(it) => {
1384 Argument::UpdateExpression(CloneIn::clone_in(it, allocator))
1385 }
1386 Self::YieldExpression(it) => {
1387 Argument::YieldExpression(CloneIn::clone_in(it, allocator))
1388 }
1389 Self::PrivateInExpression(it) => {
1390 Argument::PrivateInExpression(CloneIn::clone_in(it, allocator))
1391 }
1392 Self::JSXElement(it) => Argument::JSXElement(CloneIn::clone_in(it, allocator)),
1393 Self::JSXFragment(it) => Argument::JSXFragment(CloneIn::clone_in(it, allocator)),
1394 Self::TSAsExpression(it) => Argument::TSAsExpression(CloneIn::clone_in(it, allocator)),
1395 Self::TSSatisfiesExpression(it) => {
1396 Argument::TSSatisfiesExpression(CloneIn::clone_in(it, allocator))
1397 }
1398 Self::TSTypeAssertion(it) => {
1399 Argument::TSTypeAssertion(CloneIn::clone_in(it, allocator))
1400 }
1401 Self::TSNonNullExpression(it) => {
1402 Argument::TSNonNullExpression(CloneIn::clone_in(it, allocator))
1403 }
1404 Self::TSInstantiationExpression(it) => {
1405 Argument::TSInstantiationExpression(CloneIn::clone_in(it, allocator))
1406 }
1407 Self::V8IntrinsicExpression(it) => {
1408 Argument::V8IntrinsicExpression(CloneIn::clone_in(it, allocator))
1409 }
1410 Self::ComputedMemberExpression(it) => {
1411 Argument::ComputedMemberExpression(CloneIn::clone_in(it, allocator))
1412 }
1413 Self::StaticMemberExpression(it) => {
1414 Argument::StaticMemberExpression(CloneIn::clone_in(it, allocator))
1415 }
1416 Self::PrivateFieldExpression(it) => {
1417 Argument::PrivateFieldExpression(CloneIn::clone_in(it, allocator))
1418 }
1419 }
1420 }
1421
1422 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1423 match self {
1424 Self::SpreadElement(it) => {
1425 Argument::SpreadElement(CloneIn::clone_in_with_semantic_ids(it, allocator))
1426 }
1427 Self::BooleanLiteral(it) => {
1428 Argument::BooleanLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
1429 }
1430 Self::NullLiteral(it) => {
1431 Argument::NullLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
1432 }
1433 Self::NumericLiteral(it) => {
1434 Argument::NumericLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
1435 }
1436 Self::BigIntLiteral(it) => {
1437 Argument::BigIntLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
1438 }
1439 Self::RegExpLiteral(it) => {
1440 Argument::RegExpLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
1441 }
1442 Self::StringLiteral(it) => {
1443 Argument::StringLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
1444 }
1445 Self::TemplateLiteral(it) => {
1446 Argument::TemplateLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
1447 }
1448 Self::Identifier(it) => {
1449 Argument::Identifier(CloneIn::clone_in_with_semantic_ids(it, allocator))
1450 }
1451 Self::MetaProperty(it) => {
1452 Argument::MetaProperty(CloneIn::clone_in_with_semantic_ids(it, allocator))
1453 }
1454 Self::Super(it) => Argument::Super(CloneIn::clone_in_with_semantic_ids(it, allocator)),
1455 Self::ArrayExpression(it) => {
1456 Argument::ArrayExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1457 }
1458 Self::ArrowFunctionExpression(it) => Argument::ArrowFunctionExpression(
1459 CloneIn::clone_in_with_semantic_ids(it, allocator),
1460 ),
1461 Self::AssignmentExpression(it) => {
1462 Argument::AssignmentExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1463 }
1464 Self::AwaitExpression(it) => {
1465 Argument::AwaitExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1466 }
1467 Self::BinaryExpression(it) => {
1468 Argument::BinaryExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1469 }
1470 Self::CallExpression(it) => {
1471 Argument::CallExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1472 }
1473 Self::ChainExpression(it) => {
1474 Argument::ChainExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1475 }
1476 Self::ClassExpression(it) => {
1477 Argument::ClassExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1478 }
1479 Self::ConditionalExpression(it) => {
1480 Argument::ConditionalExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1481 }
1482 Self::FunctionExpression(it) => {
1483 Argument::FunctionExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1484 }
1485 Self::ImportExpression(it) => {
1486 Argument::ImportExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1487 }
1488 Self::LogicalExpression(it) => {
1489 Argument::LogicalExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1490 }
1491 Self::NewExpression(it) => {
1492 Argument::NewExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1493 }
1494 Self::ObjectExpression(it) => {
1495 Argument::ObjectExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1496 }
1497 Self::ParenthesizedExpression(it) => Argument::ParenthesizedExpression(
1498 CloneIn::clone_in_with_semantic_ids(it, allocator),
1499 ),
1500 Self::SequenceExpression(it) => {
1501 Argument::SequenceExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1502 }
1503 Self::TaggedTemplateExpression(it) => Argument::TaggedTemplateExpression(
1504 CloneIn::clone_in_with_semantic_ids(it, allocator),
1505 ),
1506 Self::ThisExpression(it) => {
1507 Argument::ThisExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1508 }
1509 Self::UnaryExpression(it) => {
1510 Argument::UnaryExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1511 }
1512 Self::UpdateExpression(it) => {
1513 Argument::UpdateExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1514 }
1515 Self::YieldExpression(it) => {
1516 Argument::YieldExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1517 }
1518 Self::PrivateInExpression(it) => {
1519 Argument::PrivateInExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1520 }
1521 Self::JSXElement(it) => {
1522 Argument::JSXElement(CloneIn::clone_in_with_semantic_ids(it, allocator))
1523 }
1524 Self::JSXFragment(it) => {
1525 Argument::JSXFragment(CloneIn::clone_in_with_semantic_ids(it, allocator))
1526 }
1527 Self::TSAsExpression(it) => {
1528 Argument::TSAsExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1529 }
1530 Self::TSSatisfiesExpression(it) => {
1531 Argument::TSSatisfiesExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1532 }
1533 Self::TSTypeAssertion(it) => {
1534 Argument::TSTypeAssertion(CloneIn::clone_in_with_semantic_ids(it, allocator))
1535 }
1536 Self::TSNonNullExpression(it) => {
1537 Argument::TSNonNullExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1538 }
1539 Self::TSInstantiationExpression(it) => Argument::TSInstantiationExpression(
1540 CloneIn::clone_in_with_semantic_ids(it, allocator),
1541 ),
1542 Self::V8IntrinsicExpression(it) => {
1543 Argument::V8IntrinsicExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1544 }
1545 Self::ComputedMemberExpression(it) => Argument::ComputedMemberExpression(
1546 CloneIn::clone_in_with_semantic_ids(it, allocator),
1547 ),
1548 Self::StaticMemberExpression(it) => {
1549 Argument::StaticMemberExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1550 }
1551 Self::PrivateFieldExpression(it) => {
1552 Argument::PrivateFieldExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1553 }
1554 }
1555 }
1556}
1557
1558impl<'new_alloc> CloneIn<'new_alloc> for UpdateExpression<'_> {
1559 type Cloned = UpdateExpression<'new_alloc>;
1560
1561 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1562 UpdateExpression {
1563 span: CloneIn::clone_in(&self.span, allocator),
1564 operator: CloneIn::clone_in(&self.operator, allocator),
1565 prefix: CloneIn::clone_in(&self.prefix, allocator),
1566 argument: CloneIn::clone_in(&self.argument, allocator),
1567 }
1568 }
1569
1570 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1571 UpdateExpression {
1572 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
1573 operator: CloneIn::clone_in_with_semantic_ids(&self.operator, allocator),
1574 prefix: CloneIn::clone_in_with_semantic_ids(&self.prefix, allocator),
1575 argument: CloneIn::clone_in_with_semantic_ids(&self.argument, allocator),
1576 }
1577 }
1578}
1579
1580impl<'new_alloc> CloneIn<'new_alloc> for UnaryExpression<'_> {
1581 type Cloned = UnaryExpression<'new_alloc>;
1582
1583 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1584 UnaryExpression {
1585 span: CloneIn::clone_in(&self.span, allocator),
1586 operator: CloneIn::clone_in(&self.operator, allocator),
1587 argument: CloneIn::clone_in(&self.argument, allocator),
1588 }
1589 }
1590
1591 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1592 UnaryExpression {
1593 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
1594 operator: CloneIn::clone_in_with_semantic_ids(&self.operator, allocator),
1595 argument: CloneIn::clone_in_with_semantic_ids(&self.argument, allocator),
1596 }
1597 }
1598}
1599
1600impl<'new_alloc> CloneIn<'new_alloc> for BinaryExpression<'_> {
1601 type Cloned = BinaryExpression<'new_alloc>;
1602
1603 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1604 BinaryExpression {
1605 span: CloneIn::clone_in(&self.span, allocator),
1606 left: CloneIn::clone_in(&self.left, allocator),
1607 operator: CloneIn::clone_in(&self.operator, allocator),
1608 right: CloneIn::clone_in(&self.right, allocator),
1609 }
1610 }
1611
1612 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1613 BinaryExpression {
1614 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
1615 left: CloneIn::clone_in_with_semantic_ids(&self.left, allocator),
1616 operator: CloneIn::clone_in_with_semantic_ids(&self.operator, allocator),
1617 right: CloneIn::clone_in_with_semantic_ids(&self.right, allocator),
1618 }
1619 }
1620}
1621
1622impl<'new_alloc> CloneIn<'new_alloc> for PrivateInExpression<'_> {
1623 type Cloned = PrivateInExpression<'new_alloc>;
1624
1625 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1626 PrivateInExpression {
1627 span: CloneIn::clone_in(&self.span, allocator),
1628 left: CloneIn::clone_in(&self.left, allocator),
1629 right: CloneIn::clone_in(&self.right, allocator),
1630 }
1631 }
1632
1633 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1634 PrivateInExpression {
1635 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
1636 left: CloneIn::clone_in_with_semantic_ids(&self.left, allocator),
1637 right: CloneIn::clone_in_with_semantic_ids(&self.right, allocator),
1638 }
1639 }
1640}
1641
1642impl<'new_alloc> CloneIn<'new_alloc> for LogicalExpression<'_> {
1643 type Cloned = LogicalExpression<'new_alloc>;
1644
1645 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1646 LogicalExpression {
1647 span: CloneIn::clone_in(&self.span, allocator),
1648 left: CloneIn::clone_in(&self.left, allocator),
1649 operator: CloneIn::clone_in(&self.operator, allocator),
1650 right: CloneIn::clone_in(&self.right, allocator),
1651 }
1652 }
1653
1654 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1655 LogicalExpression {
1656 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
1657 left: CloneIn::clone_in_with_semantic_ids(&self.left, allocator),
1658 operator: CloneIn::clone_in_with_semantic_ids(&self.operator, allocator),
1659 right: CloneIn::clone_in_with_semantic_ids(&self.right, allocator),
1660 }
1661 }
1662}
1663
1664impl<'new_alloc> CloneIn<'new_alloc> for ConditionalExpression<'_> {
1665 type Cloned = ConditionalExpression<'new_alloc>;
1666
1667 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1668 ConditionalExpression {
1669 span: CloneIn::clone_in(&self.span, allocator),
1670 test: CloneIn::clone_in(&self.test, allocator),
1671 consequent: CloneIn::clone_in(&self.consequent, allocator),
1672 alternate: CloneIn::clone_in(&self.alternate, allocator),
1673 }
1674 }
1675
1676 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1677 ConditionalExpression {
1678 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
1679 test: CloneIn::clone_in_with_semantic_ids(&self.test, allocator),
1680 consequent: CloneIn::clone_in_with_semantic_ids(&self.consequent, allocator),
1681 alternate: CloneIn::clone_in_with_semantic_ids(&self.alternate, allocator),
1682 }
1683 }
1684}
1685
1686impl<'new_alloc> CloneIn<'new_alloc> for AssignmentExpression<'_> {
1687 type Cloned = AssignmentExpression<'new_alloc>;
1688
1689 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1690 AssignmentExpression {
1691 span: CloneIn::clone_in(&self.span, allocator),
1692 operator: CloneIn::clone_in(&self.operator, allocator),
1693 left: CloneIn::clone_in(&self.left, allocator),
1694 right: CloneIn::clone_in(&self.right, allocator),
1695 }
1696 }
1697
1698 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1699 AssignmentExpression {
1700 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
1701 operator: CloneIn::clone_in_with_semantic_ids(&self.operator, allocator),
1702 left: CloneIn::clone_in_with_semantic_ids(&self.left, allocator),
1703 right: CloneIn::clone_in_with_semantic_ids(&self.right, allocator),
1704 }
1705 }
1706}
1707
1708impl<'new_alloc> CloneIn<'new_alloc> for AssignmentTarget<'_> {
1709 type Cloned = AssignmentTarget<'new_alloc>;
1710
1711 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1712 match self {
1713 Self::AssignmentTargetIdentifier(it) => {
1714 AssignmentTarget::AssignmentTargetIdentifier(CloneIn::clone_in(it, allocator))
1715 }
1716 Self::TSAsExpression(it) => {
1717 AssignmentTarget::TSAsExpression(CloneIn::clone_in(it, allocator))
1718 }
1719 Self::TSSatisfiesExpression(it) => {
1720 AssignmentTarget::TSSatisfiesExpression(CloneIn::clone_in(it, allocator))
1721 }
1722 Self::TSNonNullExpression(it) => {
1723 AssignmentTarget::TSNonNullExpression(CloneIn::clone_in(it, allocator))
1724 }
1725 Self::TSTypeAssertion(it) => {
1726 AssignmentTarget::TSTypeAssertion(CloneIn::clone_in(it, allocator))
1727 }
1728 Self::ComputedMemberExpression(it) => {
1729 AssignmentTarget::ComputedMemberExpression(CloneIn::clone_in(it, allocator))
1730 }
1731 Self::StaticMemberExpression(it) => {
1732 AssignmentTarget::StaticMemberExpression(CloneIn::clone_in(it, allocator))
1733 }
1734 Self::PrivateFieldExpression(it) => {
1735 AssignmentTarget::PrivateFieldExpression(CloneIn::clone_in(it, allocator))
1736 }
1737 Self::ArrayAssignmentTarget(it) => {
1738 AssignmentTarget::ArrayAssignmentTarget(CloneIn::clone_in(it, allocator))
1739 }
1740 Self::ObjectAssignmentTarget(it) => {
1741 AssignmentTarget::ObjectAssignmentTarget(CloneIn::clone_in(it, allocator))
1742 }
1743 }
1744 }
1745
1746 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1747 match self {
1748 Self::AssignmentTargetIdentifier(it) => AssignmentTarget::AssignmentTargetIdentifier(
1749 CloneIn::clone_in_with_semantic_ids(it, allocator),
1750 ),
1751 Self::TSAsExpression(it) => {
1752 AssignmentTarget::TSAsExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
1753 }
1754 Self::TSSatisfiesExpression(it) => AssignmentTarget::TSSatisfiesExpression(
1755 CloneIn::clone_in_with_semantic_ids(it, allocator),
1756 ),
1757 Self::TSNonNullExpression(it) => AssignmentTarget::TSNonNullExpression(
1758 CloneIn::clone_in_with_semantic_ids(it, allocator),
1759 ),
1760 Self::TSTypeAssertion(it) => AssignmentTarget::TSTypeAssertion(
1761 CloneIn::clone_in_with_semantic_ids(it, allocator),
1762 ),
1763 Self::ComputedMemberExpression(it) => AssignmentTarget::ComputedMemberExpression(
1764 CloneIn::clone_in_with_semantic_ids(it, allocator),
1765 ),
1766 Self::StaticMemberExpression(it) => AssignmentTarget::StaticMemberExpression(
1767 CloneIn::clone_in_with_semantic_ids(it, allocator),
1768 ),
1769 Self::PrivateFieldExpression(it) => AssignmentTarget::PrivateFieldExpression(
1770 CloneIn::clone_in_with_semantic_ids(it, allocator),
1771 ),
1772 Self::ArrayAssignmentTarget(it) => AssignmentTarget::ArrayAssignmentTarget(
1773 CloneIn::clone_in_with_semantic_ids(it, allocator),
1774 ),
1775 Self::ObjectAssignmentTarget(it) => AssignmentTarget::ObjectAssignmentTarget(
1776 CloneIn::clone_in_with_semantic_ids(it, allocator),
1777 ),
1778 }
1779 }
1780}
1781
1782impl<'new_alloc> CloneIn<'new_alloc> for SimpleAssignmentTarget<'_> {
1783 type Cloned = SimpleAssignmentTarget<'new_alloc>;
1784
1785 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1786 match self {
1787 Self::AssignmentTargetIdentifier(it) => {
1788 SimpleAssignmentTarget::AssignmentTargetIdentifier(CloneIn::clone_in(it, allocator))
1789 }
1790 Self::TSAsExpression(it) => {
1791 SimpleAssignmentTarget::TSAsExpression(CloneIn::clone_in(it, allocator))
1792 }
1793 Self::TSSatisfiesExpression(it) => {
1794 SimpleAssignmentTarget::TSSatisfiesExpression(CloneIn::clone_in(it, allocator))
1795 }
1796 Self::TSNonNullExpression(it) => {
1797 SimpleAssignmentTarget::TSNonNullExpression(CloneIn::clone_in(it, allocator))
1798 }
1799 Self::TSTypeAssertion(it) => {
1800 SimpleAssignmentTarget::TSTypeAssertion(CloneIn::clone_in(it, allocator))
1801 }
1802 Self::ComputedMemberExpression(it) => {
1803 SimpleAssignmentTarget::ComputedMemberExpression(CloneIn::clone_in(it, allocator))
1804 }
1805 Self::StaticMemberExpression(it) => {
1806 SimpleAssignmentTarget::StaticMemberExpression(CloneIn::clone_in(it, allocator))
1807 }
1808 Self::PrivateFieldExpression(it) => {
1809 SimpleAssignmentTarget::PrivateFieldExpression(CloneIn::clone_in(it, allocator))
1810 }
1811 }
1812 }
1813
1814 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1815 match self {
1816 Self::AssignmentTargetIdentifier(it) => {
1817 SimpleAssignmentTarget::AssignmentTargetIdentifier(
1818 CloneIn::clone_in_with_semantic_ids(it, allocator),
1819 )
1820 }
1821 Self::TSAsExpression(it) => SimpleAssignmentTarget::TSAsExpression(
1822 CloneIn::clone_in_with_semantic_ids(it, allocator),
1823 ),
1824 Self::TSSatisfiesExpression(it) => SimpleAssignmentTarget::TSSatisfiesExpression(
1825 CloneIn::clone_in_with_semantic_ids(it, allocator),
1826 ),
1827 Self::TSNonNullExpression(it) => SimpleAssignmentTarget::TSNonNullExpression(
1828 CloneIn::clone_in_with_semantic_ids(it, allocator),
1829 ),
1830 Self::TSTypeAssertion(it) => SimpleAssignmentTarget::TSTypeAssertion(
1831 CloneIn::clone_in_with_semantic_ids(it, allocator),
1832 ),
1833 Self::ComputedMemberExpression(it) => SimpleAssignmentTarget::ComputedMemberExpression(
1834 CloneIn::clone_in_with_semantic_ids(it, allocator),
1835 ),
1836 Self::StaticMemberExpression(it) => SimpleAssignmentTarget::StaticMemberExpression(
1837 CloneIn::clone_in_with_semantic_ids(it, allocator),
1838 ),
1839 Self::PrivateFieldExpression(it) => SimpleAssignmentTarget::PrivateFieldExpression(
1840 CloneIn::clone_in_with_semantic_ids(it, allocator),
1841 ),
1842 }
1843 }
1844}
1845
1846impl<'new_alloc> CloneIn<'new_alloc> for AssignmentTargetPattern<'_> {
1847 type Cloned = AssignmentTargetPattern<'new_alloc>;
1848
1849 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1850 match self {
1851 Self::ArrayAssignmentTarget(it) => {
1852 AssignmentTargetPattern::ArrayAssignmentTarget(CloneIn::clone_in(it, allocator))
1853 }
1854 Self::ObjectAssignmentTarget(it) => {
1855 AssignmentTargetPattern::ObjectAssignmentTarget(CloneIn::clone_in(it, allocator))
1856 }
1857 }
1858 }
1859
1860 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1861 match self {
1862 Self::ArrayAssignmentTarget(it) => AssignmentTargetPattern::ArrayAssignmentTarget(
1863 CloneIn::clone_in_with_semantic_ids(it, allocator),
1864 ),
1865 Self::ObjectAssignmentTarget(it) => AssignmentTargetPattern::ObjectAssignmentTarget(
1866 CloneIn::clone_in_with_semantic_ids(it, allocator),
1867 ),
1868 }
1869 }
1870}
1871
1872impl<'new_alloc> CloneIn<'new_alloc> for ArrayAssignmentTarget<'_> {
1873 type Cloned = ArrayAssignmentTarget<'new_alloc>;
1874
1875 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1876 ArrayAssignmentTarget {
1877 span: CloneIn::clone_in(&self.span, allocator),
1878 elements: CloneIn::clone_in(&self.elements, allocator),
1879 rest: CloneIn::clone_in(&self.rest, allocator),
1880 }
1881 }
1882
1883 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1884 ArrayAssignmentTarget {
1885 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
1886 elements: CloneIn::clone_in_with_semantic_ids(&self.elements, allocator),
1887 rest: CloneIn::clone_in_with_semantic_ids(&self.rest, allocator),
1888 }
1889 }
1890}
1891
1892impl<'new_alloc> CloneIn<'new_alloc> for ObjectAssignmentTarget<'_> {
1893 type Cloned = ObjectAssignmentTarget<'new_alloc>;
1894
1895 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1896 ObjectAssignmentTarget {
1897 span: CloneIn::clone_in(&self.span, allocator),
1898 properties: CloneIn::clone_in(&self.properties, allocator),
1899 rest: CloneIn::clone_in(&self.rest, allocator),
1900 }
1901 }
1902
1903 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1904 ObjectAssignmentTarget {
1905 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
1906 properties: CloneIn::clone_in_with_semantic_ids(&self.properties, allocator),
1907 rest: CloneIn::clone_in_with_semantic_ids(&self.rest, allocator),
1908 }
1909 }
1910}
1911
1912impl<'new_alloc> CloneIn<'new_alloc> for AssignmentTargetRest<'_> {
1913 type Cloned = AssignmentTargetRest<'new_alloc>;
1914
1915 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1916 AssignmentTargetRest {
1917 span: CloneIn::clone_in(&self.span, allocator),
1918 target: CloneIn::clone_in(&self.target, allocator),
1919 }
1920 }
1921
1922 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1923 AssignmentTargetRest {
1924 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
1925 target: CloneIn::clone_in_with_semantic_ids(&self.target, allocator),
1926 }
1927 }
1928}
1929
1930impl<'new_alloc> CloneIn<'new_alloc> for AssignmentTargetMaybeDefault<'_> {
1931 type Cloned = AssignmentTargetMaybeDefault<'new_alloc>;
1932
1933 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1934 match self {
1935 Self::AssignmentTargetWithDefault(it) => {
1936 AssignmentTargetMaybeDefault::AssignmentTargetWithDefault(CloneIn::clone_in(
1937 it, allocator,
1938 ))
1939 }
1940 Self::AssignmentTargetIdentifier(it) => {
1941 AssignmentTargetMaybeDefault::AssignmentTargetIdentifier(CloneIn::clone_in(
1942 it, allocator,
1943 ))
1944 }
1945 Self::TSAsExpression(it) => {
1946 AssignmentTargetMaybeDefault::TSAsExpression(CloneIn::clone_in(it, allocator))
1947 }
1948 Self::TSSatisfiesExpression(it) => AssignmentTargetMaybeDefault::TSSatisfiesExpression(
1949 CloneIn::clone_in(it, allocator),
1950 ),
1951 Self::TSNonNullExpression(it) => {
1952 AssignmentTargetMaybeDefault::TSNonNullExpression(CloneIn::clone_in(it, allocator))
1953 }
1954 Self::TSTypeAssertion(it) => {
1955 AssignmentTargetMaybeDefault::TSTypeAssertion(CloneIn::clone_in(it, allocator))
1956 }
1957 Self::ComputedMemberExpression(it) => {
1958 AssignmentTargetMaybeDefault::ComputedMemberExpression(CloneIn::clone_in(
1959 it, allocator,
1960 ))
1961 }
1962 Self::StaticMemberExpression(it) => {
1963 AssignmentTargetMaybeDefault::StaticMemberExpression(CloneIn::clone_in(
1964 it, allocator,
1965 ))
1966 }
1967 Self::PrivateFieldExpression(it) => {
1968 AssignmentTargetMaybeDefault::PrivateFieldExpression(CloneIn::clone_in(
1969 it, allocator,
1970 ))
1971 }
1972 Self::ArrayAssignmentTarget(it) => AssignmentTargetMaybeDefault::ArrayAssignmentTarget(
1973 CloneIn::clone_in(it, allocator),
1974 ),
1975 Self::ObjectAssignmentTarget(it) => {
1976 AssignmentTargetMaybeDefault::ObjectAssignmentTarget(CloneIn::clone_in(
1977 it, allocator,
1978 ))
1979 }
1980 }
1981 }
1982
1983 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
1984 match self {
1985 Self::AssignmentTargetWithDefault(it) => {
1986 AssignmentTargetMaybeDefault::AssignmentTargetWithDefault(
1987 CloneIn::clone_in_with_semantic_ids(it, allocator),
1988 )
1989 }
1990 Self::AssignmentTargetIdentifier(it) => {
1991 AssignmentTargetMaybeDefault::AssignmentTargetIdentifier(
1992 CloneIn::clone_in_with_semantic_ids(it, allocator),
1993 )
1994 }
1995 Self::TSAsExpression(it) => AssignmentTargetMaybeDefault::TSAsExpression(
1996 CloneIn::clone_in_with_semantic_ids(it, allocator),
1997 ),
1998 Self::TSSatisfiesExpression(it) => AssignmentTargetMaybeDefault::TSSatisfiesExpression(
1999 CloneIn::clone_in_with_semantic_ids(it, allocator),
2000 ),
2001 Self::TSNonNullExpression(it) => AssignmentTargetMaybeDefault::TSNonNullExpression(
2002 CloneIn::clone_in_with_semantic_ids(it, allocator),
2003 ),
2004 Self::TSTypeAssertion(it) => AssignmentTargetMaybeDefault::TSTypeAssertion(
2005 CloneIn::clone_in_with_semantic_ids(it, allocator),
2006 ),
2007 Self::ComputedMemberExpression(it) => {
2008 AssignmentTargetMaybeDefault::ComputedMemberExpression(
2009 CloneIn::clone_in_with_semantic_ids(it, allocator),
2010 )
2011 }
2012 Self::StaticMemberExpression(it) => {
2013 AssignmentTargetMaybeDefault::StaticMemberExpression(
2014 CloneIn::clone_in_with_semantic_ids(it, allocator),
2015 )
2016 }
2017 Self::PrivateFieldExpression(it) => {
2018 AssignmentTargetMaybeDefault::PrivateFieldExpression(
2019 CloneIn::clone_in_with_semantic_ids(it, allocator),
2020 )
2021 }
2022 Self::ArrayAssignmentTarget(it) => AssignmentTargetMaybeDefault::ArrayAssignmentTarget(
2023 CloneIn::clone_in_with_semantic_ids(it, allocator),
2024 ),
2025 Self::ObjectAssignmentTarget(it) => {
2026 AssignmentTargetMaybeDefault::ObjectAssignmentTarget(
2027 CloneIn::clone_in_with_semantic_ids(it, allocator),
2028 )
2029 }
2030 }
2031 }
2032}
2033
2034impl<'new_alloc> CloneIn<'new_alloc> for AssignmentTargetWithDefault<'_> {
2035 type Cloned = AssignmentTargetWithDefault<'new_alloc>;
2036
2037 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2038 AssignmentTargetWithDefault {
2039 span: CloneIn::clone_in(&self.span, allocator),
2040 binding: CloneIn::clone_in(&self.binding, allocator),
2041 init: CloneIn::clone_in(&self.init, allocator),
2042 }
2043 }
2044
2045 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2046 AssignmentTargetWithDefault {
2047 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
2048 binding: CloneIn::clone_in_with_semantic_ids(&self.binding, allocator),
2049 init: CloneIn::clone_in_with_semantic_ids(&self.init, allocator),
2050 }
2051 }
2052}
2053
2054impl<'new_alloc> CloneIn<'new_alloc> for AssignmentTargetProperty<'_> {
2055 type Cloned = AssignmentTargetProperty<'new_alloc>;
2056
2057 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2058 match self {
2059 Self::AssignmentTargetPropertyIdentifier(it) => {
2060 AssignmentTargetProperty::AssignmentTargetPropertyIdentifier(CloneIn::clone_in(
2061 it, allocator,
2062 ))
2063 }
2064 Self::AssignmentTargetPropertyProperty(it) => {
2065 AssignmentTargetProperty::AssignmentTargetPropertyProperty(CloneIn::clone_in(
2066 it, allocator,
2067 ))
2068 }
2069 }
2070 }
2071
2072 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2073 match self {
2074 Self::AssignmentTargetPropertyIdentifier(it) => {
2075 AssignmentTargetProperty::AssignmentTargetPropertyIdentifier(
2076 CloneIn::clone_in_with_semantic_ids(it, allocator),
2077 )
2078 }
2079 Self::AssignmentTargetPropertyProperty(it) => {
2080 AssignmentTargetProperty::AssignmentTargetPropertyProperty(
2081 CloneIn::clone_in_with_semantic_ids(it, allocator),
2082 )
2083 }
2084 }
2085 }
2086}
2087
2088impl<'new_alloc> CloneIn<'new_alloc> for AssignmentTargetPropertyIdentifier<'_> {
2089 type Cloned = AssignmentTargetPropertyIdentifier<'new_alloc>;
2090
2091 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2092 AssignmentTargetPropertyIdentifier {
2093 span: CloneIn::clone_in(&self.span, allocator),
2094 binding: CloneIn::clone_in(&self.binding, allocator),
2095 init: CloneIn::clone_in(&self.init, allocator),
2096 }
2097 }
2098
2099 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2100 AssignmentTargetPropertyIdentifier {
2101 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
2102 binding: CloneIn::clone_in_with_semantic_ids(&self.binding, allocator),
2103 init: CloneIn::clone_in_with_semantic_ids(&self.init, allocator),
2104 }
2105 }
2106}
2107
2108impl<'new_alloc> CloneIn<'new_alloc> for AssignmentTargetPropertyProperty<'_> {
2109 type Cloned = AssignmentTargetPropertyProperty<'new_alloc>;
2110
2111 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2112 AssignmentTargetPropertyProperty {
2113 span: CloneIn::clone_in(&self.span, allocator),
2114 name: CloneIn::clone_in(&self.name, allocator),
2115 binding: CloneIn::clone_in(&self.binding, allocator),
2116 computed: CloneIn::clone_in(&self.computed, allocator),
2117 }
2118 }
2119
2120 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2121 AssignmentTargetPropertyProperty {
2122 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
2123 name: CloneIn::clone_in_with_semantic_ids(&self.name, allocator),
2124 binding: CloneIn::clone_in_with_semantic_ids(&self.binding, allocator),
2125 computed: CloneIn::clone_in_with_semantic_ids(&self.computed, allocator),
2126 }
2127 }
2128}
2129
2130impl<'new_alloc> CloneIn<'new_alloc> for SequenceExpression<'_> {
2131 type Cloned = SequenceExpression<'new_alloc>;
2132
2133 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2134 SequenceExpression {
2135 span: CloneIn::clone_in(&self.span, allocator),
2136 expressions: CloneIn::clone_in(&self.expressions, allocator),
2137 }
2138 }
2139
2140 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2141 SequenceExpression {
2142 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
2143 expressions: CloneIn::clone_in_with_semantic_ids(&self.expressions, allocator),
2144 }
2145 }
2146}
2147
2148impl<'new_alloc> CloneIn<'new_alloc> for Super {
2149 type Cloned = Super;
2150
2151 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2152 Super { span: CloneIn::clone_in(&self.span, allocator) }
2153 }
2154
2155 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2156 Super { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
2157 }
2158}
2159
2160impl<'new_alloc> CloneIn<'new_alloc> for AwaitExpression<'_> {
2161 type Cloned = AwaitExpression<'new_alloc>;
2162
2163 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2164 AwaitExpression {
2165 span: CloneIn::clone_in(&self.span, allocator),
2166 argument: CloneIn::clone_in(&self.argument, allocator),
2167 }
2168 }
2169
2170 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2171 AwaitExpression {
2172 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
2173 argument: CloneIn::clone_in_with_semantic_ids(&self.argument, allocator),
2174 }
2175 }
2176}
2177
2178impl<'new_alloc> CloneIn<'new_alloc> for ChainExpression<'_> {
2179 type Cloned = ChainExpression<'new_alloc>;
2180
2181 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2182 ChainExpression {
2183 span: CloneIn::clone_in(&self.span, allocator),
2184 expression: CloneIn::clone_in(&self.expression, allocator),
2185 }
2186 }
2187
2188 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2189 ChainExpression {
2190 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
2191 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
2192 }
2193 }
2194}
2195
2196impl<'new_alloc> CloneIn<'new_alloc> for ChainElement<'_> {
2197 type Cloned = ChainElement<'new_alloc>;
2198
2199 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2200 match self {
2201 Self::CallExpression(it) => {
2202 ChainElement::CallExpression(CloneIn::clone_in(it, allocator))
2203 }
2204 Self::TSNonNullExpression(it) => {
2205 ChainElement::TSNonNullExpression(CloneIn::clone_in(it, allocator))
2206 }
2207 Self::ComputedMemberExpression(it) => {
2208 ChainElement::ComputedMemberExpression(CloneIn::clone_in(it, allocator))
2209 }
2210 Self::StaticMemberExpression(it) => {
2211 ChainElement::StaticMemberExpression(CloneIn::clone_in(it, allocator))
2212 }
2213 Self::PrivateFieldExpression(it) => {
2214 ChainElement::PrivateFieldExpression(CloneIn::clone_in(it, allocator))
2215 }
2216 }
2217 }
2218
2219 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2220 match self {
2221 Self::CallExpression(it) => {
2222 ChainElement::CallExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
2223 }
2224 Self::TSNonNullExpression(it) => ChainElement::TSNonNullExpression(
2225 CloneIn::clone_in_with_semantic_ids(it, allocator),
2226 ),
2227 Self::ComputedMemberExpression(it) => ChainElement::ComputedMemberExpression(
2228 CloneIn::clone_in_with_semantic_ids(it, allocator),
2229 ),
2230 Self::StaticMemberExpression(it) => ChainElement::StaticMemberExpression(
2231 CloneIn::clone_in_with_semantic_ids(it, allocator),
2232 ),
2233 Self::PrivateFieldExpression(it) => ChainElement::PrivateFieldExpression(
2234 CloneIn::clone_in_with_semantic_ids(it, allocator),
2235 ),
2236 }
2237 }
2238}
2239
2240impl<'new_alloc> CloneIn<'new_alloc> for ParenthesizedExpression<'_> {
2241 type Cloned = ParenthesizedExpression<'new_alloc>;
2242
2243 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2244 ParenthesizedExpression {
2245 span: CloneIn::clone_in(&self.span, allocator),
2246 expression: CloneIn::clone_in(&self.expression, allocator),
2247 }
2248 }
2249
2250 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2251 ParenthesizedExpression {
2252 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
2253 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
2254 }
2255 }
2256}
2257
2258impl<'new_alloc> CloneIn<'new_alloc> for Statement<'_> {
2259 type Cloned = Statement<'new_alloc>;
2260
2261 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2262 match self {
2263 Self::BlockStatement(it) => Statement::BlockStatement(CloneIn::clone_in(it, allocator)),
2264 Self::BreakStatement(it) => Statement::BreakStatement(CloneIn::clone_in(it, allocator)),
2265 Self::ContinueStatement(it) => {
2266 Statement::ContinueStatement(CloneIn::clone_in(it, allocator))
2267 }
2268 Self::DebuggerStatement(it) => {
2269 Statement::DebuggerStatement(CloneIn::clone_in(it, allocator))
2270 }
2271 Self::DoWhileStatement(it) => {
2272 Statement::DoWhileStatement(CloneIn::clone_in(it, allocator))
2273 }
2274 Self::EmptyStatement(it) => Statement::EmptyStatement(CloneIn::clone_in(it, allocator)),
2275 Self::ExpressionStatement(it) => {
2276 Statement::ExpressionStatement(CloneIn::clone_in(it, allocator))
2277 }
2278 Self::ForInStatement(it) => Statement::ForInStatement(CloneIn::clone_in(it, allocator)),
2279 Self::ForOfStatement(it) => Statement::ForOfStatement(CloneIn::clone_in(it, allocator)),
2280 Self::ForStatement(it) => Statement::ForStatement(CloneIn::clone_in(it, allocator)),
2281 Self::IfStatement(it) => Statement::IfStatement(CloneIn::clone_in(it, allocator)),
2282 Self::LabeledStatement(it) => {
2283 Statement::LabeledStatement(CloneIn::clone_in(it, allocator))
2284 }
2285 Self::ReturnStatement(it) => {
2286 Statement::ReturnStatement(CloneIn::clone_in(it, allocator))
2287 }
2288 Self::SwitchStatement(it) => {
2289 Statement::SwitchStatement(CloneIn::clone_in(it, allocator))
2290 }
2291 Self::ThrowStatement(it) => Statement::ThrowStatement(CloneIn::clone_in(it, allocator)),
2292 Self::TryStatement(it) => Statement::TryStatement(CloneIn::clone_in(it, allocator)),
2293 Self::WhileStatement(it) => Statement::WhileStatement(CloneIn::clone_in(it, allocator)),
2294 Self::WithStatement(it) => Statement::WithStatement(CloneIn::clone_in(it, allocator)),
2295 Self::VariableDeclaration(it) => {
2296 Statement::VariableDeclaration(CloneIn::clone_in(it, allocator))
2297 }
2298 Self::FunctionDeclaration(it) => {
2299 Statement::FunctionDeclaration(CloneIn::clone_in(it, allocator))
2300 }
2301 Self::ClassDeclaration(it) => {
2302 Statement::ClassDeclaration(CloneIn::clone_in(it, allocator))
2303 }
2304 Self::TSTypeAliasDeclaration(it) => {
2305 Statement::TSTypeAliasDeclaration(CloneIn::clone_in(it, allocator))
2306 }
2307 Self::TSInterfaceDeclaration(it) => {
2308 Statement::TSInterfaceDeclaration(CloneIn::clone_in(it, allocator))
2309 }
2310 Self::TSEnumDeclaration(it) => {
2311 Statement::TSEnumDeclaration(CloneIn::clone_in(it, allocator))
2312 }
2313 Self::TSModuleDeclaration(it) => {
2314 Statement::TSModuleDeclaration(CloneIn::clone_in(it, allocator))
2315 }
2316 Self::TSGlobalDeclaration(it) => {
2317 Statement::TSGlobalDeclaration(CloneIn::clone_in(it, allocator))
2318 }
2319 Self::TSImportEqualsDeclaration(it) => {
2320 Statement::TSImportEqualsDeclaration(CloneIn::clone_in(it, allocator))
2321 }
2322 Self::ImportDeclaration(it) => {
2323 Statement::ImportDeclaration(CloneIn::clone_in(it, allocator))
2324 }
2325 Self::ExportAllDeclaration(it) => {
2326 Statement::ExportAllDeclaration(CloneIn::clone_in(it, allocator))
2327 }
2328 Self::ExportDefaultDeclaration(it) => {
2329 Statement::ExportDefaultDeclaration(CloneIn::clone_in(it, allocator))
2330 }
2331 Self::ExportNamedDeclaration(it) => {
2332 Statement::ExportNamedDeclaration(CloneIn::clone_in(it, allocator))
2333 }
2334 Self::TSExportAssignment(it) => {
2335 Statement::TSExportAssignment(CloneIn::clone_in(it, allocator))
2336 }
2337 Self::TSNamespaceExportDeclaration(it) => {
2338 Statement::TSNamespaceExportDeclaration(CloneIn::clone_in(it, allocator))
2339 }
2340 }
2341 }
2342
2343 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2344 match self {
2345 Self::BlockStatement(it) => {
2346 Statement::BlockStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2347 }
2348 Self::BreakStatement(it) => {
2349 Statement::BreakStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2350 }
2351 Self::ContinueStatement(it) => {
2352 Statement::ContinueStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2353 }
2354 Self::DebuggerStatement(it) => {
2355 Statement::DebuggerStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2356 }
2357 Self::DoWhileStatement(it) => {
2358 Statement::DoWhileStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2359 }
2360 Self::EmptyStatement(it) => {
2361 Statement::EmptyStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2362 }
2363 Self::ExpressionStatement(it) => {
2364 Statement::ExpressionStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2365 }
2366 Self::ForInStatement(it) => {
2367 Statement::ForInStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2368 }
2369 Self::ForOfStatement(it) => {
2370 Statement::ForOfStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2371 }
2372 Self::ForStatement(it) => {
2373 Statement::ForStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2374 }
2375 Self::IfStatement(it) => {
2376 Statement::IfStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2377 }
2378 Self::LabeledStatement(it) => {
2379 Statement::LabeledStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2380 }
2381 Self::ReturnStatement(it) => {
2382 Statement::ReturnStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2383 }
2384 Self::SwitchStatement(it) => {
2385 Statement::SwitchStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2386 }
2387 Self::ThrowStatement(it) => {
2388 Statement::ThrowStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2389 }
2390 Self::TryStatement(it) => {
2391 Statement::TryStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2392 }
2393 Self::WhileStatement(it) => {
2394 Statement::WhileStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2395 }
2396 Self::WithStatement(it) => {
2397 Statement::WithStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2398 }
2399 Self::VariableDeclaration(it) => {
2400 Statement::VariableDeclaration(CloneIn::clone_in_with_semantic_ids(it, allocator))
2401 }
2402 Self::FunctionDeclaration(it) => {
2403 Statement::FunctionDeclaration(CloneIn::clone_in_with_semantic_ids(it, allocator))
2404 }
2405 Self::ClassDeclaration(it) => {
2406 Statement::ClassDeclaration(CloneIn::clone_in_with_semantic_ids(it, allocator))
2407 }
2408 Self::TSTypeAliasDeclaration(it) => Statement::TSTypeAliasDeclaration(
2409 CloneIn::clone_in_with_semantic_ids(it, allocator),
2410 ),
2411 Self::TSInterfaceDeclaration(it) => Statement::TSInterfaceDeclaration(
2412 CloneIn::clone_in_with_semantic_ids(it, allocator),
2413 ),
2414 Self::TSEnumDeclaration(it) => {
2415 Statement::TSEnumDeclaration(CloneIn::clone_in_with_semantic_ids(it, allocator))
2416 }
2417 Self::TSModuleDeclaration(it) => {
2418 Statement::TSModuleDeclaration(CloneIn::clone_in_with_semantic_ids(it, allocator))
2419 }
2420 Self::TSGlobalDeclaration(it) => {
2421 Statement::TSGlobalDeclaration(CloneIn::clone_in_with_semantic_ids(it, allocator))
2422 }
2423 Self::TSImportEqualsDeclaration(it) => Statement::TSImportEqualsDeclaration(
2424 CloneIn::clone_in_with_semantic_ids(it, allocator),
2425 ),
2426 Self::ImportDeclaration(it) => {
2427 Statement::ImportDeclaration(CloneIn::clone_in_with_semantic_ids(it, allocator))
2428 }
2429 Self::ExportAllDeclaration(it) => {
2430 Statement::ExportAllDeclaration(CloneIn::clone_in_with_semantic_ids(it, allocator))
2431 }
2432 Self::ExportDefaultDeclaration(it) => Statement::ExportDefaultDeclaration(
2433 CloneIn::clone_in_with_semantic_ids(it, allocator),
2434 ),
2435 Self::ExportNamedDeclaration(it) => Statement::ExportNamedDeclaration(
2436 CloneIn::clone_in_with_semantic_ids(it, allocator),
2437 ),
2438 Self::TSExportAssignment(it) => {
2439 Statement::TSExportAssignment(CloneIn::clone_in_with_semantic_ids(it, allocator))
2440 }
2441 Self::TSNamespaceExportDeclaration(it) => Statement::TSNamespaceExportDeclaration(
2442 CloneIn::clone_in_with_semantic_ids(it, allocator),
2443 ),
2444 }
2445 }
2446}
2447
2448impl<'new_alloc> CloneIn<'new_alloc> for Directive<'_> {
2449 type Cloned = Directive<'new_alloc>;
2450
2451 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2452 Directive {
2453 span: CloneIn::clone_in(&self.span, allocator),
2454 expression: CloneIn::clone_in(&self.expression, allocator),
2455 directive: CloneIn::clone_in(&self.directive, allocator),
2456 }
2457 }
2458
2459 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2460 Directive {
2461 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
2462 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
2463 directive: CloneIn::clone_in_with_semantic_ids(&self.directive, allocator),
2464 }
2465 }
2466}
2467
2468impl<'new_alloc> CloneIn<'new_alloc> for Hashbang<'_> {
2469 type Cloned = Hashbang<'new_alloc>;
2470
2471 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2472 Hashbang {
2473 span: CloneIn::clone_in(&self.span, allocator),
2474 value: CloneIn::clone_in(&self.value, allocator),
2475 }
2476 }
2477
2478 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2479 Hashbang {
2480 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
2481 value: CloneIn::clone_in_with_semantic_ids(&self.value, allocator),
2482 }
2483 }
2484}
2485
2486impl<'new_alloc> CloneIn<'new_alloc> for BlockStatement<'_> {
2487 type Cloned = BlockStatement<'new_alloc>;
2488
2489 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2490 BlockStatement {
2491 span: CloneIn::clone_in(&self.span, allocator),
2492 body: CloneIn::clone_in(&self.body, allocator),
2493 scope_id: Default::default(),
2494 }
2495 }
2496
2497 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2498 BlockStatement {
2499 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
2500 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
2501 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
2502 }
2503 }
2504}
2505
2506impl<'new_alloc> CloneIn<'new_alloc> for Declaration<'_> {
2507 type Cloned = Declaration<'new_alloc>;
2508
2509 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2510 match self {
2511 Self::VariableDeclaration(it) => {
2512 Declaration::VariableDeclaration(CloneIn::clone_in(it, allocator))
2513 }
2514 Self::FunctionDeclaration(it) => {
2515 Declaration::FunctionDeclaration(CloneIn::clone_in(it, allocator))
2516 }
2517 Self::ClassDeclaration(it) => {
2518 Declaration::ClassDeclaration(CloneIn::clone_in(it, allocator))
2519 }
2520 Self::TSTypeAliasDeclaration(it) => {
2521 Declaration::TSTypeAliasDeclaration(CloneIn::clone_in(it, allocator))
2522 }
2523 Self::TSInterfaceDeclaration(it) => {
2524 Declaration::TSInterfaceDeclaration(CloneIn::clone_in(it, allocator))
2525 }
2526 Self::TSEnumDeclaration(it) => {
2527 Declaration::TSEnumDeclaration(CloneIn::clone_in(it, allocator))
2528 }
2529 Self::TSModuleDeclaration(it) => {
2530 Declaration::TSModuleDeclaration(CloneIn::clone_in(it, allocator))
2531 }
2532 Self::TSGlobalDeclaration(it) => {
2533 Declaration::TSGlobalDeclaration(CloneIn::clone_in(it, allocator))
2534 }
2535 Self::TSImportEqualsDeclaration(it) => {
2536 Declaration::TSImportEqualsDeclaration(CloneIn::clone_in(it, allocator))
2537 }
2538 }
2539 }
2540
2541 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2542 match self {
2543 Self::VariableDeclaration(it) => {
2544 Declaration::VariableDeclaration(CloneIn::clone_in_with_semantic_ids(it, allocator))
2545 }
2546 Self::FunctionDeclaration(it) => {
2547 Declaration::FunctionDeclaration(CloneIn::clone_in_with_semantic_ids(it, allocator))
2548 }
2549 Self::ClassDeclaration(it) => {
2550 Declaration::ClassDeclaration(CloneIn::clone_in_with_semantic_ids(it, allocator))
2551 }
2552 Self::TSTypeAliasDeclaration(it) => Declaration::TSTypeAliasDeclaration(
2553 CloneIn::clone_in_with_semantic_ids(it, allocator),
2554 ),
2555 Self::TSInterfaceDeclaration(it) => Declaration::TSInterfaceDeclaration(
2556 CloneIn::clone_in_with_semantic_ids(it, allocator),
2557 ),
2558 Self::TSEnumDeclaration(it) => {
2559 Declaration::TSEnumDeclaration(CloneIn::clone_in_with_semantic_ids(it, allocator))
2560 }
2561 Self::TSModuleDeclaration(it) => {
2562 Declaration::TSModuleDeclaration(CloneIn::clone_in_with_semantic_ids(it, allocator))
2563 }
2564 Self::TSGlobalDeclaration(it) => {
2565 Declaration::TSGlobalDeclaration(CloneIn::clone_in_with_semantic_ids(it, allocator))
2566 }
2567 Self::TSImportEqualsDeclaration(it) => Declaration::TSImportEqualsDeclaration(
2568 CloneIn::clone_in_with_semantic_ids(it, allocator),
2569 ),
2570 }
2571 }
2572}
2573
2574impl<'new_alloc> CloneIn<'new_alloc> for VariableDeclaration<'_> {
2575 type Cloned = VariableDeclaration<'new_alloc>;
2576
2577 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2578 VariableDeclaration {
2579 span: CloneIn::clone_in(&self.span, allocator),
2580 kind: CloneIn::clone_in(&self.kind, allocator),
2581 declarations: CloneIn::clone_in(&self.declarations, allocator),
2582 declare: CloneIn::clone_in(&self.declare, allocator),
2583 }
2584 }
2585
2586 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2587 VariableDeclaration {
2588 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
2589 kind: CloneIn::clone_in_with_semantic_ids(&self.kind, allocator),
2590 declarations: CloneIn::clone_in_with_semantic_ids(&self.declarations, allocator),
2591 declare: CloneIn::clone_in_with_semantic_ids(&self.declare, allocator),
2592 }
2593 }
2594}
2595
2596impl<'new_alloc> CloneIn<'new_alloc> for VariableDeclarationKind {
2597 type Cloned = VariableDeclarationKind;
2598
2599 #[inline(always)]
2600 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2601 *self
2602 }
2603
2604 #[inline(always)]
2605 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2606 *self
2607 }
2608}
2609
2610impl<'new_alloc> CloneIn<'new_alloc> for VariableDeclarator<'_> {
2611 type Cloned = VariableDeclarator<'new_alloc>;
2612
2613 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2614 VariableDeclarator {
2615 span: CloneIn::clone_in(&self.span, allocator),
2616 kind: CloneIn::clone_in(&self.kind, allocator),
2617 id: CloneIn::clone_in(&self.id, allocator),
2618 init: CloneIn::clone_in(&self.init, allocator),
2619 definite: CloneIn::clone_in(&self.definite, allocator),
2620 }
2621 }
2622
2623 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2624 VariableDeclarator {
2625 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
2626 kind: CloneIn::clone_in_with_semantic_ids(&self.kind, allocator),
2627 id: CloneIn::clone_in_with_semantic_ids(&self.id, allocator),
2628 init: CloneIn::clone_in_with_semantic_ids(&self.init, allocator),
2629 definite: CloneIn::clone_in_with_semantic_ids(&self.definite, allocator),
2630 }
2631 }
2632}
2633
2634impl<'new_alloc> CloneIn<'new_alloc> for EmptyStatement {
2635 type Cloned = EmptyStatement;
2636
2637 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2638 EmptyStatement { span: CloneIn::clone_in(&self.span, allocator) }
2639 }
2640
2641 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2642 EmptyStatement { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
2643 }
2644}
2645
2646impl<'new_alloc> CloneIn<'new_alloc> for ExpressionStatement<'_> {
2647 type Cloned = ExpressionStatement<'new_alloc>;
2648
2649 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2650 ExpressionStatement {
2651 span: CloneIn::clone_in(&self.span, allocator),
2652 expression: CloneIn::clone_in(&self.expression, allocator),
2653 }
2654 }
2655
2656 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2657 ExpressionStatement {
2658 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
2659 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
2660 }
2661 }
2662}
2663
2664impl<'new_alloc> CloneIn<'new_alloc> for IfStatement<'_> {
2665 type Cloned = IfStatement<'new_alloc>;
2666
2667 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2668 IfStatement {
2669 span: CloneIn::clone_in(&self.span, allocator),
2670 test: CloneIn::clone_in(&self.test, allocator),
2671 consequent: CloneIn::clone_in(&self.consequent, allocator),
2672 alternate: CloneIn::clone_in(&self.alternate, allocator),
2673 }
2674 }
2675
2676 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2677 IfStatement {
2678 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
2679 test: CloneIn::clone_in_with_semantic_ids(&self.test, allocator),
2680 consequent: CloneIn::clone_in_with_semantic_ids(&self.consequent, allocator),
2681 alternate: CloneIn::clone_in_with_semantic_ids(&self.alternate, allocator),
2682 }
2683 }
2684}
2685
2686impl<'new_alloc> CloneIn<'new_alloc> for DoWhileStatement<'_> {
2687 type Cloned = DoWhileStatement<'new_alloc>;
2688
2689 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2690 DoWhileStatement {
2691 span: CloneIn::clone_in(&self.span, allocator),
2692 body: CloneIn::clone_in(&self.body, allocator),
2693 test: CloneIn::clone_in(&self.test, allocator),
2694 }
2695 }
2696
2697 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2698 DoWhileStatement {
2699 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
2700 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
2701 test: CloneIn::clone_in_with_semantic_ids(&self.test, allocator),
2702 }
2703 }
2704}
2705
2706impl<'new_alloc> CloneIn<'new_alloc> for WhileStatement<'_> {
2707 type Cloned = WhileStatement<'new_alloc>;
2708
2709 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2710 WhileStatement {
2711 span: CloneIn::clone_in(&self.span, allocator),
2712 test: CloneIn::clone_in(&self.test, allocator),
2713 body: CloneIn::clone_in(&self.body, allocator),
2714 }
2715 }
2716
2717 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2718 WhileStatement {
2719 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
2720 test: CloneIn::clone_in_with_semantic_ids(&self.test, allocator),
2721 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
2722 }
2723 }
2724}
2725
2726impl<'new_alloc> CloneIn<'new_alloc> for ForStatement<'_> {
2727 type Cloned = ForStatement<'new_alloc>;
2728
2729 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2730 ForStatement {
2731 span: CloneIn::clone_in(&self.span, allocator),
2732 init: CloneIn::clone_in(&self.init, allocator),
2733 test: CloneIn::clone_in(&self.test, allocator),
2734 update: CloneIn::clone_in(&self.update, allocator),
2735 body: CloneIn::clone_in(&self.body, allocator),
2736 scope_id: Default::default(),
2737 }
2738 }
2739
2740 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2741 ForStatement {
2742 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
2743 init: CloneIn::clone_in_with_semantic_ids(&self.init, allocator),
2744 test: CloneIn::clone_in_with_semantic_ids(&self.test, allocator),
2745 update: CloneIn::clone_in_with_semantic_ids(&self.update, allocator),
2746 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
2747 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
2748 }
2749 }
2750}
2751
2752impl<'new_alloc> CloneIn<'new_alloc> for ForStatementInit<'_> {
2753 type Cloned = ForStatementInit<'new_alloc>;
2754
2755 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2756 match self {
2757 Self::VariableDeclaration(it) => {
2758 ForStatementInit::VariableDeclaration(CloneIn::clone_in(it, allocator))
2759 }
2760 Self::BooleanLiteral(it) => {
2761 ForStatementInit::BooleanLiteral(CloneIn::clone_in(it, allocator))
2762 }
2763 Self::NullLiteral(it) => {
2764 ForStatementInit::NullLiteral(CloneIn::clone_in(it, allocator))
2765 }
2766 Self::NumericLiteral(it) => {
2767 ForStatementInit::NumericLiteral(CloneIn::clone_in(it, allocator))
2768 }
2769 Self::BigIntLiteral(it) => {
2770 ForStatementInit::BigIntLiteral(CloneIn::clone_in(it, allocator))
2771 }
2772 Self::RegExpLiteral(it) => {
2773 ForStatementInit::RegExpLiteral(CloneIn::clone_in(it, allocator))
2774 }
2775 Self::StringLiteral(it) => {
2776 ForStatementInit::StringLiteral(CloneIn::clone_in(it, allocator))
2777 }
2778 Self::TemplateLiteral(it) => {
2779 ForStatementInit::TemplateLiteral(CloneIn::clone_in(it, allocator))
2780 }
2781 Self::Identifier(it) => ForStatementInit::Identifier(CloneIn::clone_in(it, allocator)),
2782 Self::MetaProperty(it) => {
2783 ForStatementInit::MetaProperty(CloneIn::clone_in(it, allocator))
2784 }
2785 Self::Super(it) => ForStatementInit::Super(CloneIn::clone_in(it, allocator)),
2786 Self::ArrayExpression(it) => {
2787 ForStatementInit::ArrayExpression(CloneIn::clone_in(it, allocator))
2788 }
2789 Self::ArrowFunctionExpression(it) => {
2790 ForStatementInit::ArrowFunctionExpression(CloneIn::clone_in(it, allocator))
2791 }
2792 Self::AssignmentExpression(it) => {
2793 ForStatementInit::AssignmentExpression(CloneIn::clone_in(it, allocator))
2794 }
2795 Self::AwaitExpression(it) => {
2796 ForStatementInit::AwaitExpression(CloneIn::clone_in(it, allocator))
2797 }
2798 Self::BinaryExpression(it) => {
2799 ForStatementInit::BinaryExpression(CloneIn::clone_in(it, allocator))
2800 }
2801 Self::CallExpression(it) => {
2802 ForStatementInit::CallExpression(CloneIn::clone_in(it, allocator))
2803 }
2804 Self::ChainExpression(it) => {
2805 ForStatementInit::ChainExpression(CloneIn::clone_in(it, allocator))
2806 }
2807 Self::ClassExpression(it) => {
2808 ForStatementInit::ClassExpression(CloneIn::clone_in(it, allocator))
2809 }
2810 Self::ConditionalExpression(it) => {
2811 ForStatementInit::ConditionalExpression(CloneIn::clone_in(it, allocator))
2812 }
2813 Self::FunctionExpression(it) => {
2814 ForStatementInit::FunctionExpression(CloneIn::clone_in(it, allocator))
2815 }
2816 Self::ImportExpression(it) => {
2817 ForStatementInit::ImportExpression(CloneIn::clone_in(it, allocator))
2818 }
2819 Self::LogicalExpression(it) => {
2820 ForStatementInit::LogicalExpression(CloneIn::clone_in(it, allocator))
2821 }
2822 Self::NewExpression(it) => {
2823 ForStatementInit::NewExpression(CloneIn::clone_in(it, allocator))
2824 }
2825 Self::ObjectExpression(it) => {
2826 ForStatementInit::ObjectExpression(CloneIn::clone_in(it, allocator))
2827 }
2828 Self::ParenthesizedExpression(it) => {
2829 ForStatementInit::ParenthesizedExpression(CloneIn::clone_in(it, allocator))
2830 }
2831 Self::SequenceExpression(it) => {
2832 ForStatementInit::SequenceExpression(CloneIn::clone_in(it, allocator))
2833 }
2834 Self::TaggedTemplateExpression(it) => {
2835 ForStatementInit::TaggedTemplateExpression(CloneIn::clone_in(it, allocator))
2836 }
2837 Self::ThisExpression(it) => {
2838 ForStatementInit::ThisExpression(CloneIn::clone_in(it, allocator))
2839 }
2840 Self::UnaryExpression(it) => {
2841 ForStatementInit::UnaryExpression(CloneIn::clone_in(it, allocator))
2842 }
2843 Self::UpdateExpression(it) => {
2844 ForStatementInit::UpdateExpression(CloneIn::clone_in(it, allocator))
2845 }
2846 Self::YieldExpression(it) => {
2847 ForStatementInit::YieldExpression(CloneIn::clone_in(it, allocator))
2848 }
2849 Self::PrivateInExpression(it) => {
2850 ForStatementInit::PrivateInExpression(CloneIn::clone_in(it, allocator))
2851 }
2852 Self::JSXElement(it) => ForStatementInit::JSXElement(CloneIn::clone_in(it, allocator)),
2853 Self::JSXFragment(it) => {
2854 ForStatementInit::JSXFragment(CloneIn::clone_in(it, allocator))
2855 }
2856 Self::TSAsExpression(it) => {
2857 ForStatementInit::TSAsExpression(CloneIn::clone_in(it, allocator))
2858 }
2859 Self::TSSatisfiesExpression(it) => {
2860 ForStatementInit::TSSatisfiesExpression(CloneIn::clone_in(it, allocator))
2861 }
2862 Self::TSTypeAssertion(it) => {
2863 ForStatementInit::TSTypeAssertion(CloneIn::clone_in(it, allocator))
2864 }
2865 Self::TSNonNullExpression(it) => {
2866 ForStatementInit::TSNonNullExpression(CloneIn::clone_in(it, allocator))
2867 }
2868 Self::TSInstantiationExpression(it) => {
2869 ForStatementInit::TSInstantiationExpression(CloneIn::clone_in(it, allocator))
2870 }
2871 Self::V8IntrinsicExpression(it) => {
2872 ForStatementInit::V8IntrinsicExpression(CloneIn::clone_in(it, allocator))
2873 }
2874 Self::ComputedMemberExpression(it) => {
2875 ForStatementInit::ComputedMemberExpression(CloneIn::clone_in(it, allocator))
2876 }
2877 Self::StaticMemberExpression(it) => {
2878 ForStatementInit::StaticMemberExpression(CloneIn::clone_in(it, allocator))
2879 }
2880 Self::PrivateFieldExpression(it) => {
2881 ForStatementInit::PrivateFieldExpression(CloneIn::clone_in(it, allocator))
2882 }
2883 }
2884 }
2885
2886 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2887 match self {
2888 Self::VariableDeclaration(it) => ForStatementInit::VariableDeclaration(
2889 CloneIn::clone_in_with_semantic_ids(it, allocator),
2890 ),
2891 Self::BooleanLiteral(it) => {
2892 ForStatementInit::BooleanLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
2893 }
2894 Self::NullLiteral(it) => {
2895 ForStatementInit::NullLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
2896 }
2897 Self::NumericLiteral(it) => {
2898 ForStatementInit::NumericLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
2899 }
2900 Self::BigIntLiteral(it) => {
2901 ForStatementInit::BigIntLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
2902 }
2903 Self::RegExpLiteral(it) => {
2904 ForStatementInit::RegExpLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
2905 }
2906 Self::StringLiteral(it) => {
2907 ForStatementInit::StringLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
2908 }
2909 Self::TemplateLiteral(it) => ForStatementInit::TemplateLiteral(
2910 CloneIn::clone_in_with_semantic_ids(it, allocator),
2911 ),
2912 Self::Identifier(it) => {
2913 ForStatementInit::Identifier(CloneIn::clone_in_with_semantic_ids(it, allocator))
2914 }
2915 Self::MetaProperty(it) => {
2916 ForStatementInit::MetaProperty(CloneIn::clone_in_with_semantic_ids(it, allocator))
2917 }
2918 Self::Super(it) => {
2919 ForStatementInit::Super(CloneIn::clone_in_with_semantic_ids(it, allocator))
2920 }
2921 Self::ArrayExpression(it) => ForStatementInit::ArrayExpression(
2922 CloneIn::clone_in_with_semantic_ids(it, allocator),
2923 ),
2924 Self::ArrowFunctionExpression(it) => ForStatementInit::ArrowFunctionExpression(
2925 CloneIn::clone_in_with_semantic_ids(it, allocator),
2926 ),
2927 Self::AssignmentExpression(it) => ForStatementInit::AssignmentExpression(
2928 CloneIn::clone_in_with_semantic_ids(it, allocator),
2929 ),
2930 Self::AwaitExpression(it) => ForStatementInit::AwaitExpression(
2931 CloneIn::clone_in_with_semantic_ids(it, allocator),
2932 ),
2933 Self::BinaryExpression(it) => ForStatementInit::BinaryExpression(
2934 CloneIn::clone_in_with_semantic_ids(it, allocator),
2935 ),
2936 Self::CallExpression(it) => {
2937 ForStatementInit::CallExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
2938 }
2939 Self::ChainExpression(it) => ForStatementInit::ChainExpression(
2940 CloneIn::clone_in_with_semantic_ids(it, allocator),
2941 ),
2942 Self::ClassExpression(it) => ForStatementInit::ClassExpression(
2943 CloneIn::clone_in_with_semantic_ids(it, allocator),
2944 ),
2945 Self::ConditionalExpression(it) => ForStatementInit::ConditionalExpression(
2946 CloneIn::clone_in_with_semantic_ids(it, allocator),
2947 ),
2948 Self::FunctionExpression(it) => ForStatementInit::FunctionExpression(
2949 CloneIn::clone_in_with_semantic_ids(it, allocator),
2950 ),
2951 Self::ImportExpression(it) => ForStatementInit::ImportExpression(
2952 CloneIn::clone_in_with_semantic_ids(it, allocator),
2953 ),
2954 Self::LogicalExpression(it) => ForStatementInit::LogicalExpression(
2955 CloneIn::clone_in_with_semantic_ids(it, allocator),
2956 ),
2957 Self::NewExpression(it) => {
2958 ForStatementInit::NewExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
2959 }
2960 Self::ObjectExpression(it) => ForStatementInit::ObjectExpression(
2961 CloneIn::clone_in_with_semantic_ids(it, allocator),
2962 ),
2963 Self::ParenthesizedExpression(it) => ForStatementInit::ParenthesizedExpression(
2964 CloneIn::clone_in_with_semantic_ids(it, allocator),
2965 ),
2966 Self::SequenceExpression(it) => ForStatementInit::SequenceExpression(
2967 CloneIn::clone_in_with_semantic_ids(it, allocator),
2968 ),
2969 Self::TaggedTemplateExpression(it) => ForStatementInit::TaggedTemplateExpression(
2970 CloneIn::clone_in_with_semantic_ids(it, allocator),
2971 ),
2972 Self::ThisExpression(it) => {
2973 ForStatementInit::ThisExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
2974 }
2975 Self::UnaryExpression(it) => ForStatementInit::UnaryExpression(
2976 CloneIn::clone_in_with_semantic_ids(it, allocator),
2977 ),
2978 Self::UpdateExpression(it) => ForStatementInit::UpdateExpression(
2979 CloneIn::clone_in_with_semantic_ids(it, allocator),
2980 ),
2981 Self::YieldExpression(it) => ForStatementInit::YieldExpression(
2982 CloneIn::clone_in_with_semantic_ids(it, allocator),
2983 ),
2984 Self::PrivateInExpression(it) => ForStatementInit::PrivateInExpression(
2985 CloneIn::clone_in_with_semantic_ids(it, allocator),
2986 ),
2987 Self::JSXElement(it) => {
2988 ForStatementInit::JSXElement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2989 }
2990 Self::JSXFragment(it) => {
2991 ForStatementInit::JSXFragment(CloneIn::clone_in_with_semantic_ids(it, allocator))
2992 }
2993 Self::TSAsExpression(it) => {
2994 ForStatementInit::TSAsExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
2995 }
2996 Self::TSSatisfiesExpression(it) => ForStatementInit::TSSatisfiesExpression(
2997 CloneIn::clone_in_with_semantic_ids(it, allocator),
2998 ),
2999 Self::TSTypeAssertion(it) => ForStatementInit::TSTypeAssertion(
3000 CloneIn::clone_in_with_semantic_ids(it, allocator),
3001 ),
3002 Self::TSNonNullExpression(it) => ForStatementInit::TSNonNullExpression(
3003 CloneIn::clone_in_with_semantic_ids(it, allocator),
3004 ),
3005 Self::TSInstantiationExpression(it) => ForStatementInit::TSInstantiationExpression(
3006 CloneIn::clone_in_with_semantic_ids(it, allocator),
3007 ),
3008 Self::V8IntrinsicExpression(it) => ForStatementInit::V8IntrinsicExpression(
3009 CloneIn::clone_in_with_semantic_ids(it, allocator),
3010 ),
3011 Self::ComputedMemberExpression(it) => ForStatementInit::ComputedMemberExpression(
3012 CloneIn::clone_in_with_semantic_ids(it, allocator),
3013 ),
3014 Self::StaticMemberExpression(it) => ForStatementInit::StaticMemberExpression(
3015 CloneIn::clone_in_with_semantic_ids(it, allocator),
3016 ),
3017 Self::PrivateFieldExpression(it) => ForStatementInit::PrivateFieldExpression(
3018 CloneIn::clone_in_with_semantic_ids(it, allocator),
3019 ),
3020 }
3021 }
3022}
3023
3024impl<'new_alloc> CloneIn<'new_alloc> for ForInStatement<'_> {
3025 type Cloned = ForInStatement<'new_alloc>;
3026
3027 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3028 ForInStatement {
3029 span: CloneIn::clone_in(&self.span, allocator),
3030 left: CloneIn::clone_in(&self.left, allocator),
3031 right: CloneIn::clone_in(&self.right, allocator),
3032 body: CloneIn::clone_in(&self.body, allocator),
3033 scope_id: Default::default(),
3034 }
3035 }
3036
3037 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3038 ForInStatement {
3039 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3040 left: CloneIn::clone_in_with_semantic_ids(&self.left, allocator),
3041 right: CloneIn::clone_in_with_semantic_ids(&self.right, allocator),
3042 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
3043 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
3044 }
3045 }
3046}
3047
3048impl<'new_alloc> CloneIn<'new_alloc> for ForStatementLeft<'_> {
3049 type Cloned = ForStatementLeft<'new_alloc>;
3050
3051 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3052 match self {
3053 Self::VariableDeclaration(it) => {
3054 ForStatementLeft::VariableDeclaration(CloneIn::clone_in(it, allocator))
3055 }
3056 Self::AssignmentTargetIdentifier(it) => {
3057 ForStatementLeft::AssignmentTargetIdentifier(CloneIn::clone_in(it, allocator))
3058 }
3059 Self::TSAsExpression(it) => {
3060 ForStatementLeft::TSAsExpression(CloneIn::clone_in(it, allocator))
3061 }
3062 Self::TSSatisfiesExpression(it) => {
3063 ForStatementLeft::TSSatisfiesExpression(CloneIn::clone_in(it, allocator))
3064 }
3065 Self::TSNonNullExpression(it) => {
3066 ForStatementLeft::TSNonNullExpression(CloneIn::clone_in(it, allocator))
3067 }
3068 Self::TSTypeAssertion(it) => {
3069 ForStatementLeft::TSTypeAssertion(CloneIn::clone_in(it, allocator))
3070 }
3071 Self::ComputedMemberExpression(it) => {
3072 ForStatementLeft::ComputedMemberExpression(CloneIn::clone_in(it, allocator))
3073 }
3074 Self::StaticMemberExpression(it) => {
3075 ForStatementLeft::StaticMemberExpression(CloneIn::clone_in(it, allocator))
3076 }
3077 Self::PrivateFieldExpression(it) => {
3078 ForStatementLeft::PrivateFieldExpression(CloneIn::clone_in(it, allocator))
3079 }
3080 Self::ArrayAssignmentTarget(it) => {
3081 ForStatementLeft::ArrayAssignmentTarget(CloneIn::clone_in(it, allocator))
3082 }
3083 Self::ObjectAssignmentTarget(it) => {
3084 ForStatementLeft::ObjectAssignmentTarget(CloneIn::clone_in(it, allocator))
3085 }
3086 }
3087 }
3088
3089 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3090 match self {
3091 Self::VariableDeclaration(it) => ForStatementLeft::VariableDeclaration(
3092 CloneIn::clone_in_with_semantic_ids(it, allocator),
3093 ),
3094 Self::AssignmentTargetIdentifier(it) => ForStatementLeft::AssignmentTargetIdentifier(
3095 CloneIn::clone_in_with_semantic_ids(it, allocator),
3096 ),
3097 Self::TSAsExpression(it) => {
3098 ForStatementLeft::TSAsExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
3099 }
3100 Self::TSSatisfiesExpression(it) => ForStatementLeft::TSSatisfiesExpression(
3101 CloneIn::clone_in_with_semantic_ids(it, allocator),
3102 ),
3103 Self::TSNonNullExpression(it) => ForStatementLeft::TSNonNullExpression(
3104 CloneIn::clone_in_with_semantic_ids(it, allocator),
3105 ),
3106 Self::TSTypeAssertion(it) => ForStatementLeft::TSTypeAssertion(
3107 CloneIn::clone_in_with_semantic_ids(it, allocator),
3108 ),
3109 Self::ComputedMemberExpression(it) => ForStatementLeft::ComputedMemberExpression(
3110 CloneIn::clone_in_with_semantic_ids(it, allocator),
3111 ),
3112 Self::StaticMemberExpression(it) => ForStatementLeft::StaticMemberExpression(
3113 CloneIn::clone_in_with_semantic_ids(it, allocator),
3114 ),
3115 Self::PrivateFieldExpression(it) => ForStatementLeft::PrivateFieldExpression(
3116 CloneIn::clone_in_with_semantic_ids(it, allocator),
3117 ),
3118 Self::ArrayAssignmentTarget(it) => ForStatementLeft::ArrayAssignmentTarget(
3119 CloneIn::clone_in_with_semantic_ids(it, allocator),
3120 ),
3121 Self::ObjectAssignmentTarget(it) => ForStatementLeft::ObjectAssignmentTarget(
3122 CloneIn::clone_in_with_semantic_ids(it, allocator),
3123 ),
3124 }
3125 }
3126}
3127
3128impl<'new_alloc> CloneIn<'new_alloc> for ForOfStatement<'_> {
3129 type Cloned = ForOfStatement<'new_alloc>;
3130
3131 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3132 ForOfStatement {
3133 span: CloneIn::clone_in(&self.span, allocator),
3134 r#await: CloneIn::clone_in(&self.r#await, allocator),
3135 left: CloneIn::clone_in(&self.left, allocator),
3136 right: CloneIn::clone_in(&self.right, allocator),
3137 body: CloneIn::clone_in(&self.body, allocator),
3138 scope_id: Default::default(),
3139 }
3140 }
3141
3142 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3143 ForOfStatement {
3144 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3145 r#await: CloneIn::clone_in_with_semantic_ids(&self.r#await, allocator),
3146 left: CloneIn::clone_in_with_semantic_ids(&self.left, allocator),
3147 right: CloneIn::clone_in_with_semantic_ids(&self.right, allocator),
3148 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
3149 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
3150 }
3151 }
3152}
3153
3154impl<'new_alloc> CloneIn<'new_alloc> for ContinueStatement<'_> {
3155 type Cloned = ContinueStatement<'new_alloc>;
3156
3157 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3158 ContinueStatement {
3159 span: CloneIn::clone_in(&self.span, allocator),
3160 label: CloneIn::clone_in(&self.label, allocator),
3161 }
3162 }
3163
3164 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3165 ContinueStatement {
3166 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3167 label: CloneIn::clone_in_with_semantic_ids(&self.label, allocator),
3168 }
3169 }
3170}
3171
3172impl<'new_alloc> CloneIn<'new_alloc> for BreakStatement<'_> {
3173 type Cloned = BreakStatement<'new_alloc>;
3174
3175 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3176 BreakStatement {
3177 span: CloneIn::clone_in(&self.span, allocator),
3178 label: CloneIn::clone_in(&self.label, allocator),
3179 }
3180 }
3181
3182 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3183 BreakStatement {
3184 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3185 label: CloneIn::clone_in_with_semantic_ids(&self.label, allocator),
3186 }
3187 }
3188}
3189
3190impl<'new_alloc> CloneIn<'new_alloc> for ReturnStatement<'_> {
3191 type Cloned = ReturnStatement<'new_alloc>;
3192
3193 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3194 ReturnStatement {
3195 span: CloneIn::clone_in(&self.span, allocator),
3196 argument: CloneIn::clone_in(&self.argument, allocator),
3197 }
3198 }
3199
3200 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3201 ReturnStatement {
3202 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3203 argument: CloneIn::clone_in_with_semantic_ids(&self.argument, allocator),
3204 }
3205 }
3206}
3207
3208impl<'new_alloc> CloneIn<'new_alloc> for WithStatement<'_> {
3209 type Cloned = WithStatement<'new_alloc>;
3210
3211 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3212 WithStatement {
3213 span: CloneIn::clone_in(&self.span, allocator),
3214 object: CloneIn::clone_in(&self.object, allocator),
3215 body: CloneIn::clone_in(&self.body, allocator),
3216 scope_id: Default::default(),
3217 }
3218 }
3219
3220 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3221 WithStatement {
3222 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3223 object: CloneIn::clone_in_with_semantic_ids(&self.object, allocator),
3224 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
3225 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
3226 }
3227 }
3228}
3229
3230impl<'new_alloc> CloneIn<'new_alloc> for SwitchStatement<'_> {
3231 type Cloned = SwitchStatement<'new_alloc>;
3232
3233 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3234 SwitchStatement {
3235 span: CloneIn::clone_in(&self.span, allocator),
3236 discriminant: CloneIn::clone_in(&self.discriminant, allocator),
3237 cases: CloneIn::clone_in(&self.cases, allocator),
3238 scope_id: Default::default(),
3239 }
3240 }
3241
3242 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3243 SwitchStatement {
3244 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3245 discriminant: CloneIn::clone_in_with_semantic_ids(&self.discriminant, allocator),
3246 cases: CloneIn::clone_in_with_semantic_ids(&self.cases, allocator),
3247 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
3248 }
3249 }
3250}
3251
3252impl<'new_alloc> CloneIn<'new_alloc> for SwitchCase<'_> {
3253 type Cloned = SwitchCase<'new_alloc>;
3254
3255 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3256 SwitchCase {
3257 span: CloneIn::clone_in(&self.span, allocator),
3258 test: CloneIn::clone_in(&self.test, allocator),
3259 consequent: CloneIn::clone_in(&self.consequent, allocator),
3260 }
3261 }
3262
3263 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3264 SwitchCase {
3265 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3266 test: CloneIn::clone_in_with_semantic_ids(&self.test, allocator),
3267 consequent: CloneIn::clone_in_with_semantic_ids(&self.consequent, allocator),
3268 }
3269 }
3270}
3271
3272impl<'new_alloc> CloneIn<'new_alloc> for LabeledStatement<'_> {
3273 type Cloned = LabeledStatement<'new_alloc>;
3274
3275 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3276 LabeledStatement {
3277 span: CloneIn::clone_in(&self.span, allocator),
3278 label: CloneIn::clone_in(&self.label, allocator),
3279 body: CloneIn::clone_in(&self.body, allocator),
3280 }
3281 }
3282
3283 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3284 LabeledStatement {
3285 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3286 label: CloneIn::clone_in_with_semantic_ids(&self.label, allocator),
3287 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
3288 }
3289 }
3290}
3291
3292impl<'new_alloc> CloneIn<'new_alloc> for ThrowStatement<'_> {
3293 type Cloned = ThrowStatement<'new_alloc>;
3294
3295 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3296 ThrowStatement {
3297 span: CloneIn::clone_in(&self.span, allocator),
3298 argument: CloneIn::clone_in(&self.argument, allocator),
3299 }
3300 }
3301
3302 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3303 ThrowStatement {
3304 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3305 argument: CloneIn::clone_in_with_semantic_ids(&self.argument, allocator),
3306 }
3307 }
3308}
3309
3310impl<'new_alloc> CloneIn<'new_alloc> for TryStatement<'_> {
3311 type Cloned = TryStatement<'new_alloc>;
3312
3313 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3314 TryStatement {
3315 span: CloneIn::clone_in(&self.span, allocator),
3316 block: CloneIn::clone_in(&self.block, allocator),
3317 handler: CloneIn::clone_in(&self.handler, allocator),
3318 finalizer: CloneIn::clone_in(&self.finalizer, allocator),
3319 }
3320 }
3321
3322 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3323 TryStatement {
3324 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3325 block: CloneIn::clone_in_with_semantic_ids(&self.block, allocator),
3326 handler: CloneIn::clone_in_with_semantic_ids(&self.handler, allocator),
3327 finalizer: CloneIn::clone_in_with_semantic_ids(&self.finalizer, allocator),
3328 }
3329 }
3330}
3331
3332impl<'new_alloc> CloneIn<'new_alloc> for CatchClause<'_> {
3333 type Cloned = CatchClause<'new_alloc>;
3334
3335 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3336 CatchClause {
3337 span: CloneIn::clone_in(&self.span, allocator),
3338 param: CloneIn::clone_in(&self.param, allocator),
3339 body: CloneIn::clone_in(&self.body, allocator),
3340 scope_id: Default::default(),
3341 }
3342 }
3343
3344 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3345 CatchClause {
3346 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3347 param: CloneIn::clone_in_with_semantic_ids(&self.param, allocator),
3348 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
3349 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
3350 }
3351 }
3352}
3353
3354impl<'new_alloc> CloneIn<'new_alloc> for CatchParameter<'_> {
3355 type Cloned = CatchParameter<'new_alloc>;
3356
3357 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3358 CatchParameter {
3359 span: CloneIn::clone_in(&self.span, allocator),
3360 pattern: CloneIn::clone_in(&self.pattern, allocator),
3361 }
3362 }
3363
3364 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3365 CatchParameter {
3366 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3367 pattern: CloneIn::clone_in_with_semantic_ids(&self.pattern, allocator),
3368 }
3369 }
3370}
3371
3372impl<'new_alloc> CloneIn<'new_alloc> for DebuggerStatement {
3373 type Cloned = DebuggerStatement;
3374
3375 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3376 DebuggerStatement { span: CloneIn::clone_in(&self.span, allocator) }
3377 }
3378
3379 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3380 DebuggerStatement { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
3381 }
3382}
3383
3384impl<'new_alloc> CloneIn<'new_alloc> for BindingPattern<'_> {
3385 type Cloned = BindingPattern<'new_alloc>;
3386
3387 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3388 BindingPattern {
3389 kind: CloneIn::clone_in(&self.kind, allocator),
3390 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
3391 optional: CloneIn::clone_in(&self.optional, allocator),
3392 }
3393 }
3394
3395 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3396 BindingPattern {
3397 kind: CloneIn::clone_in_with_semantic_ids(&self.kind, allocator),
3398 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
3399 optional: CloneIn::clone_in_with_semantic_ids(&self.optional, allocator),
3400 }
3401 }
3402}
3403
3404impl<'new_alloc> CloneIn<'new_alloc> for BindingPatternKind<'_> {
3405 type Cloned = BindingPatternKind<'new_alloc>;
3406
3407 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3408 match self {
3409 Self::BindingIdentifier(it) => {
3410 BindingPatternKind::BindingIdentifier(CloneIn::clone_in(it, allocator))
3411 }
3412 Self::ObjectPattern(it) => {
3413 BindingPatternKind::ObjectPattern(CloneIn::clone_in(it, allocator))
3414 }
3415 Self::ArrayPattern(it) => {
3416 BindingPatternKind::ArrayPattern(CloneIn::clone_in(it, allocator))
3417 }
3418 Self::AssignmentPattern(it) => {
3419 BindingPatternKind::AssignmentPattern(CloneIn::clone_in(it, allocator))
3420 }
3421 }
3422 }
3423
3424 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3425 match self {
3426 Self::BindingIdentifier(it) => BindingPatternKind::BindingIdentifier(
3427 CloneIn::clone_in_with_semantic_ids(it, allocator),
3428 ),
3429 Self::ObjectPattern(it) => BindingPatternKind::ObjectPattern(
3430 CloneIn::clone_in_with_semantic_ids(it, allocator),
3431 ),
3432 Self::ArrayPattern(it) => {
3433 BindingPatternKind::ArrayPattern(CloneIn::clone_in_with_semantic_ids(it, allocator))
3434 }
3435 Self::AssignmentPattern(it) => BindingPatternKind::AssignmentPattern(
3436 CloneIn::clone_in_with_semantic_ids(it, allocator),
3437 ),
3438 }
3439 }
3440}
3441
3442impl<'new_alloc> CloneIn<'new_alloc> for AssignmentPattern<'_> {
3443 type Cloned = AssignmentPattern<'new_alloc>;
3444
3445 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3446 AssignmentPattern {
3447 span: CloneIn::clone_in(&self.span, allocator),
3448 left: CloneIn::clone_in(&self.left, allocator),
3449 right: CloneIn::clone_in(&self.right, allocator),
3450 }
3451 }
3452
3453 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3454 AssignmentPattern {
3455 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3456 left: CloneIn::clone_in_with_semantic_ids(&self.left, allocator),
3457 right: CloneIn::clone_in_with_semantic_ids(&self.right, allocator),
3458 }
3459 }
3460}
3461
3462impl<'new_alloc> CloneIn<'new_alloc> for ObjectPattern<'_> {
3463 type Cloned = ObjectPattern<'new_alloc>;
3464
3465 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3466 ObjectPattern {
3467 span: CloneIn::clone_in(&self.span, allocator),
3468 properties: CloneIn::clone_in(&self.properties, allocator),
3469 rest: CloneIn::clone_in(&self.rest, allocator),
3470 }
3471 }
3472
3473 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3474 ObjectPattern {
3475 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3476 properties: CloneIn::clone_in_with_semantic_ids(&self.properties, allocator),
3477 rest: CloneIn::clone_in_with_semantic_ids(&self.rest, allocator),
3478 }
3479 }
3480}
3481
3482impl<'new_alloc> CloneIn<'new_alloc> for BindingProperty<'_> {
3483 type Cloned = BindingProperty<'new_alloc>;
3484
3485 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3486 BindingProperty {
3487 span: CloneIn::clone_in(&self.span, allocator),
3488 key: CloneIn::clone_in(&self.key, allocator),
3489 value: CloneIn::clone_in(&self.value, allocator),
3490 shorthand: CloneIn::clone_in(&self.shorthand, allocator),
3491 computed: CloneIn::clone_in(&self.computed, allocator),
3492 }
3493 }
3494
3495 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3496 BindingProperty {
3497 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3498 key: CloneIn::clone_in_with_semantic_ids(&self.key, allocator),
3499 value: CloneIn::clone_in_with_semantic_ids(&self.value, allocator),
3500 shorthand: CloneIn::clone_in_with_semantic_ids(&self.shorthand, allocator),
3501 computed: CloneIn::clone_in_with_semantic_ids(&self.computed, allocator),
3502 }
3503 }
3504}
3505
3506impl<'new_alloc> CloneIn<'new_alloc> for ArrayPattern<'_> {
3507 type Cloned = ArrayPattern<'new_alloc>;
3508
3509 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3510 ArrayPattern {
3511 span: CloneIn::clone_in(&self.span, allocator),
3512 elements: CloneIn::clone_in(&self.elements, allocator),
3513 rest: CloneIn::clone_in(&self.rest, allocator),
3514 }
3515 }
3516
3517 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3518 ArrayPattern {
3519 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3520 elements: CloneIn::clone_in_with_semantic_ids(&self.elements, allocator),
3521 rest: CloneIn::clone_in_with_semantic_ids(&self.rest, allocator),
3522 }
3523 }
3524}
3525
3526impl<'new_alloc> CloneIn<'new_alloc> for BindingRestElement<'_> {
3527 type Cloned = BindingRestElement<'new_alloc>;
3528
3529 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3530 BindingRestElement {
3531 span: CloneIn::clone_in(&self.span, allocator),
3532 argument: CloneIn::clone_in(&self.argument, allocator),
3533 }
3534 }
3535
3536 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3537 BindingRestElement {
3538 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3539 argument: CloneIn::clone_in_with_semantic_ids(&self.argument, allocator),
3540 }
3541 }
3542}
3543
3544impl<'new_alloc> CloneIn<'new_alloc> for Function<'_> {
3545 type Cloned = Function<'new_alloc>;
3546
3547 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3548 Function {
3549 span: CloneIn::clone_in(&self.span, allocator),
3550 r#type: CloneIn::clone_in(&self.r#type, allocator),
3551 id: CloneIn::clone_in(&self.id, allocator),
3552 generator: CloneIn::clone_in(&self.generator, allocator),
3553 r#async: CloneIn::clone_in(&self.r#async, allocator),
3554 declare: CloneIn::clone_in(&self.declare, allocator),
3555 type_parameters: CloneIn::clone_in(&self.type_parameters, allocator),
3556 this_param: CloneIn::clone_in(&self.this_param, allocator),
3557 params: CloneIn::clone_in(&self.params, allocator),
3558 return_type: CloneIn::clone_in(&self.return_type, allocator),
3559 body: CloneIn::clone_in(&self.body, allocator),
3560 scope_id: Default::default(),
3561 pure: CloneIn::clone_in(&self.pure, allocator),
3562 pife: CloneIn::clone_in(&self.pife, allocator),
3563 }
3564 }
3565
3566 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3567 Function {
3568 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3569 r#type: CloneIn::clone_in_with_semantic_ids(&self.r#type, allocator),
3570 id: CloneIn::clone_in_with_semantic_ids(&self.id, allocator),
3571 generator: CloneIn::clone_in_with_semantic_ids(&self.generator, allocator),
3572 r#async: CloneIn::clone_in_with_semantic_ids(&self.r#async, allocator),
3573 declare: CloneIn::clone_in_with_semantic_ids(&self.declare, allocator),
3574 type_parameters: CloneIn::clone_in_with_semantic_ids(&self.type_parameters, allocator),
3575 this_param: CloneIn::clone_in_with_semantic_ids(&self.this_param, allocator),
3576 params: CloneIn::clone_in_with_semantic_ids(&self.params, allocator),
3577 return_type: CloneIn::clone_in_with_semantic_ids(&self.return_type, allocator),
3578 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
3579 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
3580 pure: CloneIn::clone_in_with_semantic_ids(&self.pure, allocator),
3581 pife: CloneIn::clone_in_with_semantic_ids(&self.pife, allocator),
3582 }
3583 }
3584}
3585
3586impl<'new_alloc> CloneIn<'new_alloc> for FunctionType {
3587 type Cloned = FunctionType;
3588
3589 #[inline(always)]
3590 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3591 *self
3592 }
3593
3594 #[inline(always)]
3595 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3596 *self
3597 }
3598}
3599
3600impl<'new_alloc> CloneIn<'new_alloc> for FormalParameters<'_> {
3601 type Cloned = FormalParameters<'new_alloc>;
3602
3603 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3604 FormalParameters {
3605 span: CloneIn::clone_in(&self.span, allocator),
3606 kind: CloneIn::clone_in(&self.kind, allocator),
3607 items: CloneIn::clone_in(&self.items, allocator),
3608 rest: CloneIn::clone_in(&self.rest, allocator),
3609 }
3610 }
3611
3612 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3613 FormalParameters {
3614 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3615 kind: CloneIn::clone_in_with_semantic_ids(&self.kind, allocator),
3616 items: CloneIn::clone_in_with_semantic_ids(&self.items, allocator),
3617 rest: CloneIn::clone_in_with_semantic_ids(&self.rest, allocator),
3618 }
3619 }
3620}
3621
3622impl<'new_alloc> CloneIn<'new_alloc> for FormalParameter<'_> {
3623 type Cloned = FormalParameter<'new_alloc>;
3624
3625 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3626 FormalParameter {
3627 span: CloneIn::clone_in(&self.span, allocator),
3628 decorators: CloneIn::clone_in(&self.decorators, allocator),
3629 pattern: CloneIn::clone_in(&self.pattern, allocator),
3630 accessibility: CloneIn::clone_in(&self.accessibility, allocator),
3631 readonly: CloneIn::clone_in(&self.readonly, allocator),
3632 r#override: CloneIn::clone_in(&self.r#override, allocator),
3633 }
3634 }
3635
3636 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3637 FormalParameter {
3638 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3639 decorators: CloneIn::clone_in_with_semantic_ids(&self.decorators, allocator),
3640 pattern: CloneIn::clone_in_with_semantic_ids(&self.pattern, allocator),
3641 accessibility: CloneIn::clone_in_with_semantic_ids(&self.accessibility, allocator),
3642 readonly: CloneIn::clone_in_with_semantic_ids(&self.readonly, allocator),
3643 r#override: CloneIn::clone_in_with_semantic_ids(&self.r#override, allocator),
3644 }
3645 }
3646}
3647
3648impl<'new_alloc> CloneIn<'new_alloc> for FormalParameterKind {
3649 type Cloned = FormalParameterKind;
3650
3651 #[inline(always)]
3652 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3653 *self
3654 }
3655
3656 #[inline(always)]
3657 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3658 *self
3659 }
3660}
3661
3662impl<'new_alloc> CloneIn<'new_alloc> for FunctionBody<'_> {
3663 type Cloned = FunctionBody<'new_alloc>;
3664
3665 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3666 FunctionBody {
3667 span: CloneIn::clone_in(&self.span, allocator),
3668 directives: CloneIn::clone_in(&self.directives, allocator),
3669 statements: CloneIn::clone_in(&self.statements, allocator),
3670 }
3671 }
3672
3673 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3674 FunctionBody {
3675 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3676 directives: CloneIn::clone_in_with_semantic_ids(&self.directives, allocator),
3677 statements: CloneIn::clone_in_with_semantic_ids(&self.statements, allocator),
3678 }
3679 }
3680}
3681
3682impl<'new_alloc> CloneIn<'new_alloc> for ArrowFunctionExpression<'_> {
3683 type Cloned = ArrowFunctionExpression<'new_alloc>;
3684
3685 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3686 ArrowFunctionExpression {
3687 span: CloneIn::clone_in(&self.span, allocator),
3688 expression: CloneIn::clone_in(&self.expression, allocator),
3689 r#async: CloneIn::clone_in(&self.r#async, allocator),
3690 type_parameters: CloneIn::clone_in(&self.type_parameters, allocator),
3691 params: CloneIn::clone_in(&self.params, allocator),
3692 return_type: CloneIn::clone_in(&self.return_type, allocator),
3693 body: CloneIn::clone_in(&self.body, allocator),
3694 scope_id: Default::default(),
3695 pure: CloneIn::clone_in(&self.pure, allocator),
3696 pife: CloneIn::clone_in(&self.pife, allocator),
3697 }
3698 }
3699
3700 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3701 ArrowFunctionExpression {
3702 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3703 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
3704 r#async: CloneIn::clone_in_with_semantic_ids(&self.r#async, allocator),
3705 type_parameters: CloneIn::clone_in_with_semantic_ids(&self.type_parameters, allocator),
3706 params: CloneIn::clone_in_with_semantic_ids(&self.params, allocator),
3707 return_type: CloneIn::clone_in_with_semantic_ids(&self.return_type, allocator),
3708 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
3709 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
3710 pure: CloneIn::clone_in_with_semantic_ids(&self.pure, allocator),
3711 pife: CloneIn::clone_in_with_semantic_ids(&self.pife, allocator),
3712 }
3713 }
3714}
3715
3716impl<'new_alloc> CloneIn<'new_alloc> for YieldExpression<'_> {
3717 type Cloned = YieldExpression<'new_alloc>;
3718
3719 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3720 YieldExpression {
3721 span: CloneIn::clone_in(&self.span, allocator),
3722 delegate: CloneIn::clone_in(&self.delegate, allocator),
3723 argument: CloneIn::clone_in(&self.argument, allocator),
3724 }
3725 }
3726
3727 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3728 YieldExpression {
3729 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3730 delegate: CloneIn::clone_in_with_semantic_ids(&self.delegate, allocator),
3731 argument: CloneIn::clone_in_with_semantic_ids(&self.argument, allocator),
3732 }
3733 }
3734}
3735
3736impl<'new_alloc> CloneIn<'new_alloc> for Class<'_> {
3737 type Cloned = Class<'new_alloc>;
3738
3739 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3740 Class {
3741 span: CloneIn::clone_in(&self.span, allocator),
3742 r#type: CloneIn::clone_in(&self.r#type, allocator),
3743 decorators: CloneIn::clone_in(&self.decorators, allocator),
3744 id: CloneIn::clone_in(&self.id, allocator),
3745 type_parameters: CloneIn::clone_in(&self.type_parameters, allocator),
3746 super_class: CloneIn::clone_in(&self.super_class, allocator),
3747 super_type_arguments: CloneIn::clone_in(&self.super_type_arguments, allocator),
3748 implements: CloneIn::clone_in(&self.implements, allocator),
3749 body: CloneIn::clone_in(&self.body, allocator),
3750 r#abstract: CloneIn::clone_in(&self.r#abstract, allocator),
3751 declare: CloneIn::clone_in(&self.declare, allocator),
3752 scope_id: Default::default(),
3753 }
3754 }
3755
3756 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3757 Class {
3758 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3759 r#type: CloneIn::clone_in_with_semantic_ids(&self.r#type, allocator),
3760 decorators: CloneIn::clone_in_with_semantic_ids(&self.decorators, allocator),
3761 id: CloneIn::clone_in_with_semantic_ids(&self.id, allocator),
3762 type_parameters: CloneIn::clone_in_with_semantic_ids(&self.type_parameters, allocator),
3763 super_class: CloneIn::clone_in_with_semantic_ids(&self.super_class, allocator),
3764 super_type_arguments: CloneIn::clone_in_with_semantic_ids(
3765 &self.super_type_arguments,
3766 allocator,
3767 ),
3768 implements: CloneIn::clone_in_with_semantic_ids(&self.implements, allocator),
3769 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
3770 r#abstract: CloneIn::clone_in_with_semantic_ids(&self.r#abstract, allocator),
3771 declare: CloneIn::clone_in_with_semantic_ids(&self.declare, allocator),
3772 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
3773 }
3774 }
3775}
3776
3777impl<'new_alloc> CloneIn<'new_alloc> for ClassType {
3778 type Cloned = ClassType;
3779
3780 #[inline(always)]
3781 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3782 *self
3783 }
3784
3785 #[inline(always)]
3786 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3787 *self
3788 }
3789}
3790
3791impl<'new_alloc> CloneIn<'new_alloc> for ClassBody<'_> {
3792 type Cloned = ClassBody<'new_alloc>;
3793
3794 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3795 ClassBody {
3796 span: CloneIn::clone_in(&self.span, allocator),
3797 body: CloneIn::clone_in(&self.body, allocator),
3798 }
3799 }
3800
3801 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3802 ClassBody {
3803 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3804 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
3805 }
3806 }
3807}
3808
3809impl<'new_alloc> CloneIn<'new_alloc> for ClassElement<'_> {
3810 type Cloned = ClassElement<'new_alloc>;
3811
3812 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3813 match self {
3814 Self::StaticBlock(it) => ClassElement::StaticBlock(CloneIn::clone_in(it, allocator)),
3815 Self::MethodDefinition(it) => {
3816 ClassElement::MethodDefinition(CloneIn::clone_in(it, allocator))
3817 }
3818 Self::PropertyDefinition(it) => {
3819 ClassElement::PropertyDefinition(CloneIn::clone_in(it, allocator))
3820 }
3821 Self::AccessorProperty(it) => {
3822 ClassElement::AccessorProperty(CloneIn::clone_in(it, allocator))
3823 }
3824 Self::TSIndexSignature(it) => {
3825 ClassElement::TSIndexSignature(CloneIn::clone_in(it, allocator))
3826 }
3827 }
3828 }
3829
3830 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3831 match self {
3832 Self::StaticBlock(it) => {
3833 ClassElement::StaticBlock(CloneIn::clone_in_with_semantic_ids(it, allocator))
3834 }
3835 Self::MethodDefinition(it) => {
3836 ClassElement::MethodDefinition(CloneIn::clone_in_with_semantic_ids(it, allocator))
3837 }
3838 Self::PropertyDefinition(it) => {
3839 ClassElement::PropertyDefinition(CloneIn::clone_in_with_semantic_ids(it, allocator))
3840 }
3841 Self::AccessorProperty(it) => {
3842 ClassElement::AccessorProperty(CloneIn::clone_in_with_semantic_ids(it, allocator))
3843 }
3844 Self::TSIndexSignature(it) => {
3845 ClassElement::TSIndexSignature(CloneIn::clone_in_with_semantic_ids(it, allocator))
3846 }
3847 }
3848 }
3849}
3850
3851impl<'new_alloc> CloneIn<'new_alloc> for MethodDefinition<'_> {
3852 type Cloned = MethodDefinition<'new_alloc>;
3853
3854 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3855 MethodDefinition {
3856 span: CloneIn::clone_in(&self.span, allocator),
3857 r#type: CloneIn::clone_in(&self.r#type, allocator),
3858 decorators: CloneIn::clone_in(&self.decorators, allocator),
3859 key: CloneIn::clone_in(&self.key, allocator),
3860 value: CloneIn::clone_in(&self.value, allocator),
3861 kind: CloneIn::clone_in(&self.kind, allocator),
3862 computed: CloneIn::clone_in(&self.computed, allocator),
3863 r#static: CloneIn::clone_in(&self.r#static, allocator),
3864 r#override: CloneIn::clone_in(&self.r#override, allocator),
3865 optional: CloneIn::clone_in(&self.optional, allocator),
3866 accessibility: CloneIn::clone_in(&self.accessibility, allocator),
3867 }
3868 }
3869
3870 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3871 MethodDefinition {
3872 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3873 r#type: CloneIn::clone_in_with_semantic_ids(&self.r#type, allocator),
3874 decorators: CloneIn::clone_in_with_semantic_ids(&self.decorators, allocator),
3875 key: CloneIn::clone_in_with_semantic_ids(&self.key, allocator),
3876 value: CloneIn::clone_in_with_semantic_ids(&self.value, allocator),
3877 kind: CloneIn::clone_in_with_semantic_ids(&self.kind, allocator),
3878 computed: CloneIn::clone_in_with_semantic_ids(&self.computed, allocator),
3879 r#static: CloneIn::clone_in_with_semantic_ids(&self.r#static, allocator),
3880 r#override: CloneIn::clone_in_with_semantic_ids(&self.r#override, allocator),
3881 optional: CloneIn::clone_in_with_semantic_ids(&self.optional, allocator),
3882 accessibility: CloneIn::clone_in_with_semantic_ids(&self.accessibility, allocator),
3883 }
3884 }
3885}
3886
3887impl<'new_alloc> CloneIn<'new_alloc> for MethodDefinitionType {
3888 type Cloned = MethodDefinitionType;
3889
3890 #[inline(always)]
3891 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3892 *self
3893 }
3894
3895 #[inline(always)]
3896 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3897 *self
3898 }
3899}
3900
3901impl<'new_alloc> CloneIn<'new_alloc> for PropertyDefinition<'_> {
3902 type Cloned = PropertyDefinition<'new_alloc>;
3903
3904 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3905 PropertyDefinition {
3906 span: CloneIn::clone_in(&self.span, allocator),
3907 r#type: CloneIn::clone_in(&self.r#type, allocator),
3908 decorators: CloneIn::clone_in(&self.decorators, allocator),
3909 key: CloneIn::clone_in(&self.key, allocator),
3910 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
3911 value: CloneIn::clone_in(&self.value, allocator),
3912 computed: CloneIn::clone_in(&self.computed, allocator),
3913 r#static: CloneIn::clone_in(&self.r#static, allocator),
3914 declare: CloneIn::clone_in(&self.declare, allocator),
3915 r#override: CloneIn::clone_in(&self.r#override, allocator),
3916 optional: CloneIn::clone_in(&self.optional, allocator),
3917 definite: CloneIn::clone_in(&self.definite, allocator),
3918 readonly: CloneIn::clone_in(&self.readonly, allocator),
3919 accessibility: CloneIn::clone_in(&self.accessibility, allocator),
3920 }
3921 }
3922
3923 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3924 PropertyDefinition {
3925 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3926 r#type: CloneIn::clone_in_with_semantic_ids(&self.r#type, allocator),
3927 decorators: CloneIn::clone_in_with_semantic_ids(&self.decorators, allocator),
3928 key: CloneIn::clone_in_with_semantic_ids(&self.key, allocator),
3929 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
3930 value: CloneIn::clone_in_with_semantic_ids(&self.value, allocator),
3931 computed: CloneIn::clone_in_with_semantic_ids(&self.computed, allocator),
3932 r#static: CloneIn::clone_in_with_semantic_ids(&self.r#static, allocator),
3933 declare: CloneIn::clone_in_with_semantic_ids(&self.declare, allocator),
3934 r#override: CloneIn::clone_in_with_semantic_ids(&self.r#override, allocator),
3935 optional: CloneIn::clone_in_with_semantic_ids(&self.optional, allocator),
3936 definite: CloneIn::clone_in_with_semantic_ids(&self.definite, allocator),
3937 readonly: CloneIn::clone_in_with_semantic_ids(&self.readonly, allocator),
3938 accessibility: CloneIn::clone_in_with_semantic_ids(&self.accessibility, allocator),
3939 }
3940 }
3941}
3942
3943impl<'new_alloc> CloneIn<'new_alloc> for PropertyDefinitionType {
3944 type Cloned = PropertyDefinitionType;
3945
3946 #[inline(always)]
3947 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3948 *self
3949 }
3950
3951 #[inline(always)]
3952 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3953 *self
3954 }
3955}
3956
3957impl<'new_alloc> CloneIn<'new_alloc> for MethodDefinitionKind {
3958 type Cloned = MethodDefinitionKind;
3959
3960 #[inline(always)]
3961 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3962 *self
3963 }
3964
3965 #[inline(always)]
3966 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3967 *self
3968 }
3969}
3970
3971impl<'new_alloc> CloneIn<'new_alloc> for PrivateIdentifier<'_> {
3972 type Cloned = PrivateIdentifier<'new_alloc>;
3973
3974 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3975 PrivateIdentifier {
3976 span: CloneIn::clone_in(&self.span, allocator),
3977 name: CloneIn::clone_in(&self.name, allocator),
3978 }
3979 }
3980
3981 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3982 PrivateIdentifier {
3983 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3984 name: CloneIn::clone_in_with_semantic_ids(&self.name, allocator),
3985 }
3986 }
3987}
3988
3989impl<'new_alloc> CloneIn<'new_alloc> for StaticBlock<'_> {
3990 type Cloned = StaticBlock<'new_alloc>;
3991
3992 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3993 StaticBlock {
3994 span: CloneIn::clone_in(&self.span, allocator),
3995 body: CloneIn::clone_in(&self.body, allocator),
3996 scope_id: Default::default(),
3997 }
3998 }
3999
4000 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4001 StaticBlock {
4002 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4003 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
4004 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
4005 }
4006 }
4007}
4008
4009impl<'new_alloc> CloneIn<'new_alloc> for ModuleDeclaration<'_> {
4010 type Cloned = ModuleDeclaration<'new_alloc>;
4011
4012 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4013 match self {
4014 Self::ImportDeclaration(it) => {
4015 ModuleDeclaration::ImportDeclaration(CloneIn::clone_in(it, allocator))
4016 }
4017 Self::ExportAllDeclaration(it) => {
4018 ModuleDeclaration::ExportAllDeclaration(CloneIn::clone_in(it, allocator))
4019 }
4020 Self::ExportDefaultDeclaration(it) => {
4021 ModuleDeclaration::ExportDefaultDeclaration(CloneIn::clone_in(it, allocator))
4022 }
4023 Self::ExportNamedDeclaration(it) => {
4024 ModuleDeclaration::ExportNamedDeclaration(CloneIn::clone_in(it, allocator))
4025 }
4026 Self::TSExportAssignment(it) => {
4027 ModuleDeclaration::TSExportAssignment(CloneIn::clone_in(it, allocator))
4028 }
4029 Self::TSNamespaceExportDeclaration(it) => {
4030 ModuleDeclaration::TSNamespaceExportDeclaration(CloneIn::clone_in(it, allocator))
4031 }
4032 }
4033 }
4034
4035 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4036 match self {
4037 Self::ImportDeclaration(it) => ModuleDeclaration::ImportDeclaration(
4038 CloneIn::clone_in_with_semantic_ids(it, allocator),
4039 ),
4040 Self::ExportAllDeclaration(it) => ModuleDeclaration::ExportAllDeclaration(
4041 CloneIn::clone_in_with_semantic_ids(it, allocator),
4042 ),
4043 Self::ExportDefaultDeclaration(it) => ModuleDeclaration::ExportDefaultDeclaration(
4044 CloneIn::clone_in_with_semantic_ids(it, allocator),
4045 ),
4046 Self::ExportNamedDeclaration(it) => ModuleDeclaration::ExportNamedDeclaration(
4047 CloneIn::clone_in_with_semantic_ids(it, allocator),
4048 ),
4049 Self::TSExportAssignment(it) => ModuleDeclaration::TSExportAssignment(
4050 CloneIn::clone_in_with_semantic_ids(it, allocator),
4051 ),
4052 Self::TSNamespaceExportDeclaration(it) => {
4053 ModuleDeclaration::TSNamespaceExportDeclaration(
4054 CloneIn::clone_in_with_semantic_ids(it, allocator),
4055 )
4056 }
4057 }
4058 }
4059}
4060
4061impl<'new_alloc> CloneIn<'new_alloc> for AccessorPropertyType {
4062 type Cloned = AccessorPropertyType;
4063
4064 #[inline(always)]
4065 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4066 *self
4067 }
4068
4069 #[inline(always)]
4070 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4071 *self
4072 }
4073}
4074
4075impl<'new_alloc> CloneIn<'new_alloc> for AccessorProperty<'_> {
4076 type Cloned = AccessorProperty<'new_alloc>;
4077
4078 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4079 AccessorProperty {
4080 span: CloneIn::clone_in(&self.span, allocator),
4081 r#type: CloneIn::clone_in(&self.r#type, allocator),
4082 decorators: CloneIn::clone_in(&self.decorators, allocator),
4083 key: CloneIn::clone_in(&self.key, allocator),
4084 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
4085 value: CloneIn::clone_in(&self.value, allocator),
4086 computed: CloneIn::clone_in(&self.computed, allocator),
4087 r#static: CloneIn::clone_in(&self.r#static, allocator),
4088 r#override: CloneIn::clone_in(&self.r#override, allocator),
4089 definite: CloneIn::clone_in(&self.definite, allocator),
4090 accessibility: CloneIn::clone_in(&self.accessibility, allocator),
4091 }
4092 }
4093
4094 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4095 AccessorProperty {
4096 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4097 r#type: CloneIn::clone_in_with_semantic_ids(&self.r#type, allocator),
4098 decorators: CloneIn::clone_in_with_semantic_ids(&self.decorators, allocator),
4099 key: CloneIn::clone_in_with_semantic_ids(&self.key, allocator),
4100 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
4101 value: CloneIn::clone_in_with_semantic_ids(&self.value, allocator),
4102 computed: CloneIn::clone_in_with_semantic_ids(&self.computed, allocator),
4103 r#static: CloneIn::clone_in_with_semantic_ids(&self.r#static, allocator),
4104 r#override: CloneIn::clone_in_with_semantic_ids(&self.r#override, allocator),
4105 definite: CloneIn::clone_in_with_semantic_ids(&self.definite, allocator),
4106 accessibility: CloneIn::clone_in_with_semantic_ids(&self.accessibility, allocator),
4107 }
4108 }
4109}
4110
4111impl<'new_alloc> CloneIn<'new_alloc> for ImportExpression<'_> {
4112 type Cloned = ImportExpression<'new_alloc>;
4113
4114 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4115 ImportExpression {
4116 span: CloneIn::clone_in(&self.span, allocator),
4117 source: CloneIn::clone_in(&self.source, allocator),
4118 options: CloneIn::clone_in(&self.options, allocator),
4119 phase: CloneIn::clone_in(&self.phase, allocator),
4120 }
4121 }
4122
4123 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4124 ImportExpression {
4125 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4126 source: CloneIn::clone_in_with_semantic_ids(&self.source, allocator),
4127 options: CloneIn::clone_in_with_semantic_ids(&self.options, allocator),
4128 phase: CloneIn::clone_in_with_semantic_ids(&self.phase, allocator),
4129 }
4130 }
4131}
4132
4133impl<'new_alloc> CloneIn<'new_alloc> for ImportDeclaration<'_> {
4134 type Cloned = ImportDeclaration<'new_alloc>;
4135
4136 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4137 ImportDeclaration {
4138 span: CloneIn::clone_in(&self.span, allocator),
4139 specifiers: CloneIn::clone_in(&self.specifiers, allocator),
4140 source: CloneIn::clone_in(&self.source, allocator),
4141 phase: CloneIn::clone_in(&self.phase, allocator),
4142 with_clause: CloneIn::clone_in(&self.with_clause, allocator),
4143 import_kind: CloneIn::clone_in(&self.import_kind, allocator),
4144 }
4145 }
4146
4147 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4148 ImportDeclaration {
4149 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4150 specifiers: CloneIn::clone_in_with_semantic_ids(&self.specifiers, allocator),
4151 source: CloneIn::clone_in_with_semantic_ids(&self.source, allocator),
4152 phase: CloneIn::clone_in_with_semantic_ids(&self.phase, allocator),
4153 with_clause: CloneIn::clone_in_with_semantic_ids(&self.with_clause, allocator),
4154 import_kind: CloneIn::clone_in_with_semantic_ids(&self.import_kind, allocator),
4155 }
4156 }
4157}
4158
4159impl<'new_alloc> CloneIn<'new_alloc> for ImportPhase {
4160 type Cloned = ImportPhase;
4161
4162 #[inline(always)]
4163 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4164 *self
4165 }
4166
4167 #[inline(always)]
4168 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4169 *self
4170 }
4171}
4172
4173impl<'new_alloc> CloneIn<'new_alloc> for ImportDeclarationSpecifier<'_> {
4174 type Cloned = ImportDeclarationSpecifier<'new_alloc>;
4175
4176 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4177 match self {
4178 Self::ImportSpecifier(it) => {
4179 ImportDeclarationSpecifier::ImportSpecifier(CloneIn::clone_in(it, allocator))
4180 }
4181 Self::ImportDefaultSpecifier(it) => {
4182 ImportDeclarationSpecifier::ImportDefaultSpecifier(CloneIn::clone_in(it, allocator))
4183 }
4184 Self::ImportNamespaceSpecifier(it) => {
4185 ImportDeclarationSpecifier::ImportNamespaceSpecifier(CloneIn::clone_in(
4186 it, allocator,
4187 ))
4188 }
4189 }
4190 }
4191
4192 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4193 match self {
4194 Self::ImportSpecifier(it) => ImportDeclarationSpecifier::ImportSpecifier(
4195 CloneIn::clone_in_with_semantic_ids(it, allocator),
4196 ),
4197 Self::ImportDefaultSpecifier(it) => ImportDeclarationSpecifier::ImportDefaultSpecifier(
4198 CloneIn::clone_in_with_semantic_ids(it, allocator),
4199 ),
4200 Self::ImportNamespaceSpecifier(it) => {
4201 ImportDeclarationSpecifier::ImportNamespaceSpecifier(
4202 CloneIn::clone_in_with_semantic_ids(it, allocator),
4203 )
4204 }
4205 }
4206 }
4207}
4208
4209impl<'new_alloc> CloneIn<'new_alloc> for ImportSpecifier<'_> {
4210 type Cloned = ImportSpecifier<'new_alloc>;
4211
4212 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4213 ImportSpecifier {
4214 span: CloneIn::clone_in(&self.span, allocator),
4215 imported: CloneIn::clone_in(&self.imported, allocator),
4216 local: CloneIn::clone_in(&self.local, allocator),
4217 import_kind: CloneIn::clone_in(&self.import_kind, allocator),
4218 }
4219 }
4220
4221 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4222 ImportSpecifier {
4223 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4224 imported: CloneIn::clone_in_with_semantic_ids(&self.imported, allocator),
4225 local: CloneIn::clone_in_with_semantic_ids(&self.local, allocator),
4226 import_kind: CloneIn::clone_in_with_semantic_ids(&self.import_kind, allocator),
4227 }
4228 }
4229}
4230
4231impl<'new_alloc> CloneIn<'new_alloc> for ImportDefaultSpecifier<'_> {
4232 type Cloned = ImportDefaultSpecifier<'new_alloc>;
4233
4234 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4235 ImportDefaultSpecifier {
4236 span: CloneIn::clone_in(&self.span, allocator),
4237 local: CloneIn::clone_in(&self.local, allocator),
4238 }
4239 }
4240
4241 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4242 ImportDefaultSpecifier {
4243 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4244 local: CloneIn::clone_in_with_semantic_ids(&self.local, allocator),
4245 }
4246 }
4247}
4248
4249impl<'new_alloc> CloneIn<'new_alloc> for ImportNamespaceSpecifier<'_> {
4250 type Cloned = ImportNamespaceSpecifier<'new_alloc>;
4251
4252 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4253 ImportNamespaceSpecifier {
4254 span: CloneIn::clone_in(&self.span, allocator),
4255 local: CloneIn::clone_in(&self.local, allocator),
4256 }
4257 }
4258
4259 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4260 ImportNamespaceSpecifier {
4261 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4262 local: CloneIn::clone_in_with_semantic_ids(&self.local, allocator),
4263 }
4264 }
4265}
4266
4267impl<'new_alloc> CloneIn<'new_alloc> for WithClause<'_> {
4268 type Cloned = WithClause<'new_alloc>;
4269
4270 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4271 WithClause {
4272 span: CloneIn::clone_in(&self.span, allocator),
4273 keyword: CloneIn::clone_in(&self.keyword, allocator),
4274 with_entries: CloneIn::clone_in(&self.with_entries, allocator),
4275 }
4276 }
4277
4278 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4279 WithClause {
4280 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4281 keyword: CloneIn::clone_in_with_semantic_ids(&self.keyword, allocator),
4282 with_entries: CloneIn::clone_in_with_semantic_ids(&self.with_entries, allocator),
4283 }
4284 }
4285}
4286
4287impl<'new_alloc> CloneIn<'new_alloc> for WithClauseKeyword {
4288 type Cloned = WithClauseKeyword;
4289
4290 #[inline(always)]
4291 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4292 *self
4293 }
4294
4295 #[inline(always)]
4296 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4297 *self
4298 }
4299}
4300
4301impl<'new_alloc> CloneIn<'new_alloc> for ImportAttribute<'_> {
4302 type Cloned = ImportAttribute<'new_alloc>;
4303
4304 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4305 ImportAttribute {
4306 span: CloneIn::clone_in(&self.span, allocator),
4307 key: CloneIn::clone_in(&self.key, allocator),
4308 value: CloneIn::clone_in(&self.value, allocator),
4309 }
4310 }
4311
4312 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4313 ImportAttribute {
4314 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4315 key: CloneIn::clone_in_with_semantic_ids(&self.key, allocator),
4316 value: CloneIn::clone_in_with_semantic_ids(&self.value, allocator),
4317 }
4318 }
4319}
4320
4321impl<'new_alloc> CloneIn<'new_alloc> for ImportAttributeKey<'_> {
4322 type Cloned = ImportAttributeKey<'new_alloc>;
4323
4324 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4325 match self {
4326 Self::Identifier(it) => {
4327 ImportAttributeKey::Identifier(CloneIn::clone_in(it, allocator))
4328 }
4329 Self::StringLiteral(it) => {
4330 ImportAttributeKey::StringLiteral(CloneIn::clone_in(it, allocator))
4331 }
4332 }
4333 }
4334
4335 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4336 match self {
4337 Self::Identifier(it) => {
4338 ImportAttributeKey::Identifier(CloneIn::clone_in_with_semantic_ids(it, allocator))
4339 }
4340 Self::StringLiteral(it) => ImportAttributeKey::StringLiteral(
4341 CloneIn::clone_in_with_semantic_ids(it, allocator),
4342 ),
4343 }
4344 }
4345}
4346
4347impl<'new_alloc> CloneIn<'new_alloc> for ExportNamedDeclaration<'_> {
4348 type Cloned = ExportNamedDeclaration<'new_alloc>;
4349
4350 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4351 ExportNamedDeclaration {
4352 span: CloneIn::clone_in(&self.span, allocator),
4353 declaration: CloneIn::clone_in(&self.declaration, allocator),
4354 specifiers: CloneIn::clone_in(&self.specifiers, allocator),
4355 source: CloneIn::clone_in(&self.source, allocator),
4356 export_kind: CloneIn::clone_in(&self.export_kind, allocator),
4357 with_clause: CloneIn::clone_in(&self.with_clause, allocator),
4358 }
4359 }
4360
4361 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4362 ExportNamedDeclaration {
4363 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4364 declaration: CloneIn::clone_in_with_semantic_ids(&self.declaration, allocator),
4365 specifiers: CloneIn::clone_in_with_semantic_ids(&self.specifiers, allocator),
4366 source: CloneIn::clone_in_with_semantic_ids(&self.source, allocator),
4367 export_kind: CloneIn::clone_in_with_semantic_ids(&self.export_kind, allocator),
4368 with_clause: CloneIn::clone_in_with_semantic_ids(&self.with_clause, allocator),
4369 }
4370 }
4371}
4372
4373impl<'new_alloc> CloneIn<'new_alloc> for ExportDefaultDeclaration<'_> {
4374 type Cloned = ExportDefaultDeclaration<'new_alloc>;
4375
4376 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4377 ExportDefaultDeclaration {
4378 span: CloneIn::clone_in(&self.span, allocator),
4379 declaration: CloneIn::clone_in(&self.declaration, allocator),
4380 }
4381 }
4382
4383 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4384 ExportDefaultDeclaration {
4385 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4386 declaration: CloneIn::clone_in_with_semantic_ids(&self.declaration, allocator),
4387 }
4388 }
4389}
4390
4391impl<'new_alloc> CloneIn<'new_alloc> for ExportAllDeclaration<'_> {
4392 type Cloned = ExportAllDeclaration<'new_alloc>;
4393
4394 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4395 ExportAllDeclaration {
4396 span: CloneIn::clone_in(&self.span, allocator),
4397 exported: CloneIn::clone_in(&self.exported, allocator),
4398 source: CloneIn::clone_in(&self.source, allocator),
4399 with_clause: CloneIn::clone_in(&self.with_clause, allocator),
4400 export_kind: CloneIn::clone_in(&self.export_kind, allocator),
4401 }
4402 }
4403
4404 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4405 ExportAllDeclaration {
4406 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4407 exported: CloneIn::clone_in_with_semantic_ids(&self.exported, allocator),
4408 source: CloneIn::clone_in_with_semantic_ids(&self.source, allocator),
4409 with_clause: CloneIn::clone_in_with_semantic_ids(&self.with_clause, allocator),
4410 export_kind: CloneIn::clone_in_with_semantic_ids(&self.export_kind, allocator),
4411 }
4412 }
4413}
4414
4415impl<'new_alloc> CloneIn<'new_alloc> for ExportSpecifier<'_> {
4416 type Cloned = ExportSpecifier<'new_alloc>;
4417
4418 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4419 ExportSpecifier {
4420 span: CloneIn::clone_in(&self.span, allocator),
4421 local: CloneIn::clone_in(&self.local, allocator),
4422 exported: CloneIn::clone_in(&self.exported, allocator),
4423 export_kind: CloneIn::clone_in(&self.export_kind, allocator),
4424 }
4425 }
4426
4427 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4428 ExportSpecifier {
4429 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4430 local: CloneIn::clone_in_with_semantic_ids(&self.local, allocator),
4431 exported: CloneIn::clone_in_with_semantic_ids(&self.exported, allocator),
4432 export_kind: CloneIn::clone_in_with_semantic_ids(&self.export_kind, allocator),
4433 }
4434 }
4435}
4436
4437impl<'new_alloc> CloneIn<'new_alloc> for ExportDefaultDeclarationKind<'_> {
4438 type Cloned = ExportDefaultDeclarationKind<'new_alloc>;
4439
4440 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4441 match self {
4442 Self::FunctionDeclaration(it) => {
4443 ExportDefaultDeclarationKind::FunctionDeclaration(CloneIn::clone_in(it, allocator))
4444 }
4445 Self::ClassDeclaration(it) => {
4446 ExportDefaultDeclarationKind::ClassDeclaration(CloneIn::clone_in(it, allocator))
4447 }
4448 Self::TSInterfaceDeclaration(it) => {
4449 ExportDefaultDeclarationKind::TSInterfaceDeclaration(CloneIn::clone_in(
4450 it, allocator,
4451 ))
4452 }
4453 Self::BooleanLiteral(it) => {
4454 ExportDefaultDeclarationKind::BooleanLiteral(CloneIn::clone_in(it, allocator))
4455 }
4456 Self::NullLiteral(it) => {
4457 ExportDefaultDeclarationKind::NullLiteral(CloneIn::clone_in(it, allocator))
4458 }
4459 Self::NumericLiteral(it) => {
4460 ExportDefaultDeclarationKind::NumericLiteral(CloneIn::clone_in(it, allocator))
4461 }
4462 Self::BigIntLiteral(it) => {
4463 ExportDefaultDeclarationKind::BigIntLiteral(CloneIn::clone_in(it, allocator))
4464 }
4465 Self::RegExpLiteral(it) => {
4466 ExportDefaultDeclarationKind::RegExpLiteral(CloneIn::clone_in(it, allocator))
4467 }
4468 Self::StringLiteral(it) => {
4469 ExportDefaultDeclarationKind::StringLiteral(CloneIn::clone_in(it, allocator))
4470 }
4471 Self::TemplateLiteral(it) => {
4472 ExportDefaultDeclarationKind::TemplateLiteral(CloneIn::clone_in(it, allocator))
4473 }
4474 Self::Identifier(it) => {
4475 ExportDefaultDeclarationKind::Identifier(CloneIn::clone_in(it, allocator))
4476 }
4477 Self::MetaProperty(it) => {
4478 ExportDefaultDeclarationKind::MetaProperty(CloneIn::clone_in(it, allocator))
4479 }
4480 Self::Super(it) => {
4481 ExportDefaultDeclarationKind::Super(CloneIn::clone_in(it, allocator))
4482 }
4483 Self::ArrayExpression(it) => {
4484 ExportDefaultDeclarationKind::ArrayExpression(CloneIn::clone_in(it, allocator))
4485 }
4486 Self::ArrowFunctionExpression(it) => {
4487 ExportDefaultDeclarationKind::ArrowFunctionExpression(CloneIn::clone_in(
4488 it, allocator,
4489 ))
4490 }
4491 Self::AssignmentExpression(it) => {
4492 ExportDefaultDeclarationKind::AssignmentExpression(CloneIn::clone_in(it, allocator))
4493 }
4494 Self::AwaitExpression(it) => {
4495 ExportDefaultDeclarationKind::AwaitExpression(CloneIn::clone_in(it, allocator))
4496 }
4497 Self::BinaryExpression(it) => {
4498 ExportDefaultDeclarationKind::BinaryExpression(CloneIn::clone_in(it, allocator))
4499 }
4500 Self::CallExpression(it) => {
4501 ExportDefaultDeclarationKind::CallExpression(CloneIn::clone_in(it, allocator))
4502 }
4503 Self::ChainExpression(it) => {
4504 ExportDefaultDeclarationKind::ChainExpression(CloneIn::clone_in(it, allocator))
4505 }
4506 Self::ClassExpression(it) => {
4507 ExportDefaultDeclarationKind::ClassExpression(CloneIn::clone_in(it, allocator))
4508 }
4509 Self::ConditionalExpression(it) => ExportDefaultDeclarationKind::ConditionalExpression(
4510 CloneIn::clone_in(it, allocator),
4511 ),
4512 Self::FunctionExpression(it) => {
4513 ExportDefaultDeclarationKind::FunctionExpression(CloneIn::clone_in(it, allocator))
4514 }
4515 Self::ImportExpression(it) => {
4516 ExportDefaultDeclarationKind::ImportExpression(CloneIn::clone_in(it, allocator))
4517 }
4518 Self::LogicalExpression(it) => {
4519 ExportDefaultDeclarationKind::LogicalExpression(CloneIn::clone_in(it, allocator))
4520 }
4521 Self::NewExpression(it) => {
4522 ExportDefaultDeclarationKind::NewExpression(CloneIn::clone_in(it, allocator))
4523 }
4524 Self::ObjectExpression(it) => {
4525 ExportDefaultDeclarationKind::ObjectExpression(CloneIn::clone_in(it, allocator))
4526 }
4527 Self::ParenthesizedExpression(it) => {
4528 ExportDefaultDeclarationKind::ParenthesizedExpression(CloneIn::clone_in(
4529 it, allocator,
4530 ))
4531 }
4532 Self::SequenceExpression(it) => {
4533 ExportDefaultDeclarationKind::SequenceExpression(CloneIn::clone_in(it, allocator))
4534 }
4535 Self::TaggedTemplateExpression(it) => {
4536 ExportDefaultDeclarationKind::TaggedTemplateExpression(CloneIn::clone_in(
4537 it, allocator,
4538 ))
4539 }
4540 Self::ThisExpression(it) => {
4541 ExportDefaultDeclarationKind::ThisExpression(CloneIn::clone_in(it, allocator))
4542 }
4543 Self::UnaryExpression(it) => {
4544 ExportDefaultDeclarationKind::UnaryExpression(CloneIn::clone_in(it, allocator))
4545 }
4546 Self::UpdateExpression(it) => {
4547 ExportDefaultDeclarationKind::UpdateExpression(CloneIn::clone_in(it, allocator))
4548 }
4549 Self::YieldExpression(it) => {
4550 ExportDefaultDeclarationKind::YieldExpression(CloneIn::clone_in(it, allocator))
4551 }
4552 Self::PrivateInExpression(it) => {
4553 ExportDefaultDeclarationKind::PrivateInExpression(CloneIn::clone_in(it, allocator))
4554 }
4555 Self::JSXElement(it) => {
4556 ExportDefaultDeclarationKind::JSXElement(CloneIn::clone_in(it, allocator))
4557 }
4558 Self::JSXFragment(it) => {
4559 ExportDefaultDeclarationKind::JSXFragment(CloneIn::clone_in(it, allocator))
4560 }
4561 Self::TSAsExpression(it) => {
4562 ExportDefaultDeclarationKind::TSAsExpression(CloneIn::clone_in(it, allocator))
4563 }
4564 Self::TSSatisfiesExpression(it) => ExportDefaultDeclarationKind::TSSatisfiesExpression(
4565 CloneIn::clone_in(it, allocator),
4566 ),
4567 Self::TSTypeAssertion(it) => {
4568 ExportDefaultDeclarationKind::TSTypeAssertion(CloneIn::clone_in(it, allocator))
4569 }
4570 Self::TSNonNullExpression(it) => {
4571 ExportDefaultDeclarationKind::TSNonNullExpression(CloneIn::clone_in(it, allocator))
4572 }
4573 Self::TSInstantiationExpression(it) => {
4574 ExportDefaultDeclarationKind::TSInstantiationExpression(CloneIn::clone_in(
4575 it, allocator,
4576 ))
4577 }
4578 Self::V8IntrinsicExpression(it) => ExportDefaultDeclarationKind::V8IntrinsicExpression(
4579 CloneIn::clone_in(it, allocator),
4580 ),
4581 Self::ComputedMemberExpression(it) => {
4582 ExportDefaultDeclarationKind::ComputedMemberExpression(CloneIn::clone_in(
4583 it, allocator,
4584 ))
4585 }
4586 Self::StaticMemberExpression(it) => {
4587 ExportDefaultDeclarationKind::StaticMemberExpression(CloneIn::clone_in(
4588 it, allocator,
4589 ))
4590 }
4591 Self::PrivateFieldExpression(it) => {
4592 ExportDefaultDeclarationKind::PrivateFieldExpression(CloneIn::clone_in(
4593 it, allocator,
4594 ))
4595 }
4596 }
4597 }
4598
4599 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4600 match self {
4601 Self::FunctionDeclaration(it) => ExportDefaultDeclarationKind::FunctionDeclaration(
4602 CloneIn::clone_in_with_semantic_ids(it, allocator),
4603 ),
4604 Self::ClassDeclaration(it) => ExportDefaultDeclarationKind::ClassDeclaration(
4605 CloneIn::clone_in_with_semantic_ids(it, allocator),
4606 ),
4607 Self::TSInterfaceDeclaration(it) => {
4608 ExportDefaultDeclarationKind::TSInterfaceDeclaration(
4609 CloneIn::clone_in_with_semantic_ids(it, allocator),
4610 )
4611 }
4612 Self::BooleanLiteral(it) => ExportDefaultDeclarationKind::BooleanLiteral(
4613 CloneIn::clone_in_with_semantic_ids(it, allocator),
4614 ),
4615 Self::NullLiteral(it) => ExportDefaultDeclarationKind::NullLiteral(
4616 CloneIn::clone_in_with_semantic_ids(it, allocator),
4617 ),
4618 Self::NumericLiteral(it) => ExportDefaultDeclarationKind::NumericLiteral(
4619 CloneIn::clone_in_with_semantic_ids(it, allocator),
4620 ),
4621 Self::BigIntLiteral(it) => ExportDefaultDeclarationKind::BigIntLiteral(
4622 CloneIn::clone_in_with_semantic_ids(it, allocator),
4623 ),
4624 Self::RegExpLiteral(it) => ExportDefaultDeclarationKind::RegExpLiteral(
4625 CloneIn::clone_in_with_semantic_ids(it, allocator),
4626 ),
4627 Self::StringLiteral(it) => ExportDefaultDeclarationKind::StringLiteral(
4628 CloneIn::clone_in_with_semantic_ids(it, allocator),
4629 ),
4630 Self::TemplateLiteral(it) => ExportDefaultDeclarationKind::TemplateLiteral(
4631 CloneIn::clone_in_with_semantic_ids(it, allocator),
4632 ),
4633 Self::Identifier(it) => ExportDefaultDeclarationKind::Identifier(
4634 CloneIn::clone_in_with_semantic_ids(it, allocator),
4635 ),
4636 Self::MetaProperty(it) => ExportDefaultDeclarationKind::MetaProperty(
4637 CloneIn::clone_in_with_semantic_ids(it, allocator),
4638 ),
4639 Self::Super(it) => ExportDefaultDeclarationKind::Super(
4640 CloneIn::clone_in_with_semantic_ids(it, allocator),
4641 ),
4642 Self::ArrayExpression(it) => ExportDefaultDeclarationKind::ArrayExpression(
4643 CloneIn::clone_in_with_semantic_ids(it, allocator),
4644 ),
4645 Self::ArrowFunctionExpression(it) => {
4646 ExportDefaultDeclarationKind::ArrowFunctionExpression(
4647 CloneIn::clone_in_with_semantic_ids(it, allocator),
4648 )
4649 }
4650 Self::AssignmentExpression(it) => ExportDefaultDeclarationKind::AssignmentExpression(
4651 CloneIn::clone_in_with_semantic_ids(it, allocator),
4652 ),
4653 Self::AwaitExpression(it) => ExportDefaultDeclarationKind::AwaitExpression(
4654 CloneIn::clone_in_with_semantic_ids(it, allocator),
4655 ),
4656 Self::BinaryExpression(it) => ExportDefaultDeclarationKind::BinaryExpression(
4657 CloneIn::clone_in_with_semantic_ids(it, allocator),
4658 ),
4659 Self::CallExpression(it) => ExportDefaultDeclarationKind::CallExpression(
4660 CloneIn::clone_in_with_semantic_ids(it, allocator),
4661 ),
4662 Self::ChainExpression(it) => ExportDefaultDeclarationKind::ChainExpression(
4663 CloneIn::clone_in_with_semantic_ids(it, allocator),
4664 ),
4665 Self::ClassExpression(it) => ExportDefaultDeclarationKind::ClassExpression(
4666 CloneIn::clone_in_with_semantic_ids(it, allocator),
4667 ),
4668 Self::ConditionalExpression(it) => ExportDefaultDeclarationKind::ConditionalExpression(
4669 CloneIn::clone_in_with_semantic_ids(it, allocator),
4670 ),
4671 Self::FunctionExpression(it) => ExportDefaultDeclarationKind::FunctionExpression(
4672 CloneIn::clone_in_with_semantic_ids(it, allocator),
4673 ),
4674 Self::ImportExpression(it) => ExportDefaultDeclarationKind::ImportExpression(
4675 CloneIn::clone_in_with_semantic_ids(it, allocator),
4676 ),
4677 Self::LogicalExpression(it) => ExportDefaultDeclarationKind::LogicalExpression(
4678 CloneIn::clone_in_with_semantic_ids(it, allocator),
4679 ),
4680 Self::NewExpression(it) => ExportDefaultDeclarationKind::NewExpression(
4681 CloneIn::clone_in_with_semantic_ids(it, allocator),
4682 ),
4683 Self::ObjectExpression(it) => ExportDefaultDeclarationKind::ObjectExpression(
4684 CloneIn::clone_in_with_semantic_ids(it, allocator),
4685 ),
4686 Self::ParenthesizedExpression(it) => {
4687 ExportDefaultDeclarationKind::ParenthesizedExpression(
4688 CloneIn::clone_in_with_semantic_ids(it, allocator),
4689 )
4690 }
4691 Self::SequenceExpression(it) => ExportDefaultDeclarationKind::SequenceExpression(
4692 CloneIn::clone_in_with_semantic_ids(it, allocator),
4693 ),
4694 Self::TaggedTemplateExpression(it) => {
4695 ExportDefaultDeclarationKind::TaggedTemplateExpression(
4696 CloneIn::clone_in_with_semantic_ids(it, allocator),
4697 )
4698 }
4699 Self::ThisExpression(it) => ExportDefaultDeclarationKind::ThisExpression(
4700 CloneIn::clone_in_with_semantic_ids(it, allocator),
4701 ),
4702 Self::UnaryExpression(it) => ExportDefaultDeclarationKind::UnaryExpression(
4703 CloneIn::clone_in_with_semantic_ids(it, allocator),
4704 ),
4705 Self::UpdateExpression(it) => ExportDefaultDeclarationKind::UpdateExpression(
4706 CloneIn::clone_in_with_semantic_ids(it, allocator),
4707 ),
4708 Self::YieldExpression(it) => ExportDefaultDeclarationKind::YieldExpression(
4709 CloneIn::clone_in_with_semantic_ids(it, allocator),
4710 ),
4711 Self::PrivateInExpression(it) => ExportDefaultDeclarationKind::PrivateInExpression(
4712 CloneIn::clone_in_with_semantic_ids(it, allocator),
4713 ),
4714 Self::JSXElement(it) => ExportDefaultDeclarationKind::JSXElement(
4715 CloneIn::clone_in_with_semantic_ids(it, allocator),
4716 ),
4717 Self::JSXFragment(it) => ExportDefaultDeclarationKind::JSXFragment(
4718 CloneIn::clone_in_with_semantic_ids(it, allocator),
4719 ),
4720 Self::TSAsExpression(it) => ExportDefaultDeclarationKind::TSAsExpression(
4721 CloneIn::clone_in_with_semantic_ids(it, allocator),
4722 ),
4723 Self::TSSatisfiesExpression(it) => ExportDefaultDeclarationKind::TSSatisfiesExpression(
4724 CloneIn::clone_in_with_semantic_ids(it, allocator),
4725 ),
4726 Self::TSTypeAssertion(it) => ExportDefaultDeclarationKind::TSTypeAssertion(
4727 CloneIn::clone_in_with_semantic_ids(it, allocator),
4728 ),
4729 Self::TSNonNullExpression(it) => ExportDefaultDeclarationKind::TSNonNullExpression(
4730 CloneIn::clone_in_with_semantic_ids(it, allocator),
4731 ),
4732 Self::TSInstantiationExpression(it) => {
4733 ExportDefaultDeclarationKind::TSInstantiationExpression(
4734 CloneIn::clone_in_with_semantic_ids(it, allocator),
4735 )
4736 }
4737 Self::V8IntrinsicExpression(it) => ExportDefaultDeclarationKind::V8IntrinsicExpression(
4738 CloneIn::clone_in_with_semantic_ids(it, allocator),
4739 ),
4740 Self::ComputedMemberExpression(it) => {
4741 ExportDefaultDeclarationKind::ComputedMemberExpression(
4742 CloneIn::clone_in_with_semantic_ids(it, allocator),
4743 )
4744 }
4745 Self::StaticMemberExpression(it) => {
4746 ExportDefaultDeclarationKind::StaticMemberExpression(
4747 CloneIn::clone_in_with_semantic_ids(it, allocator),
4748 )
4749 }
4750 Self::PrivateFieldExpression(it) => {
4751 ExportDefaultDeclarationKind::PrivateFieldExpression(
4752 CloneIn::clone_in_with_semantic_ids(it, allocator),
4753 )
4754 }
4755 }
4756 }
4757}
4758
4759impl<'new_alloc> CloneIn<'new_alloc> for ModuleExportName<'_> {
4760 type Cloned = ModuleExportName<'new_alloc>;
4761
4762 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4763 match self {
4764 Self::IdentifierName(it) => {
4765 ModuleExportName::IdentifierName(CloneIn::clone_in(it, allocator))
4766 }
4767 Self::IdentifierReference(it) => {
4768 ModuleExportName::IdentifierReference(CloneIn::clone_in(it, allocator))
4769 }
4770 Self::StringLiteral(it) => {
4771 ModuleExportName::StringLiteral(CloneIn::clone_in(it, allocator))
4772 }
4773 }
4774 }
4775
4776 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4777 match self {
4778 Self::IdentifierName(it) => {
4779 ModuleExportName::IdentifierName(CloneIn::clone_in_with_semantic_ids(it, allocator))
4780 }
4781 Self::IdentifierReference(it) => ModuleExportName::IdentifierReference(
4782 CloneIn::clone_in_with_semantic_ids(it, allocator),
4783 ),
4784 Self::StringLiteral(it) => {
4785 ModuleExportName::StringLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
4786 }
4787 }
4788 }
4789}
4790
4791impl<'new_alloc> CloneIn<'new_alloc> for V8IntrinsicExpression<'_> {
4792 type Cloned = V8IntrinsicExpression<'new_alloc>;
4793
4794 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4795 V8IntrinsicExpression {
4796 span: CloneIn::clone_in(&self.span, allocator),
4797 name: CloneIn::clone_in(&self.name, allocator),
4798 arguments: CloneIn::clone_in(&self.arguments, allocator),
4799 }
4800 }
4801
4802 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4803 V8IntrinsicExpression {
4804 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4805 name: CloneIn::clone_in_with_semantic_ids(&self.name, allocator),
4806 arguments: CloneIn::clone_in_with_semantic_ids(&self.arguments, allocator),
4807 }
4808 }
4809}
4810
4811impl<'new_alloc> CloneIn<'new_alloc> for BooleanLiteral {
4812 type Cloned = BooleanLiteral;
4813
4814 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4815 BooleanLiteral {
4816 span: CloneIn::clone_in(&self.span, allocator),
4817 value: CloneIn::clone_in(&self.value, allocator),
4818 }
4819 }
4820
4821 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4822 BooleanLiteral {
4823 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4824 value: CloneIn::clone_in_with_semantic_ids(&self.value, allocator),
4825 }
4826 }
4827}
4828
4829impl<'new_alloc> CloneIn<'new_alloc> for NullLiteral {
4830 type Cloned = NullLiteral;
4831
4832 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4833 NullLiteral { span: CloneIn::clone_in(&self.span, allocator) }
4834 }
4835
4836 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4837 NullLiteral { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
4838 }
4839}
4840
4841impl<'new_alloc> CloneIn<'new_alloc> for NumericLiteral<'_> {
4842 type Cloned = NumericLiteral<'new_alloc>;
4843
4844 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4845 NumericLiteral {
4846 span: CloneIn::clone_in(&self.span, allocator),
4847 value: CloneIn::clone_in(&self.value, allocator),
4848 raw: CloneIn::clone_in(&self.raw, allocator),
4849 base: CloneIn::clone_in(&self.base, allocator),
4850 }
4851 }
4852
4853 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4854 NumericLiteral {
4855 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4856 value: CloneIn::clone_in_with_semantic_ids(&self.value, allocator),
4857 raw: CloneIn::clone_in_with_semantic_ids(&self.raw, allocator),
4858 base: CloneIn::clone_in_with_semantic_ids(&self.base, allocator),
4859 }
4860 }
4861}
4862
4863impl<'new_alloc> CloneIn<'new_alloc> for StringLiteral<'_> {
4864 type Cloned = StringLiteral<'new_alloc>;
4865
4866 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4867 StringLiteral {
4868 span: CloneIn::clone_in(&self.span, allocator),
4869 value: CloneIn::clone_in(&self.value, allocator),
4870 raw: CloneIn::clone_in(&self.raw, allocator),
4871 lone_surrogates: CloneIn::clone_in(&self.lone_surrogates, allocator),
4872 }
4873 }
4874
4875 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4876 StringLiteral {
4877 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4878 value: CloneIn::clone_in_with_semantic_ids(&self.value, allocator),
4879 raw: CloneIn::clone_in_with_semantic_ids(&self.raw, allocator),
4880 lone_surrogates: CloneIn::clone_in_with_semantic_ids(&self.lone_surrogates, allocator),
4881 }
4882 }
4883}
4884
4885impl<'new_alloc> CloneIn<'new_alloc> for BigIntLiteral<'_> {
4886 type Cloned = BigIntLiteral<'new_alloc>;
4887
4888 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4889 BigIntLiteral {
4890 span: CloneIn::clone_in(&self.span, allocator),
4891 value: CloneIn::clone_in(&self.value, allocator),
4892 raw: CloneIn::clone_in(&self.raw, allocator),
4893 base: CloneIn::clone_in(&self.base, allocator),
4894 }
4895 }
4896
4897 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4898 BigIntLiteral {
4899 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4900 value: CloneIn::clone_in_with_semantic_ids(&self.value, allocator),
4901 raw: CloneIn::clone_in_with_semantic_ids(&self.raw, allocator),
4902 base: CloneIn::clone_in_with_semantic_ids(&self.base, allocator),
4903 }
4904 }
4905}
4906
4907impl<'new_alloc> CloneIn<'new_alloc> for RegExpLiteral<'_> {
4908 type Cloned = RegExpLiteral<'new_alloc>;
4909
4910 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4911 RegExpLiteral {
4912 span: CloneIn::clone_in(&self.span, allocator),
4913 regex: CloneIn::clone_in(&self.regex, allocator),
4914 raw: CloneIn::clone_in(&self.raw, allocator),
4915 }
4916 }
4917
4918 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4919 RegExpLiteral {
4920 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4921 regex: CloneIn::clone_in_with_semantic_ids(&self.regex, allocator),
4922 raw: CloneIn::clone_in_with_semantic_ids(&self.raw, allocator),
4923 }
4924 }
4925}
4926
4927impl<'new_alloc> CloneIn<'new_alloc> for RegExp<'_> {
4928 type Cloned = RegExp<'new_alloc>;
4929
4930 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4931 RegExp {
4932 pattern: CloneIn::clone_in(&self.pattern, allocator),
4933 flags: CloneIn::clone_in(&self.flags, allocator),
4934 }
4935 }
4936
4937 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4938 RegExp {
4939 pattern: CloneIn::clone_in_with_semantic_ids(&self.pattern, allocator),
4940 flags: CloneIn::clone_in_with_semantic_ids(&self.flags, allocator),
4941 }
4942 }
4943}
4944
4945impl<'new_alloc> CloneIn<'new_alloc> for RegExpPattern<'_> {
4946 type Cloned = RegExpPattern<'new_alloc>;
4947
4948 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4949 RegExpPattern {
4950 text: CloneIn::clone_in(&self.text, allocator),
4951 pattern: CloneIn::clone_in(&self.pattern, allocator),
4952 }
4953 }
4954
4955 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4956 RegExpPattern {
4957 text: CloneIn::clone_in_with_semantic_ids(&self.text, allocator),
4958 pattern: CloneIn::clone_in_with_semantic_ids(&self.pattern, allocator),
4959 }
4960 }
4961}
4962
4963impl<'new_alloc> CloneIn<'new_alloc> for JSXElement<'_> {
4964 type Cloned = JSXElement<'new_alloc>;
4965
4966 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4967 JSXElement {
4968 span: CloneIn::clone_in(&self.span, allocator),
4969 opening_element: CloneIn::clone_in(&self.opening_element, allocator),
4970 children: CloneIn::clone_in(&self.children, allocator),
4971 closing_element: CloneIn::clone_in(&self.closing_element, allocator),
4972 }
4973 }
4974
4975 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4976 JSXElement {
4977 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4978 opening_element: CloneIn::clone_in_with_semantic_ids(&self.opening_element, allocator),
4979 children: CloneIn::clone_in_with_semantic_ids(&self.children, allocator),
4980 closing_element: CloneIn::clone_in_with_semantic_ids(&self.closing_element, allocator),
4981 }
4982 }
4983}
4984
4985impl<'new_alloc> CloneIn<'new_alloc> for JSXOpeningElement<'_> {
4986 type Cloned = JSXOpeningElement<'new_alloc>;
4987
4988 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4989 JSXOpeningElement {
4990 span: CloneIn::clone_in(&self.span, allocator),
4991 name: CloneIn::clone_in(&self.name, allocator),
4992 type_arguments: CloneIn::clone_in(&self.type_arguments, allocator),
4993 attributes: CloneIn::clone_in(&self.attributes, allocator),
4994 }
4995 }
4996
4997 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4998 JSXOpeningElement {
4999 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5000 name: CloneIn::clone_in_with_semantic_ids(&self.name, allocator),
5001 type_arguments: CloneIn::clone_in_with_semantic_ids(&self.type_arguments, allocator),
5002 attributes: CloneIn::clone_in_with_semantic_ids(&self.attributes, allocator),
5003 }
5004 }
5005}
5006
5007impl<'new_alloc> CloneIn<'new_alloc> for JSXClosingElement<'_> {
5008 type Cloned = JSXClosingElement<'new_alloc>;
5009
5010 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5011 JSXClosingElement {
5012 span: CloneIn::clone_in(&self.span, allocator),
5013 name: CloneIn::clone_in(&self.name, allocator),
5014 }
5015 }
5016
5017 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5018 JSXClosingElement {
5019 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5020 name: CloneIn::clone_in_with_semantic_ids(&self.name, allocator),
5021 }
5022 }
5023}
5024
5025impl<'new_alloc> CloneIn<'new_alloc> for JSXFragment<'_> {
5026 type Cloned = JSXFragment<'new_alloc>;
5027
5028 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5029 JSXFragment {
5030 span: CloneIn::clone_in(&self.span, allocator),
5031 opening_fragment: CloneIn::clone_in(&self.opening_fragment, allocator),
5032 children: CloneIn::clone_in(&self.children, allocator),
5033 closing_fragment: CloneIn::clone_in(&self.closing_fragment, allocator),
5034 }
5035 }
5036
5037 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5038 JSXFragment {
5039 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5040 opening_fragment: CloneIn::clone_in_with_semantic_ids(
5041 &self.opening_fragment,
5042 allocator,
5043 ),
5044 children: CloneIn::clone_in_with_semantic_ids(&self.children, allocator),
5045 closing_fragment: CloneIn::clone_in_with_semantic_ids(
5046 &self.closing_fragment,
5047 allocator,
5048 ),
5049 }
5050 }
5051}
5052
5053impl<'new_alloc> CloneIn<'new_alloc> for JSXOpeningFragment {
5054 type Cloned = JSXOpeningFragment;
5055
5056 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5057 JSXOpeningFragment { span: CloneIn::clone_in(&self.span, allocator) }
5058 }
5059
5060 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5061 JSXOpeningFragment { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
5062 }
5063}
5064
5065impl<'new_alloc> CloneIn<'new_alloc> for JSXClosingFragment {
5066 type Cloned = JSXClosingFragment;
5067
5068 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5069 JSXClosingFragment { span: CloneIn::clone_in(&self.span, allocator) }
5070 }
5071
5072 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5073 JSXClosingFragment { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
5074 }
5075}
5076
5077impl<'new_alloc> CloneIn<'new_alloc> for JSXElementName<'_> {
5078 type Cloned = JSXElementName<'new_alloc>;
5079
5080 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5081 match self {
5082 Self::Identifier(it) => JSXElementName::Identifier(CloneIn::clone_in(it, allocator)),
5083 Self::IdentifierReference(it) => {
5084 JSXElementName::IdentifierReference(CloneIn::clone_in(it, allocator))
5085 }
5086 Self::NamespacedName(it) => {
5087 JSXElementName::NamespacedName(CloneIn::clone_in(it, allocator))
5088 }
5089 Self::MemberExpression(it) => {
5090 JSXElementName::MemberExpression(CloneIn::clone_in(it, allocator))
5091 }
5092 Self::ThisExpression(it) => {
5093 JSXElementName::ThisExpression(CloneIn::clone_in(it, allocator))
5094 }
5095 }
5096 }
5097
5098 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5099 match self {
5100 Self::Identifier(it) => {
5101 JSXElementName::Identifier(CloneIn::clone_in_with_semantic_ids(it, allocator))
5102 }
5103 Self::IdentifierReference(it) => JSXElementName::IdentifierReference(
5104 CloneIn::clone_in_with_semantic_ids(it, allocator),
5105 ),
5106 Self::NamespacedName(it) => {
5107 JSXElementName::NamespacedName(CloneIn::clone_in_with_semantic_ids(it, allocator))
5108 }
5109 Self::MemberExpression(it) => {
5110 JSXElementName::MemberExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5111 }
5112 Self::ThisExpression(it) => {
5113 JSXElementName::ThisExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5114 }
5115 }
5116 }
5117}
5118
5119impl<'new_alloc> CloneIn<'new_alloc> for JSXNamespacedName<'_> {
5120 type Cloned = JSXNamespacedName<'new_alloc>;
5121
5122 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5123 JSXNamespacedName {
5124 span: CloneIn::clone_in(&self.span, allocator),
5125 namespace: CloneIn::clone_in(&self.namespace, allocator),
5126 name: CloneIn::clone_in(&self.name, allocator),
5127 }
5128 }
5129
5130 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5131 JSXNamespacedName {
5132 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5133 namespace: CloneIn::clone_in_with_semantic_ids(&self.namespace, allocator),
5134 name: CloneIn::clone_in_with_semantic_ids(&self.name, allocator),
5135 }
5136 }
5137}
5138
5139impl<'new_alloc> CloneIn<'new_alloc> for JSXMemberExpression<'_> {
5140 type Cloned = JSXMemberExpression<'new_alloc>;
5141
5142 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5143 JSXMemberExpression {
5144 span: CloneIn::clone_in(&self.span, allocator),
5145 object: CloneIn::clone_in(&self.object, allocator),
5146 property: CloneIn::clone_in(&self.property, allocator),
5147 }
5148 }
5149
5150 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5151 JSXMemberExpression {
5152 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5153 object: CloneIn::clone_in_with_semantic_ids(&self.object, allocator),
5154 property: CloneIn::clone_in_with_semantic_ids(&self.property, allocator),
5155 }
5156 }
5157}
5158
5159impl<'new_alloc> CloneIn<'new_alloc> for JSXMemberExpressionObject<'_> {
5160 type Cloned = JSXMemberExpressionObject<'new_alloc>;
5161
5162 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5163 match self {
5164 Self::IdentifierReference(it) => {
5165 JSXMemberExpressionObject::IdentifierReference(CloneIn::clone_in(it, allocator))
5166 }
5167 Self::MemberExpression(it) => {
5168 JSXMemberExpressionObject::MemberExpression(CloneIn::clone_in(it, allocator))
5169 }
5170 Self::ThisExpression(it) => {
5171 JSXMemberExpressionObject::ThisExpression(CloneIn::clone_in(it, allocator))
5172 }
5173 }
5174 }
5175
5176 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5177 match self {
5178 Self::IdentifierReference(it) => JSXMemberExpressionObject::IdentifierReference(
5179 CloneIn::clone_in_with_semantic_ids(it, allocator),
5180 ),
5181 Self::MemberExpression(it) => JSXMemberExpressionObject::MemberExpression(
5182 CloneIn::clone_in_with_semantic_ids(it, allocator),
5183 ),
5184 Self::ThisExpression(it) => JSXMemberExpressionObject::ThisExpression(
5185 CloneIn::clone_in_with_semantic_ids(it, allocator),
5186 ),
5187 }
5188 }
5189}
5190
5191impl<'new_alloc> CloneIn<'new_alloc> for JSXExpressionContainer<'_> {
5192 type Cloned = JSXExpressionContainer<'new_alloc>;
5193
5194 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5195 JSXExpressionContainer {
5196 span: CloneIn::clone_in(&self.span, allocator),
5197 expression: CloneIn::clone_in(&self.expression, allocator),
5198 }
5199 }
5200
5201 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5202 JSXExpressionContainer {
5203 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5204 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
5205 }
5206 }
5207}
5208
5209impl<'new_alloc> CloneIn<'new_alloc> for JSXExpression<'_> {
5210 type Cloned = JSXExpression<'new_alloc>;
5211
5212 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5213 match self {
5214 Self::EmptyExpression(it) => {
5215 JSXExpression::EmptyExpression(CloneIn::clone_in(it, allocator))
5216 }
5217 Self::BooleanLiteral(it) => {
5218 JSXExpression::BooleanLiteral(CloneIn::clone_in(it, allocator))
5219 }
5220 Self::NullLiteral(it) => JSXExpression::NullLiteral(CloneIn::clone_in(it, allocator)),
5221 Self::NumericLiteral(it) => {
5222 JSXExpression::NumericLiteral(CloneIn::clone_in(it, allocator))
5223 }
5224 Self::BigIntLiteral(it) => {
5225 JSXExpression::BigIntLiteral(CloneIn::clone_in(it, allocator))
5226 }
5227 Self::RegExpLiteral(it) => {
5228 JSXExpression::RegExpLiteral(CloneIn::clone_in(it, allocator))
5229 }
5230 Self::StringLiteral(it) => {
5231 JSXExpression::StringLiteral(CloneIn::clone_in(it, allocator))
5232 }
5233 Self::TemplateLiteral(it) => {
5234 JSXExpression::TemplateLiteral(CloneIn::clone_in(it, allocator))
5235 }
5236 Self::Identifier(it) => JSXExpression::Identifier(CloneIn::clone_in(it, allocator)),
5237 Self::MetaProperty(it) => JSXExpression::MetaProperty(CloneIn::clone_in(it, allocator)),
5238 Self::Super(it) => JSXExpression::Super(CloneIn::clone_in(it, allocator)),
5239 Self::ArrayExpression(it) => {
5240 JSXExpression::ArrayExpression(CloneIn::clone_in(it, allocator))
5241 }
5242 Self::ArrowFunctionExpression(it) => {
5243 JSXExpression::ArrowFunctionExpression(CloneIn::clone_in(it, allocator))
5244 }
5245 Self::AssignmentExpression(it) => {
5246 JSXExpression::AssignmentExpression(CloneIn::clone_in(it, allocator))
5247 }
5248 Self::AwaitExpression(it) => {
5249 JSXExpression::AwaitExpression(CloneIn::clone_in(it, allocator))
5250 }
5251 Self::BinaryExpression(it) => {
5252 JSXExpression::BinaryExpression(CloneIn::clone_in(it, allocator))
5253 }
5254 Self::CallExpression(it) => {
5255 JSXExpression::CallExpression(CloneIn::clone_in(it, allocator))
5256 }
5257 Self::ChainExpression(it) => {
5258 JSXExpression::ChainExpression(CloneIn::clone_in(it, allocator))
5259 }
5260 Self::ClassExpression(it) => {
5261 JSXExpression::ClassExpression(CloneIn::clone_in(it, allocator))
5262 }
5263 Self::ConditionalExpression(it) => {
5264 JSXExpression::ConditionalExpression(CloneIn::clone_in(it, allocator))
5265 }
5266 Self::FunctionExpression(it) => {
5267 JSXExpression::FunctionExpression(CloneIn::clone_in(it, allocator))
5268 }
5269 Self::ImportExpression(it) => {
5270 JSXExpression::ImportExpression(CloneIn::clone_in(it, allocator))
5271 }
5272 Self::LogicalExpression(it) => {
5273 JSXExpression::LogicalExpression(CloneIn::clone_in(it, allocator))
5274 }
5275 Self::NewExpression(it) => {
5276 JSXExpression::NewExpression(CloneIn::clone_in(it, allocator))
5277 }
5278 Self::ObjectExpression(it) => {
5279 JSXExpression::ObjectExpression(CloneIn::clone_in(it, allocator))
5280 }
5281 Self::ParenthesizedExpression(it) => {
5282 JSXExpression::ParenthesizedExpression(CloneIn::clone_in(it, allocator))
5283 }
5284 Self::SequenceExpression(it) => {
5285 JSXExpression::SequenceExpression(CloneIn::clone_in(it, allocator))
5286 }
5287 Self::TaggedTemplateExpression(it) => {
5288 JSXExpression::TaggedTemplateExpression(CloneIn::clone_in(it, allocator))
5289 }
5290 Self::ThisExpression(it) => {
5291 JSXExpression::ThisExpression(CloneIn::clone_in(it, allocator))
5292 }
5293 Self::UnaryExpression(it) => {
5294 JSXExpression::UnaryExpression(CloneIn::clone_in(it, allocator))
5295 }
5296 Self::UpdateExpression(it) => {
5297 JSXExpression::UpdateExpression(CloneIn::clone_in(it, allocator))
5298 }
5299 Self::YieldExpression(it) => {
5300 JSXExpression::YieldExpression(CloneIn::clone_in(it, allocator))
5301 }
5302 Self::PrivateInExpression(it) => {
5303 JSXExpression::PrivateInExpression(CloneIn::clone_in(it, allocator))
5304 }
5305 Self::JSXElement(it) => JSXExpression::JSXElement(CloneIn::clone_in(it, allocator)),
5306 Self::JSXFragment(it) => JSXExpression::JSXFragment(CloneIn::clone_in(it, allocator)),
5307 Self::TSAsExpression(it) => {
5308 JSXExpression::TSAsExpression(CloneIn::clone_in(it, allocator))
5309 }
5310 Self::TSSatisfiesExpression(it) => {
5311 JSXExpression::TSSatisfiesExpression(CloneIn::clone_in(it, allocator))
5312 }
5313 Self::TSTypeAssertion(it) => {
5314 JSXExpression::TSTypeAssertion(CloneIn::clone_in(it, allocator))
5315 }
5316 Self::TSNonNullExpression(it) => {
5317 JSXExpression::TSNonNullExpression(CloneIn::clone_in(it, allocator))
5318 }
5319 Self::TSInstantiationExpression(it) => {
5320 JSXExpression::TSInstantiationExpression(CloneIn::clone_in(it, allocator))
5321 }
5322 Self::V8IntrinsicExpression(it) => {
5323 JSXExpression::V8IntrinsicExpression(CloneIn::clone_in(it, allocator))
5324 }
5325 Self::ComputedMemberExpression(it) => {
5326 JSXExpression::ComputedMemberExpression(CloneIn::clone_in(it, allocator))
5327 }
5328 Self::StaticMemberExpression(it) => {
5329 JSXExpression::StaticMemberExpression(CloneIn::clone_in(it, allocator))
5330 }
5331 Self::PrivateFieldExpression(it) => {
5332 JSXExpression::PrivateFieldExpression(CloneIn::clone_in(it, allocator))
5333 }
5334 }
5335 }
5336
5337 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5338 match self {
5339 Self::EmptyExpression(it) => {
5340 JSXExpression::EmptyExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5341 }
5342 Self::BooleanLiteral(it) => {
5343 JSXExpression::BooleanLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
5344 }
5345 Self::NullLiteral(it) => {
5346 JSXExpression::NullLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
5347 }
5348 Self::NumericLiteral(it) => {
5349 JSXExpression::NumericLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
5350 }
5351 Self::BigIntLiteral(it) => {
5352 JSXExpression::BigIntLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
5353 }
5354 Self::RegExpLiteral(it) => {
5355 JSXExpression::RegExpLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
5356 }
5357 Self::StringLiteral(it) => {
5358 JSXExpression::StringLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
5359 }
5360 Self::TemplateLiteral(it) => {
5361 JSXExpression::TemplateLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
5362 }
5363 Self::Identifier(it) => {
5364 JSXExpression::Identifier(CloneIn::clone_in_with_semantic_ids(it, allocator))
5365 }
5366 Self::MetaProperty(it) => {
5367 JSXExpression::MetaProperty(CloneIn::clone_in_with_semantic_ids(it, allocator))
5368 }
5369 Self::Super(it) => {
5370 JSXExpression::Super(CloneIn::clone_in_with_semantic_ids(it, allocator))
5371 }
5372 Self::ArrayExpression(it) => {
5373 JSXExpression::ArrayExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5374 }
5375 Self::ArrowFunctionExpression(it) => JSXExpression::ArrowFunctionExpression(
5376 CloneIn::clone_in_with_semantic_ids(it, allocator),
5377 ),
5378 Self::AssignmentExpression(it) => JSXExpression::AssignmentExpression(
5379 CloneIn::clone_in_with_semantic_ids(it, allocator),
5380 ),
5381 Self::AwaitExpression(it) => {
5382 JSXExpression::AwaitExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5383 }
5384 Self::BinaryExpression(it) => {
5385 JSXExpression::BinaryExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5386 }
5387 Self::CallExpression(it) => {
5388 JSXExpression::CallExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5389 }
5390 Self::ChainExpression(it) => {
5391 JSXExpression::ChainExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5392 }
5393 Self::ClassExpression(it) => {
5394 JSXExpression::ClassExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5395 }
5396 Self::ConditionalExpression(it) => JSXExpression::ConditionalExpression(
5397 CloneIn::clone_in_with_semantic_ids(it, allocator),
5398 ),
5399 Self::FunctionExpression(it) => JSXExpression::FunctionExpression(
5400 CloneIn::clone_in_with_semantic_ids(it, allocator),
5401 ),
5402 Self::ImportExpression(it) => {
5403 JSXExpression::ImportExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5404 }
5405 Self::LogicalExpression(it) => {
5406 JSXExpression::LogicalExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5407 }
5408 Self::NewExpression(it) => {
5409 JSXExpression::NewExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5410 }
5411 Self::ObjectExpression(it) => {
5412 JSXExpression::ObjectExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5413 }
5414 Self::ParenthesizedExpression(it) => JSXExpression::ParenthesizedExpression(
5415 CloneIn::clone_in_with_semantic_ids(it, allocator),
5416 ),
5417 Self::SequenceExpression(it) => JSXExpression::SequenceExpression(
5418 CloneIn::clone_in_with_semantic_ids(it, allocator),
5419 ),
5420 Self::TaggedTemplateExpression(it) => JSXExpression::TaggedTemplateExpression(
5421 CloneIn::clone_in_with_semantic_ids(it, allocator),
5422 ),
5423 Self::ThisExpression(it) => {
5424 JSXExpression::ThisExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5425 }
5426 Self::UnaryExpression(it) => {
5427 JSXExpression::UnaryExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5428 }
5429 Self::UpdateExpression(it) => {
5430 JSXExpression::UpdateExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5431 }
5432 Self::YieldExpression(it) => {
5433 JSXExpression::YieldExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5434 }
5435 Self::PrivateInExpression(it) => JSXExpression::PrivateInExpression(
5436 CloneIn::clone_in_with_semantic_ids(it, allocator),
5437 ),
5438 Self::JSXElement(it) => {
5439 JSXExpression::JSXElement(CloneIn::clone_in_with_semantic_ids(it, allocator))
5440 }
5441 Self::JSXFragment(it) => {
5442 JSXExpression::JSXFragment(CloneIn::clone_in_with_semantic_ids(it, allocator))
5443 }
5444 Self::TSAsExpression(it) => {
5445 JSXExpression::TSAsExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5446 }
5447 Self::TSSatisfiesExpression(it) => JSXExpression::TSSatisfiesExpression(
5448 CloneIn::clone_in_with_semantic_ids(it, allocator),
5449 ),
5450 Self::TSTypeAssertion(it) => {
5451 JSXExpression::TSTypeAssertion(CloneIn::clone_in_with_semantic_ids(it, allocator))
5452 }
5453 Self::TSNonNullExpression(it) => JSXExpression::TSNonNullExpression(
5454 CloneIn::clone_in_with_semantic_ids(it, allocator),
5455 ),
5456 Self::TSInstantiationExpression(it) => JSXExpression::TSInstantiationExpression(
5457 CloneIn::clone_in_with_semantic_ids(it, allocator),
5458 ),
5459 Self::V8IntrinsicExpression(it) => JSXExpression::V8IntrinsicExpression(
5460 CloneIn::clone_in_with_semantic_ids(it, allocator),
5461 ),
5462 Self::ComputedMemberExpression(it) => JSXExpression::ComputedMemberExpression(
5463 CloneIn::clone_in_with_semantic_ids(it, allocator),
5464 ),
5465 Self::StaticMemberExpression(it) => JSXExpression::StaticMemberExpression(
5466 CloneIn::clone_in_with_semantic_ids(it, allocator),
5467 ),
5468 Self::PrivateFieldExpression(it) => JSXExpression::PrivateFieldExpression(
5469 CloneIn::clone_in_with_semantic_ids(it, allocator),
5470 ),
5471 }
5472 }
5473}
5474
5475impl<'new_alloc> CloneIn<'new_alloc> for JSXEmptyExpression {
5476 type Cloned = JSXEmptyExpression;
5477
5478 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5479 JSXEmptyExpression { span: CloneIn::clone_in(&self.span, allocator) }
5480 }
5481
5482 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5483 JSXEmptyExpression { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
5484 }
5485}
5486
5487impl<'new_alloc> CloneIn<'new_alloc> for JSXAttributeItem<'_> {
5488 type Cloned = JSXAttributeItem<'new_alloc>;
5489
5490 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5491 match self {
5492 Self::Attribute(it) => JSXAttributeItem::Attribute(CloneIn::clone_in(it, allocator)),
5493 Self::SpreadAttribute(it) => {
5494 JSXAttributeItem::SpreadAttribute(CloneIn::clone_in(it, allocator))
5495 }
5496 }
5497 }
5498
5499 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5500 match self {
5501 Self::Attribute(it) => {
5502 JSXAttributeItem::Attribute(CloneIn::clone_in_with_semantic_ids(it, allocator))
5503 }
5504 Self::SpreadAttribute(it) => JSXAttributeItem::SpreadAttribute(
5505 CloneIn::clone_in_with_semantic_ids(it, allocator),
5506 ),
5507 }
5508 }
5509}
5510
5511impl<'new_alloc> CloneIn<'new_alloc> for JSXAttribute<'_> {
5512 type Cloned = JSXAttribute<'new_alloc>;
5513
5514 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5515 JSXAttribute {
5516 span: CloneIn::clone_in(&self.span, allocator),
5517 name: CloneIn::clone_in(&self.name, allocator),
5518 value: CloneIn::clone_in(&self.value, allocator),
5519 }
5520 }
5521
5522 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5523 JSXAttribute {
5524 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5525 name: CloneIn::clone_in_with_semantic_ids(&self.name, allocator),
5526 value: CloneIn::clone_in_with_semantic_ids(&self.value, allocator),
5527 }
5528 }
5529}
5530
5531impl<'new_alloc> CloneIn<'new_alloc> for JSXSpreadAttribute<'_> {
5532 type Cloned = JSXSpreadAttribute<'new_alloc>;
5533
5534 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5535 JSXSpreadAttribute {
5536 span: CloneIn::clone_in(&self.span, allocator),
5537 argument: CloneIn::clone_in(&self.argument, allocator),
5538 }
5539 }
5540
5541 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5542 JSXSpreadAttribute {
5543 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5544 argument: CloneIn::clone_in_with_semantic_ids(&self.argument, allocator),
5545 }
5546 }
5547}
5548
5549impl<'new_alloc> CloneIn<'new_alloc> for JSXAttributeName<'_> {
5550 type Cloned = JSXAttributeName<'new_alloc>;
5551
5552 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5553 match self {
5554 Self::Identifier(it) => JSXAttributeName::Identifier(CloneIn::clone_in(it, allocator)),
5555 Self::NamespacedName(it) => {
5556 JSXAttributeName::NamespacedName(CloneIn::clone_in(it, allocator))
5557 }
5558 }
5559 }
5560
5561 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5562 match self {
5563 Self::Identifier(it) => {
5564 JSXAttributeName::Identifier(CloneIn::clone_in_with_semantic_ids(it, allocator))
5565 }
5566 Self::NamespacedName(it) => {
5567 JSXAttributeName::NamespacedName(CloneIn::clone_in_with_semantic_ids(it, allocator))
5568 }
5569 }
5570 }
5571}
5572
5573impl<'new_alloc> CloneIn<'new_alloc> for JSXAttributeValue<'_> {
5574 type Cloned = JSXAttributeValue<'new_alloc>;
5575
5576 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5577 match self {
5578 Self::StringLiteral(it) => {
5579 JSXAttributeValue::StringLiteral(CloneIn::clone_in(it, allocator))
5580 }
5581 Self::ExpressionContainer(it) => {
5582 JSXAttributeValue::ExpressionContainer(CloneIn::clone_in(it, allocator))
5583 }
5584 Self::Element(it) => JSXAttributeValue::Element(CloneIn::clone_in(it, allocator)),
5585 Self::Fragment(it) => JSXAttributeValue::Fragment(CloneIn::clone_in(it, allocator)),
5586 }
5587 }
5588
5589 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5590 match self {
5591 Self::StringLiteral(it) => {
5592 JSXAttributeValue::StringLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
5593 }
5594 Self::ExpressionContainer(it) => JSXAttributeValue::ExpressionContainer(
5595 CloneIn::clone_in_with_semantic_ids(it, allocator),
5596 ),
5597 Self::Element(it) => {
5598 JSXAttributeValue::Element(CloneIn::clone_in_with_semantic_ids(it, allocator))
5599 }
5600 Self::Fragment(it) => {
5601 JSXAttributeValue::Fragment(CloneIn::clone_in_with_semantic_ids(it, allocator))
5602 }
5603 }
5604 }
5605}
5606
5607impl<'new_alloc> CloneIn<'new_alloc> for JSXIdentifier<'_> {
5608 type Cloned = JSXIdentifier<'new_alloc>;
5609
5610 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5611 JSXIdentifier {
5612 span: CloneIn::clone_in(&self.span, allocator),
5613 name: CloneIn::clone_in(&self.name, allocator),
5614 }
5615 }
5616
5617 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5618 JSXIdentifier {
5619 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5620 name: CloneIn::clone_in_with_semantic_ids(&self.name, allocator),
5621 }
5622 }
5623}
5624
5625impl<'new_alloc> CloneIn<'new_alloc> for JSXChild<'_> {
5626 type Cloned = JSXChild<'new_alloc>;
5627
5628 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5629 match self {
5630 Self::Text(it) => JSXChild::Text(CloneIn::clone_in(it, allocator)),
5631 Self::Element(it) => JSXChild::Element(CloneIn::clone_in(it, allocator)),
5632 Self::Fragment(it) => JSXChild::Fragment(CloneIn::clone_in(it, allocator)),
5633 Self::ExpressionContainer(it) => {
5634 JSXChild::ExpressionContainer(CloneIn::clone_in(it, allocator))
5635 }
5636 Self::Spread(it) => JSXChild::Spread(CloneIn::clone_in(it, allocator)),
5637 }
5638 }
5639
5640 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5641 match self {
5642 Self::Text(it) => JSXChild::Text(CloneIn::clone_in_with_semantic_ids(it, allocator)),
5643 Self::Element(it) => {
5644 JSXChild::Element(CloneIn::clone_in_with_semantic_ids(it, allocator))
5645 }
5646 Self::Fragment(it) => {
5647 JSXChild::Fragment(CloneIn::clone_in_with_semantic_ids(it, allocator))
5648 }
5649 Self::ExpressionContainer(it) => {
5650 JSXChild::ExpressionContainer(CloneIn::clone_in_with_semantic_ids(it, allocator))
5651 }
5652 Self::Spread(it) => {
5653 JSXChild::Spread(CloneIn::clone_in_with_semantic_ids(it, allocator))
5654 }
5655 }
5656 }
5657}
5658
5659impl<'new_alloc> CloneIn<'new_alloc> for JSXSpreadChild<'_> {
5660 type Cloned = JSXSpreadChild<'new_alloc>;
5661
5662 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5663 JSXSpreadChild {
5664 span: CloneIn::clone_in(&self.span, allocator),
5665 expression: CloneIn::clone_in(&self.expression, allocator),
5666 }
5667 }
5668
5669 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5670 JSXSpreadChild {
5671 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5672 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
5673 }
5674 }
5675}
5676
5677impl<'new_alloc> CloneIn<'new_alloc> for JSXText<'_> {
5678 type Cloned = JSXText<'new_alloc>;
5679
5680 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5681 JSXText {
5682 span: CloneIn::clone_in(&self.span, allocator),
5683 value: CloneIn::clone_in(&self.value, allocator),
5684 raw: CloneIn::clone_in(&self.raw, allocator),
5685 }
5686 }
5687
5688 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5689 JSXText {
5690 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5691 value: CloneIn::clone_in_with_semantic_ids(&self.value, allocator),
5692 raw: CloneIn::clone_in_with_semantic_ids(&self.raw, allocator),
5693 }
5694 }
5695}
5696
5697impl<'new_alloc> CloneIn<'new_alloc> for TSThisParameter<'_> {
5698 type Cloned = TSThisParameter<'new_alloc>;
5699
5700 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5701 TSThisParameter {
5702 span: CloneIn::clone_in(&self.span, allocator),
5703 this_span: CloneIn::clone_in(&self.this_span, allocator),
5704 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
5705 }
5706 }
5707
5708 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5709 TSThisParameter {
5710 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5711 this_span: CloneIn::clone_in_with_semantic_ids(&self.this_span, allocator),
5712 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
5713 }
5714 }
5715}
5716
5717impl<'new_alloc> CloneIn<'new_alloc> for TSEnumDeclaration<'_> {
5718 type Cloned = TSEnumDeclaration<'new_alloc>;
5719
5720 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5721 TSEnumDeclaration {
5722 span: CloneIn::clone_in(&self.span, allocator),
5723 id: CloneIn::clone_in(&self.id, allocator),
5724 body: CloneIn::clone_in(&self.body, allocator),
5725 r#const: CloneIn::clone_in(&self.r#const, allocator),
5726 declare: CloneIn::clone_in(&self.declare, allocator),
5727 scope_id: Default::default(),
5728 }
5729 }
5730
5731 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5732 TSEnumDeclaration {
5733 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5734 id: CloneIn::clone_in_with_semantic_ids(&self.id, allocator),
5735 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
5736 r#const: CloneIn::clone_in_with_semantic_ids(&self.r#const, allocator),
5737 declare: CloneIn::clone_in_with_semantic_ids(&self.declare, allocator),
5738 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
5739 }
5740 }
5741}
5742
5743impl<'new_alloc> CloneIn<'new_alloc> for TSEnumBody<'_> {
5744 type Cloned = TSEnumBody<'new_alloc>;
5745
5746 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5747 TSEnumBody {
5748 span: CloneIn::clone_in(&self.span, allocator),
5749 members: CloneIn::clone_in(&self.members, allocator),
5750 }
5751 }
5752
5753 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5754 TSEnumBody {
5755 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5756 members: CloneIn::clone_in_with_semantic_ids(&self.members, allocator),
5757 }
5758 }
5759}
5760
5761impl<'new_alloc> CloneIn<'new_alloc> for TSEnumMember<'_> {
5762 type Cloned = TSEnumMember<'new_alloc>;
5763
5764 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5765 TSEnumMember {
5766 span: CloneIn::clone_in(&self.span, allocator),
5767 id: CloneIn::clone_in(&self.id, allocator),
5768 initializer: CloneIn::clone_in(&self.initializer, allocator),
5769 }
5770 }
5771
5772 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5773 TSEnumMember {
5774 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5775 id: CloneIn::clone_in_with_semantic_ids(&self.id, allocator),
5776 initializer: CloneIn::clone_in_with_semantic_ids(&self.initializer, allocator),
5777 }
5778 }
5779}
5780
5781impl<'new_alloc> CloneIn<'new_alloc> for TSEnumMemberName<'_> {
5782 type Cloned = TSEnumMemberName<'new_alloc>;
5783
5784 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5785 match self {
5786 Self::Identifier(it) => TSEnumMemberName::Identifier(CloneIn::clone_in(it, allocator)),
5787 Self::String(it) => TSEnumMemberName::String(CloneIn::clone_in(it, allocator)),
5788 Self::ComputedString(it) => {
5789 TSEnumMemberName::ComputedString(CloneIn::clone_in(it, allocator))
5790 }
5791 Self::ComputedTemplateString(it) => {
5792 TSEnumMemberName::ComputedTemplateString(CloneIn::clone_in(it, allocator))
5793 }
5794 }
5795 }
5796
5797 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5798 match self {
5799 Self::Identifier(it) => {
5800 TSEnumMemberName::Identifier(CloneIn::clone_in_with_semantic_ids(it, allocator))
5801 }
5802 Self::String(it) => {
5803 TSEnumMemberName::String(CloneIn::clone_in_with_semantic_ids(it, allocator))
5804 }
5805 Self::ComputedString(it) => {
5806 TSEnumMemberName::ComputedString(CloneIn::clone_in_with_semantic_ids(it, allocator))
5807 }
5808 Self::ComputedTemplateString(it) => TSEnumMemberName::ComputedTemplateString(
5809 CloneIn::clone_in_with_semantic_ids(it, allocator),
5810 ),
5811 }
5812 }
5813}
5814
5815impl<'new_alloc> CloneIn<'new_alloc> for TSTypeAnnotation<'_> {
5816 type Cloned = TSTypeAnnotation<'new_alloc>;
5817
5818 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5819 TSTypeAnnotation {
5820 span: CloneIn::clone_in(&self.span, allocator),
5821 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
5822 }
5823 }
5824
5825 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5826 TSTypeAnnotation {
5827 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5828 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
5829 }
5830 }
5831}
5832
5833impl<'new_alloc> CloneIn<'new_alloc> for TSLiteralType<'_> {
5834 type Cloned = TSLiteralType<'new_alloc>;
5835
5836 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5837 TSLiteralType {
5838 span: CloneIn::clone_in(&self.span, allocator),
5839 literal: CloneIn::clone_in(&self.literal, allocator),
5840 }
5841 }
5842
5843 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5844 TSLiteralType {
5845 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5846 literal: CloneIn::clone_in_with_semantic_ids(&self.literal, allocator),
5847 }
5848 }
5849}
5850
5851impl<'new_alloc> CloneIn<'new_alloc> for TSLiteral<'_> {
5852 type Cloned = TSLiteral<'new_alloc>;
5853
5854 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5855 match self {
5856 Self::BooleanLiteral(it) => TSLiteral::BooleanLiteral(CloneIn::clone_in(it, allocator)),
5857 Self::NumericLiteral(it) => TSLiteral::NumericLiteral(CloneIn::clone_in(it, allocator)),
5858 Self::BigIntLiteral(it) => TSLiteral::BigIntLiteral(CloneIn::clone_in(it, allocator)),
5859 Self::StringLiteral(it) => TSLiteral::StringLiteral(CloneIn::clone_in(it, allocator)),
5860 Self::TemplateLiteral(it) => {
5861 TSLiteral::TemplateLiteral(CloneIn::clone_in(it, allocator))
5862 }
5863 Self::UnaryExpression(it) => {
5864 TSLiteral::UnaryExpression(CloneIn::clone_in(it, allocator))
5865 }
5866 }
5867 }
5868
5869 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5870 match self {
5871 Self::BooleanLiteral(it) => {
5872 TSLiteral::BooleanLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
5873 }
5874 Self::NumericLiteral(it) => {
5875 TSLiteral::NumericLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
5876 }
5877 Self::BigIntLiteral(it) => {
5878 TSLiteral::BigIntLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
5879 }
5880 Self::StringLiteral(it) => {
5881 TSLiteral::StringLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
5882 }
5883 Self::TemplateLiteral(it) => {
5884 TSLiteral::TemplateLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
5885 }
5886 Self::UnaryExpression(it) => {
5887 TSLiteral::UnaryExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5888 }
5889 }
5890 }
5891}
5892
5893impl<'new_alloc> CloneIn<'new_alloc> for TSType<'_> {
5894 type Cloned = TSType<'new_alloc>;
5895
5896 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5897 match self {
5898 Self::TSAnyKeyword(it) => TSType::TSAnyKeyword(CloneIn::clone_in(it, allocator)),
5899 Self::TSBigIntKeyword(it) => TSType::TSBigIntKeyword(CloneIn::clone_in(it, allocator)),
5900 Self::TSBooleanKeyword(it) => {
5901 TSType::TSBooleanKeyword(CloneIn::clone_in(it, allocator))
5902 }
5903 Self::TSIntrinsicKeyword(it) => {
5904 TSType::TSIntrinsicKeyword(CloneIn::clone_in(it, allocator))
5905 }
5906 Self::TSNeverKeyword(it) => TSType::TSNeverKeyword(CloneIn::clone_in(it, allocator)),
5907 Self::TSNullKeyword(it) => TSType::TSNullKeyword(CloneIn::clone_in(it, allocator)),
5908 Self::TSNumberKeyword(it) => TSType::TSNumberKeyword(CloneIn::clone_in(it, allocator)),
5909 Self::TSObjectKeyword(it) => TSType::TSObjectKeyword(CloneIn::clone_in(it, allocator)),
5910 Self::TSStringKeyword(it) => TSType::TSStringKeyword(CloneIn::clone_in(it, allocator)),
5911 Self::TSSymbolKeyword(it) => TSType::TSSymbolKeyword(CloneIn::clone_in(it, allocator)),
5912 Self::TSUndefinedKeyword(it) => {
5913 TSType::TSUndefinedKeyword(CloneIn::clone_in(it, allocator))
5914 }
5915 Self::TSUnknownKeyword(it) => {
5916 TSType::TSUnknownKeyword(CloneIn::clone_in(it, allocator))
5917 }
5918 Self::TSVoidKeyword(it) => TSType::TSVoidKeyword(CloneIn::clone_in(it, allocator)),
5919 Self::TSArrayType(it) => TSType::TSArrayType(CloneIn::clone_in(it, allocator)),
5920 Self::TSConditionalType(it) => {
5921 TSType::TSConditionalType(CloneIn::clone_in(it, allocator))
5922 }
5923 Self::TSConstructorType(it) => {
5924 TSType::TSConstructorType(CloneIn::clone_in(it, allocator))
5925 }
5926 Self::TSFunctionType(it) => TSType::TSFunctionType(CloneIn::clone_in(it, allocator)),
5927 Self::TSImportType(it) => TSType::TSImportType(CloneIn::clone_in(it, allocator)),
5928 Self::TSIndexedAccessType(it) => {
5929 TSType::TSIndexedAccessType(CloneIn::clone_in(it, allocator))
5930 }
5931 Self::TSInferType(it) => TSType::TSInferType(CloneIn::clone_in(it, allocator)),
5932 Self::TSIntersectionType(it) => {
5933 TSType::TSIntersectionType(CloneIn::clone_in(it, allocator))
5934 }
5935 Self::TSLiteralType(it) => TSType::TSLiteralType(CloneIn::clone_in(it, allocator)),
5936 Self::TSMappedType(it) => TSType::TSMappedType(CloneIn::clone_in(it, allocator)),
5937 Self::TSNamedTupleMember(it) => {
5938 TSType::TSNamedTupleMember(CloneIn::clone_in(it, allocator))
5939 }
5940 Self::TSTemplateLiteralType(it) => {
5941 TSType::TSTemplateLiteralType(CloneIn::clone_in(it, allocator))
5942 }
5943 Self::TSThisType(it) => TSType::TSThisType(CloneIn::clone_in(it, allocator)),
5944 Self::TSTupleType(it) => TSType::TSTupleType(CloneIn::clone_in(it, allocator)),
5945 Self::TSTypeLiteral(it) => TSType::TSTypeLiteral(CloneIn::clone_in(it, allocator)),
5946 Self::TSTypeOperatorType(it) => {
5947 TSType::TSTypeOperatorType(CloneIn::clone_in(it, allocator))
5948 }
5949 Self::TSTypePredicate(it) => TSType::TSTypePredicate(CloneIn::clone_in(it, allocator)),
5950 Self::TSTypeQuery(it) => TSType::TSTypeQuery(CloneIn::clone_in(it, allocator)),
5951 Self::TSTypeReference(it) => TSType::TSTypeReference(CloneIn::clone_in(it, allocator)),
5952 Self::TSUnionType(it) => TSType::TSUnionType(CloneIn::clone_in(it, allocator)),
5953 Self::TSParenthesizedType(it) => {
5954 TSType::TSParenthesizedType(CloneIn::clone_in(it, allocator))
5955 }
5956 Self::JSDocNullableType(it) => {
5957 TSType::JSDocNullableType(CloneIn::clone_in(it, allocator))
5958 }
5959 Self::JSDocNonNullableType(it) => {
5960 TSType::JSDocNonNullableType(CloneIn::clone_in(it, allocator))
5961 }
5962 Self::JSDocUnknownType(it) => {
5963 TSType::JSDocUnknownType(CloneIn::clone_in(it, allocator))
5964 }
5965 }
5966 }
5967
5968 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5969 match self {
5970 Self::TSAnyKeyword(it) => {
5971 TSType::TSAnyKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
5972 }
5973 Self::TSBigIntKeyword(it) => {
5974 TSType::TSBigIntKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
5975 }
5976 Self::TSBooleanKeyword(it) => {
5977 TSType::TSBooleanKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
5978 }
5979 Self::TSIntrinsicKeyword(it) => {
5980 TSType::TSIntrinsicKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
5981 }
5982 Self::TSNeverKeyword(it) => {
5983 TSType::TSNeverKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
5984 }
5985 Self::TSNullKeyword(it) => {
5986 TSType::TSNullKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
5987 }
5988 Self::TSNumberKeyword(it) => {
5989 TSType::TSNumberKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
5990 }
5991 Self::TSObjectKeyword(it) => {
5992 TSType::TSObjectKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
5993 }
5994 Self::TSStringKeyword(it) => {
5995 TSType::TSStringKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
5996 }
5997 Self::TSSymbolKeyword(it) => {
5998 TSType::TSSymbolKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
5999 }
6000 Self::TSUndefinedKeyword(it) => {
6001 TSType::TSUndefinedKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
6002 }
6003 Self::TSUnknownKeyword(it) => {
6004 TSType::TSUnknownKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
6005 }
6006 Self::TSVoidKeyword(it) => {
6007 TSType::TSVoidKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
6008 }
6009 Self::TSArrayType(it) => {
6010 TSType::TSArrayType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6011 }
6012 Self::TSConditionalType(it) => {
6013 TSType::TSConditionalType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6014 }
6015 Self::TSConstructorType(it) => {
6016 TSType::TSConstructorType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6017 }
6018 Self::TSFunctionType(it) => {
6019 TSType::TSFunctionType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6020 }
6021 Self::TSImportType(it) => {
6022 TSType::TSImportType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6023 }
6024 Self::TSIndexedAccessType(it) => {
6025 TSType::TSIndexedAccessType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6026 }
6027 Self::TSInferType(it) => {
6028 TSType::TSInferType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6029 }
6030 Self::TSIntersectionType(it) => {
6031 TSType::TSIntersectionType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6032 }
6033 Self::TSLiteralType(it) => {
6034 TSType::TSLiteralType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6035 }
6036 Self::TSMappedType(it) => {
6037 TSType::TSMappedType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6038 }
6039 Self::TSNamedTupleMember(it) => {
6040 TSType::TSNamedTupleMember(CloneIn::clone_in_with_semantic_ids(it, allocator))
6041 }
6042 Self::TSTemplateLiteralType(it) => {
6043 TSType::TSTemplateLiteralType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6044 }
6045 Self::TSThisType(it) => {
6046 TSType::TSThisType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6047 }
6048 Self::TSTupleType(it) => {
6049 TSType::TSTupleType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6050 }
6051 Self::TSTypeLiteral(it) => {
6052 TSType::TSTypeLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
6053 }
6054 Self::TSTypeOperatorType(it) => {
6055 TSType::TSTypeOperatorType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6056 }
6057 Self::TSTypePredicate(it) => {
6058 TSType::TSTypePredicate(CloneIn::clone_in_with_semantic_ids(it, allocator))
6059 }
6060 Self::TSTypeQuery(it) => {
6061 TSType::TSTypeQuery(CloneIn::clone_in_with_semantic_ids(it, allocator))
6062 }
6063 Self::TSTypeReference(it) => {
6064 TSType::TSTypeReference(CloneIn::clone_in_with_semantic_ids(it, allocator))
6065 }
6066 Self::TSUnionType(it) => {
6067 TSType::TSUnionType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6068 }
6069 Self::TSParenthesizedType(it) => {
6070 TSType::TSParenthesizedType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6071 }
6072 Self::JSDocNullableType(it) => {
6073 TSType::JSDocNullableType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6074 }
6075 Self::JSDocNonNullableType(it) => {
6076 TSType::JSDocNonNullableType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6077 }
6078 Self::JSDocUnknownType(it) => {
6079 TSType::JSDocUnknownType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6080 }
6081 }
6082 }
6083}
6084
6085impl<'new_alloc> CloneIn<'new_alloc> for TSConditionalType<'_> {
6086 type Cloned = TSConditionalType<'new_alloc>;
6087
6088 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6089 TSConditionalType {
6090 span: CloneIn::clone_in(&self.span, allocator),
6091 check_type: CloneIn::clone_in(&self.check_type, allocator),
6092 extends_type: CloneIn::clone_in(&self.extends_type, allocator),
6093 true_type: CloneIn::clone_in(&self.true_type, allocator),
6094 false_type: CloneIn::clone_in(&self.false_type, allocator),
6095 scope_id: Default::default(),
6096 }
6097 }
6098
6099 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6100 TSConditionalType {
6101 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6102 check_type: CloneIn::clone_in_with_semantic_ids(&self.check_type, allocator),
6103 extends_type: CloneIn::clone_in_with_semantic_ids(&self.extends_type, allocator),
6104 true_type: CloneIn::clone_in_with_semantic_ids(&self.true_type, allocator),
6105 false_type: CloneIn::clone_in_with_semantic_ids(&self.false_type, allocator),
6106 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
6107 }
6108 }
6109}
6110
6111impl<'new_alloc> CloneIn<'new_alloc> for TSUnionType<'_> {
6112 type Cloned = TSUnionType<'new_alloc>;
6113
6114 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6115 TSUnionType {
6116 span: CloneIn::clone_in(&self.span, allocator),
6117 types: CloneIn::clone_in(&self.types, allocator),
6118 }
6119 }
6120
6121 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6122 TSUnionType {
6123 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6124 types: CloneIn::clone_in_with_semantic_ids(&self.types, allocator),
6125 }
6126 }
6127}
6128
6129impl<'new_alloc> CloneIn<'new_alloc> for TSIntersectionType<'_> {
6130 type Cloned = TSIntersectionType<'new_alloc>;
6131
6132 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6133 TSIntersectionType {
6134 span: CloneIn::clone_in(&self.span, allocator),
6135 types: CloneIn::clone_in(&self.types, allocator),
6136 }
6137 }
6138
6139 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6140 TSIntersectionType {
6141 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6142 types: CloneIn::clone_in_with_semantic_ids(&self.types, allocator),
6143 }
6144 }
6145}
6146
6147impl<'new_alloc> CloneIn<'new_alloc> for TSParenthesizedType<'_> {
6148 type Cloned = TSParenthesizedType<'new_alloc>;
6149
6150 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6151 TSParenthesizedType {
6152 span: CloneIn::clone_in(&self.span, allocator),
6153 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
6154 }
6155 }
6156
6157 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6158 TSParenthesizedType {
6159 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6160 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
6161 }
6162 }
6163}
6164
6165impl<'new_alloc> CloneIn<'new_alloc> for TSTypeOperator<'_> {
6166 type Cloned = TSTypeOperator<'new_alloc>;
6167
6168 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6169 TSTypeOperator {
6170 span: CloneIn::clone_in(&self.span, allocator),
6171 operator: CloneIn::clone_in(&self.operator, allocator),
6172 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
6173 }
6174 }
6175
6176 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6177 TSTypeOperator {
6178 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6179 operator: CloneIn::clone_in_with_semantic_ids(&self.operator, allocator),
6180 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
6181 }
6182 }
6183}
6184
6185impl<'new_alloc> CloneIn<'new_alloc> for TSTypeOperatorOperator {
6186 type Cloned = TSTypeOperatorOperator;
6187
6188 #[inline(always)]
6189 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6190 *self
6191 }
6192
6193 #[inline(always)]
6194 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6195 *self
6196 }
6197}
6198
6199impl<'new_alloc> CloneIn<'new_alloc> for TSArrayType<'_> {
6200 type Cloned = TSArrayType<'new_alloc>;
6201
6202 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6203 TSArrayType {
6204 span: CloneIn::clone_in(&self.span, allocator),
6205 element_type: CloneIn::clone_in(&self.element_type, allocator),
6206 }
6207 }
6208
6209 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6210 TSArrayType {
6211 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6212 element_type: CloneIn::clone_in_with_semantic_ids(&self.element_type, allocator),
6213 }
6214 }
6215}
6216
6217impl<'new_alloc> CloneIn<'new_alloc> for TSIndexedAccessType<'_> {
6218 type Cloned = TSIndexedAccessType<'new_alloc>;
6219
6220 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6221 TSIndexedAccessType {
6222 span: CloneIn::clone_in(&self.span, allocator),
6223 object_type: CloneIn::clone_in(&self.object_type, allocator),
6224 index_type: CloneIn::clone_in(&self.index_type, allocator),
6225 }
6226 }
6227
6228 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6229 TSIndexedAccessType {
6230 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6231 object_type: CloneIn::clone_in_with_semantic_ids(&self.object_type, allocator),
6232 index_type: CloneIn::clone_in_with_semantic_ids(&self.index_type, allocator),
6233 }
6234 }
6235}
6236
6237impl<'new_alloc> CloneIn<'new_alloc> for TSTupleType<'_> {
6238 type Cloned = TSTupleType<'new_alloc>;
6239
6240 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6241 TSTupleType {
6242 span: CloneIn::clone_in(&self.span, allocator),
6243 element_types: CloneIn::clone_in(&self.element_types, allocator),
6244 }
6245 }
6246
6247 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6248 TSTupleType {
6249 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6250 element_types: CloneIn::clone_in_with_semantic_ids(&self.element_types, allocator),
6251 }
6252 }
6253}
6254
6255impl<'new_alloc> CloneIn<'new_alloc> for TSNamedTupleMember<'_> {
6256 type Cloned = TSNamedTupleMember<'new_alloc>;
6257
6258 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6259 TSNamedTupleMember {
6260 span: CloneIn::clone_in(&self.span, allocator),
6261 label: CloneIn::clone_in(&self.label, allocator),
6262 element_type: CloneIn::clone_in(&self.element_type, allocator),
6263 optional: CloneIn::clone_in(&self.optional, allocator),
6264 }
6265 }
6266
6267 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6268 TSNamedTupleMember {
6269 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6270 label: CloneIn::clone_in_with_semantic_ids(&self.label, allocator),
6271 element_type: CloneIn::clone_in_with_semantic_ids(&self.element_type, allocator),
6272 optional: CloneIn::clone_in_with_semantic_ids(&self.optional, allocator),
6273 }
6274 }
6275}
6276
6277impl<'new_alloc> CloneIn<'new_alloc> for TSOptionalType<'_> {
6278 type Cloned = TSOptionalType<'new_alloc>;
6279
6280 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6281 TSOptionalType {
6282 span: CloneIn::clone_in(&self.span, allocator),
6283 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
6284 }
6285 }
6286
6287 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6288 TSOptionalType {
6289 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6290 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
6291 }
6292 }
6293}
6294
6295impl<'new_alloc> CloneIn<'new_alloc> for TSRestType<'_> {
6296 type Cloned = TSRestType<'new_alloc>;
6297
6298 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6299 TSRestType {
6300 span: CloneIn::clone_in(&self.span, allocator),
6301 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
6302 }
6303 }
6304
6305 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6306 TSRestType {
6307 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6308 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
6309 }
6310 }
6311}
6312
6313impl<'new_alloc> CloneIn<'new_alloc> for TSTupleElement<'_> {
6314 type Cloned = TSTupleElement<'new_alloc>;
6315
6316 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6317 match self {
6318 Self::TSOptionalType(it) => {
6319 TSTupleElement::TSOptionalType(CloneIn::clone_in(it, allocator))
6320 }
6321 Self::TSRestType(it) => TSTupleElement::TSRestType(CloneIn::clone_in(it, allocator)),
6322 Self::TSAnyKeyword(it) => {
6323 TSTupleElement::TSAnyKeyword(CloneIn::clone_in(it, allocator))
6324 }
6325 Self::TSBigIntKeyword(it) => {
6326 TSTupleElement::TSBigIntKeyword(CloneIn::clone_in(it, allocator))
6327 }
6328 Self::TSBooleanKeyword(it) => {
6329 TSTupleElement::TSBooleanKeyword(CloneIn::clone_in(it, allocator))
6330 }
6331 Self::TSIntrinsicKeyword(it) => {
6332 TSTupleElement::TSIntrinsicKeyword(CloneIn::clone_in(it, allocator))
6333 }
6334 Self::TSNeverKeyword(it) => {
6335 TSTupleElement::TSNeverKeyword(CloneIn::clone_in(it, allocator))
6336 }
6337 Self::TSNullKeyword(it) => {
6338 TSTupleElement::TSNullKeyword(CloneIn::clone_in(it, allocator))
6339 }
6340 Self::TSNumberKeyword(it) => {
6341 TSTupleElement::TSNumberKeyword(CloneIn::clone_in(it, allocator))
6342 }
6343 Self::TSObjectKeyword(it) => {
6344 TSTupleElement::TSObjectKeyword(CloneIn::clone_in(it, allocator))
6345 }
6346 Self::TSStringKeyword(it) => {
6347 TSTupleElement::TSStringKeyword(CloneIn::clone_in(it, allocator))
6348 }
6349 Self::TSSymbolKeyword(it) => {
6350 TSTupleElement::TSSymbolKeyword(CloneIn::clone_in(it, allocator))
6351 }
6352 Self::TSUndefinedKeyword(it) => {
6353 TSTupleElement::TSUndefinedKeyword(CloneIn::clone_in(it, allocator))
6354 }
6355 Self::TSUnknownKeyword(it) => {
6356 TSTupleElement::TSUnknownKeyword(CloneIn::clone_in(it, allocator))
6357 }
6358 Self::TSVoidKeyword(it) => {
6359 TSTupleElement::TSVoidKeyword(CloneIn::clone_in(it, allocator))
6360 }
6361 Self::TSArrayType(it) => TSTupleElement::TSArrayType(CloneIn::clone_in(it, allocator)),
6362 Self::TSConditionalType(it) => {
6363 TSTupleElement::TSConditionalType(CloneIn::clone_in(it, allocator))
6364 }
6365 Self::TSConstructorType(it) => {
6366 TSTupleElement::TSConstructorType(CloneIn::clone_in(it, allocator))
6367 }
6368 Self::TSFunctionType(it) => {
6369 TSTupleElement::TSFunctionType(CloneIn::clone_in(it, allocator))
6370 }
6371 Self::TSImportType(it) => {
6372 TSTupleElement::TSImportType(CloneIn::clone_in(it, allocator))
6373 }
6374 Self::TSIndexedAccessType(it) => {
6375 TSTupleElement::TSIndexedAccessType(CloneIn::clone_in(it, allocator))
6376 }
6377 Self::TSInferType(it) => TSTupleElement::TSInferType(CloneIn::clone_in(it, allocator)),
6378 Self::TSIntersectionType(it) => {
6379 TSTupleElement::TSIntersectionType(CloneIn::clone_in(it, allocator))
6380 }
6381 Self::TSLiteralType(it) => {
6382 TSTupleElement::TSLiteralType(CloneIn::clone_in(it, allocator))
6383 }
6384 Self::TSMappedType(it) => {
6385 TSTupleElement::TSMappedType(CloneIn::clone_in(it, allocator))
6386 }
6387 Self::TSNamedTupleMember(it) => {
6388 TSTupleElement::TSNamedTupleMember(CloneIn::clone_in(it, allocator))
6389 }
6390 Self::TSTemplateLiteralType(it) => {
6391 TSTupleElement::TSTemplateLiteralType(CloneIn::clone_in(it, allocator))
6392 }
6393 Self::TSThisType(it) => TSTupleElement::TSThisType(CloneIn::clone_in(it, allocator)),
6394 Self::TSTupleType(it) => TSTupleElement::TSTupleType(CloneIn::clone_in(it, allocator)),
6395 Self::TSTypeLiteral(it) => {
6396 TSTupleElement::TSTypeLiteral(CloneIn::clone_in(it, allocator))
6397 }
6398 Self::TSTypeOperatorType(it) => {
6399 TSTupleElement::TSTypeOperatorType(CloneIn::clone_in(it, allocator))
6400 }
6401 Self::TSTypePredicate(it) => {
6402 TSTupleElement::TSTypePredicate(CloneIn::clone_in(it, allocator))
6403 }
6404 Self::TSTypeQuery(it) => TSTupleElement::TSTypeQuery(CloneIn::clone_in(it, allocator)),
6405 Self::TSTypeReference(it) => {
6406 TSTupleElement::TSTypeReference(CloneIn::clone_in(it, allocator))
6407 }
6408 Self::TSUnionType(it) => TSTupleElement::TSUnionType(CloneIn::clone_in(it, allocator)),
6409 Self::TSParenthesizedType(it) => {
6410 TSTupleElement::TSParenthesizedType(CloneIn::clone_in(it, allocator))
6411 }
6412 Self::JSDocNullableType(it) => {
6413 TSTupleElement::JSDocNullableType(CloneIn::clone_in(it, allocator))
6414 }
6415 Self::JSDocNonNullableType(it) => {
6416 TSTupleElement::JSDocNonNullableType(CloneIn::clone_in(it, allocator))
6417 }
6418 Self::JSDocUnknownType(it) => {
6419 TSTupleElement::JSDocUnknownType(CloneIn::clone_in(it, allocator))
6420 }
6421 }
6422 }
6423
6424 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6425 match self {
6426 Self::TSOptionalType(it) => {
6427 TSTupleElement::TSOptionalType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6428 }
6429 Self::TSRestType(it) => {
6430 TSTupleElement::TSRestType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6431 }
6432 Self::TSAnyKeyword(it) => {
6433 TSTupleElement::TSAnyKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
6434 }
6435 Self::TSBigIntKeyword(it) => {
6436 TSTupleElement::TSBigIntKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
6437 }
6438 Self::TSBooleanKeyword(it) => {
6439 TSTupleElement::TSBooleanKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
6440 }
6441 Self::TSIntrinsicKeyword(it) => TSTupleElement::TSIntrinsicKeyword(
6442 CloneIn::clone_in_with_semantic_ids(it, allocator),
6443 ),
6444 Self::TSNeverKeyword(it) => {
6445 TSTupleElement::TSNeverKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
6446 }
6447 Self::TSNullKeyword(it) => {
6448 TSTupleElement::TSNullKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
6449 }
6450 Self::TSNumberKeyword(it) => {
6451 TSTupleElement::TSNumberKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
6452 }
6453 Self::TSObjectKeyword(it) => {
6454 TSTupleElement::TSObjectKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
6455 }
6456 Self::TSStringKeyword(it) => {
6457 TSTupleElement::TSStringKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
6458 }
6459 Self::TSSymbolKeyword(it) => {
6460 TSTupleElement::TSSymbolKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
6461 }
6462 Self::TSUndefinedKeyword(it) => TSTupleElement::TSUndefinedKeyword(
6463 CloneIn::clone_in_with_semantic_ids(it, allocator),
6464 ),
6465 Self::TSUnknownKeyword(it) => {
6466 TSTupleElement::TSUnknownKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
6467 }
6468 Self::TSVoidKeyword(it) => {
6469 TSTupleElement::TSVoidKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
6470 }
6471 Self::TSArrayType(it) => {
6472 TSTupleElement::TSArrayType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6473 }
6474 Self::TSConditionalType(it) => TSTupleElement::TSConditionalType(
6475 CloneIn::clone_in_with_semantic_ids(it, allocator),
6476 ),
6477 Self::TSConstructorType(it) => TSTupleElement::TSConstructorType(
6478 CloneIn::clone_in_with_semantic_ids(it, allocator),
6479 ),
6480 Self::TSFunctionType(it) => {
6481 TSTupleElement::TSFunctionType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6482 }
6483 Self::TSImportType(it) => {
6484 TSTupleElement::TSImportType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6485 }
6486 Self::TSIndexedAccessType(it) => TSTupleElement::TSIndexedAccessType(
6487 CloneIn::clone_in_with_semantic_ids(it, allocator),
6488 ),
6489 Self::TSInferType(it) => {
6490 TSTupleElement::TSInferType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6491 }
6492 Self::TSIntersectionType(it) => TSTupleElement::TSIntersectionType(
6493 CloneIn::clone_in_with_semantic_ids(it, allocator),
6494 ),
6495 Self::TSLiteralType(it) => {
6496 TSTupleElement::TSLiteralType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6497 }
6498 Self::TSMappedType(it) => {
6499 TSTupleElement::TSMappedType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6500 }
6501 Self::TSNamedTupleMember(it) => TSTupleElement::TSNamedTupleMember(
6502 CloneIn::clone_in_with_semantic_ids(it, allocator),
6503 ),
6504 Self::TSTemplateLiteralType(it) => TSTupleElement::TSTemplateLiteralType(
6505 CloneIn::clone_in_with_semantic_ids(it, allocator),
6506 ),
6507 Self::TSThisType(it) => {
6508 TSTupleElement::TSThisType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6509 }
6510 Self::TSTupleType(it) => {
6511 TSTupleElement::TSTupleType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6512 }
6513 Self::TSTypeLiteral(it) => {
6514 TSTupleElement::TSTypeLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
6515 }
6516 Self::TSTypeOperatorType(it) => TSTupleElement::TSTypeOperatorType(
6517 CloneIn::clone_in_with_semantic_ids(it, allocator),
6518 ),
6519 Self::TSTypePredicate(it) => {
6520 TSTupleElement::TSTypePredicate(CloneIn::clone_in_with_semantic_ids(it, allocator))
6521 }
6522 Self::TSTypeQuery(it) => {
6523 TSTupleElement::TSTypeQuery(CloneIn::clone_in_with_semantic_ids(it, allocator))
6524 }
6525 Self::TSTypeReference(it) => {
6526 TSTupleElement::TSTypeReference(CloneIn::clone_in_with_semantic_ids(it, allocator))
6527 }
6528 Self::TSUnionType(it) => {
6529 TSTupleElement::TSUnionType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6530 }
6531 Self::TSParenthesizedType(it) => TSTupleElement::TSParenthesizedType(
6532 CloneIn::clone_in_with_semantic_ids(it, allocator),
6533 ),
6534 Self::JSDocNullableType(it) => TSTupleElement::JSDocNullableType(
6535 CloneIn::clone_in_with_semantic_ids(it, allocator),
6536 ),
6537 Self::JSDocNonNullableType(it) => TSTupleElement::JSDocNonNullableType(
6538 CloneIn::clone_in_with_semantic_ids(it, allocator),
6539 ),
6540 Self::JSDocUnknownType(it) => {
6541 TSTupleElement::JSDocUnknownType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6542 }
6543 }
6544 }
6545}
6546
6547impl<'new_alloc> CloneIn<'new_alloc> for TSAnyKeyword {
6548 type Cloned = TSAnyKeyword;
6549
6550 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6551 TSAnyKeyword { span: CloneIn::clone_in(&self.span, allocator) }
6552 }
6553
6554 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6555 TSAnyKeyword { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6556 }
6557}
6558
6559impl<'new_alloc> CloneIn<'new_alloc> for TSStringKeyword {
6560 type Cloned = TSStringKeyword;
6561
6562 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6563 TSStringKeyword { span: CloneIn::clone_in(&self.span, allocator) }
6564 }
6565
6566 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6567 TSStringKeyword { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6568 }
6569}
6570
6571impl<'new_alloc> CloneIn<'new_alloc> for TSBooleanKeyword {
6572 type Cloned = TSBooleanKeyword;
6573
6574 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6575 TSBooleanKeyword { span: CloneIn::clone_in(&self.span, allocator) }
6576 }
6577
6578 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6579 TSBooleanKeyword { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6580 }
6581}
6582
6583impl<'new_alloc> CloneIn<'new_alloc> for TSNumberKeyword {
6584 type Cloned = TSNumberKeyword;
6585
6586 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6587 TSNumberKeyword { span: CloneIn::clone_in(&self.span, allocator) }
6588 }
6589
6590 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6591 TSNumberKeyword { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6592 }
6593}
6594
6595impl<'new_alloc> CloneIn<'new_alloc> for TSNeverKeyword {
6596 type Cloned = TSNeverKeyword;
6597
6598 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6599 TSNeverKeyword { span: CloneIn::clone_in(&self.span, allocator) }
6600 }
6601
6602 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6603 TSNeverKeyword { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6604 }
6605}
6606
6607impl<'new_alloc> CloneIn<'new_alloc> for TSIntrinsicKeyword {
6608 type Cloned = TSIntrinsicKeyword;
6609
6610 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6611 TSIntrinsicKeyword { span: CloneIn::clone_in(&self.span, allocator) }
6612 }
6613
6614 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6615 TSIntrinsicKeyword { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6616 }
6617}
6618
6619impl<'new_alloc> CloneIn<'new_alloc> for TSUnknownKeyword {
6620 type Cloned = TSUnknownKeyword;
6621
6622 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6623 TSUnknownKeyword { span: CloneIn::clone_in(&self.span, allocator) }
6624 }
6625
6626 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6627 TSUnknownKeyword { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6628 }
6629}
6630
6631impl<'new_alloc> CloneIn<'new_alloc> for TSNullKeyword {
6632 type Cloned = TSNullKeyword;
6633
6634 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6635 TSNullKeyword { span: CloneIn::clone_in(&self.span, allocator) }
6636 }
6637
6638 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6639 TSNullKeyword { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6640 }
6641}
6642
6643impl<'new_alloc> CloneIn<'new_alloc> for TSUndefinedKeyword {
6644 type Cloned = TSUndefinedKeyword;
6645
6646 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6647 TSUndefinedKeyword { span: CloneIn::clone_in(&self.span, allocator) }
6648 }
6649
6650 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6651 TSUndefinedKeyword { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6652 }
6653}
6654
6655impl<'new_alloc> CloneIn<'new_alloc> for TSVoidKeyword {
6656 type Cloned = TSVoidKeyword;
6657
6658 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6659 TSVoidKeyword { span: CloneIn::clone_in(&self.span, allocator) }
6660 }
6661
6662 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6663 TSVoidKeyword { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6664 }
6665}
6666
6667impl<'new_alloc> CloneIn<'new_alloc> for TSSymbolKeyword {
6668 type Cloned = TSSymbolKeyword;
6669
6670 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6671 TSSymbolKeyword { span: CloneIn::clone_in(&self.span, allocator) }
6672 }
6673
6674 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6675 TSSymbolKeyword { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6676 }
6677}
6678
6679impl<'new_alloc> CloneIn<'new_alloc> for TSThisType {
6680 type Cloned = TSThisType;
6681
6682 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6683 TSThisType { span: CloneIn::clone_in(&self.span, allocator) }
6684 }
6685
6686 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6687 TSThisType { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6688 }
6689}
6690
6691impl<'new_alloc> CloneIn<'new_alloc> for TSObjectKeyword {
6692 type Cloned = TSObjectKeyword;
6693
6694 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6695 TSObjectKeyword { span: CloneIn::clone_in(&self.span, allocator) }
6696 }
6697
6698 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6699 TSObjectKeyword { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6700 }
6701}
6702
6703impl<'new_alloc> CloneIn<'new_alloc> for TSBigIntKeyword {
6704 type Cloned = TSBigIntKeyword;
6705
6706 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6707 TSBigIntKeyword { span: CloneIn::clone_in(&self.span, allocator) }
6708 }
6709
6710 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6711 TSBigIntKeyword { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6712 }
6713}
6714
6715impl<'new_alloc> CloneIn<'new_alloc> for TSTypeReference<'_> {
6716 type Cloned = TSTypeReference<'new_alloc>;
6717
6718 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6719 TSTypeReference {
6720 span: CloneIn::clone_in(&self.span, allocator),
6721 type_name: CloneIn::clone_in(&self.type_name, allocator),
6722 type_arguments: CloneIn::clone_in(&self.type_arguments, allocator),
6723 }
6724 }
6725
6726 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6727 TSTypeReference {
6728 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6729 type_name: CloneIn::clone_in_with_semantic_ids(&self.type_name, allocator),
6730 type_arguments: CloneIn::clone_in_with_semantic_ids(&self.type_arguments, allocator),
6731 }
6732 }
6733}
6734
6735impl<'new_alloc> CloneIn<'new_alloc> for TSTypeName<'_> {
6736 type Cloned = TSTypeName<'new_alloc>;
6737
6738 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6739 match self {
6740 Self::IdentifierReference(it) => {
6741 TSTypeName::IdentifierReference(CloneIn::clone_in(it, allocator))
6742 }
6743 Self::QualifiedName(it) => TSTypeName::QualifiedName(CloneIn::clone_in(it, allocator)),
6744 Self::ThisExpression(it) => {
6745 TSTypeName::ThisExpression(CloneIn::clone_in(it, allocator))
6746 }
6747 }
6748 }
6749
6750 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6751 match self {
6752 Self::IdentifierReference(it) => {
6753 TSTypeName::IdentifierReference(CloneIn::clone_in_with_semantic_ids(it, allocator))
6754 }
6755 Self::QualifiedName(it) => {
6756 TSTypeName::QualifiedName(CloneIn::clone_in_with_semantic_ids(it, allocator))
6757 }
6758 Self::ThisExpression(it) => {
6759 TSTypeName::ThisExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
6760 }
6761 }
6762 }
6763}
6764
6765impl<'new_alloc> CloneIn<'new_alloc> for TSQualifiedName<'_> {
6766 type Cloned = TSQualifiedName<'new_alloc>;
6767
6768 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6769 TSQualifiedName {
6770 span: CloneIn::clone_in(&self.span, allocator),
6771 left: CloneIn::clone_in(&self.left, allocator),
6772 right: CloneIn::clone_in(&self.right, allocator),
6773 }
6774 }
6775
6776 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6777 TSQualifiedName {
6778 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6779 left: CloneIn::clone_in_with_semantic_ids(&self.left, allocator),
6780 right: CloneIn::clone_in_with_semantic_ids(&self.right, allocator),
6781 }
6782 }
6783}
6784
6785impl<'new_alloc> CloneIn<'new_alloc> for TSTypeParameterInstantiation<'_> {
6786 type Cloned = TSTypeParameterInstantiation<'new_alloc>;
6787
6788 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6789 TSTypeParameterInstantiation {
6790 span: CloneIn::clone_in(&self.span, allocator),
6791 params: CloneIn::clone_in(&self.params, allocator),
6792 }
6793 }
6794
6795 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6796 TSTypeParameterInstantiation {
6797 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6798 params: CloneIn::clone_in_with_semantic_ids(&self.params, allocator),
6799 }
6800 }
6801}
6802
6803impl<'new_alloc> CloneIn<'new_alloc> for TSTypeParameter<'_> {
6804 type Cloned = TSTypeParameter<'new_alloc>;
6805
6806 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6807 TSTypeParameter {
6808 span: CloneIn::clone_in(&self.span, allocator),
6809 name: CloneIn::clone_in(&self.name, allocator),
6810 constraint: CloneIn::clone_in(&self.constraint, allocator),
6811 default: CloneIn::clone_in(&self.default, allocator),
6812 r#in: CloneIn::clone_in(&self.r#in, allocator),
6813 out: CloneIn::clone_in(&self.out, allocator),
6814 r#const: CloneIn::clone_in(&self.r#const, allocator),
6815 }
6816 }
6817
6818 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6819 TSTypeParameter {
6820 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6821 name: CloneIn::clone_in_with_semantic_ids(&self.name, allocator),
6822 constraint: CloneIn::clone_in_with_semantic_ids(&self.constraint, allocator),
6823 default: CloneIn::clone_in_with_semantic_ids(&self.default, allocator),
6824 r#in: CloneIn::clone_in_with_semantic_ids(&self.r#in, allocator),
6825 out: CloneIn::clone_in_with_semantic_ids(&self.out, allocator),
6826 r#const: CloneIn::clone_in_with_semantic_ids(&self.r#const, allocator),
6827 }
6828 }
6829}
6830
6831impl<'new_alloc> CloneIn<'new_alloc> for TSTypeParameterDeclaration<'_> {
6832 type Cloned = TSTypeParameterDeclaration<'new_alloc>;
6833
6834 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6835 TSTypeParameterDeclaration {
6836 span: CloneIn::clone_in(&self.span, allocator),
6837 params: CloneIn::clone_in(&self.params, allocator),
6838 }
6839 }
6840
6841 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6842 TSTypeParameterDeclaration {
6843 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6844 params: CloneIn::clone_in_with_semantic_ids(&self.params, allocator),
6845 }
6846 }
6847}
6848
6849impl<'new_alloc> CloneIn<'new_alloc> for TSTypeAliasDeclaration<'_> {
6850 type Cloned = TSTypeAliasDeclaration<'new_alloc>;
6851
6852 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6853 TSTypeAliasDeclaration {
6854 span: CloneIn::clone_in(&self.span, allocator),
6855 id: CloneIn::clone_in(&self.id, allocator),
6856 type_parameters: CloneIn::clone_in(&self.type_parameters, allocator),
6857 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
6858 declare: CloneIn::clone_in(&self.declare, allocator),
6859 scope_id: Default::default(),
6860 }
6861 }
6862
6863 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6864 TSTypeAliasDeclaration {
6865 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6866 id: CloneIn::clone_in_with_semantic_ids(&self.id, allocator),
6867 type_parameters: CloneIn::clone_in_with_semantic_ids(&self.type_parameters, allocator),
6868 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
6869 declare: CloneIn::clone_in_with_semantic_ids(&self.declare, allocator),
6870 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
6871 }
6872 }
6873}
6874
6875impl<'new_alloc> CloneIn<'new_alloc> for TSAccessibility {
6876 type Cloned = TSAccessibility;
6877
6878 #[inline(always)]
6879 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6880 *self
6881 }
6882
6883 #[inline(always)]
6884 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6885 *self
6886 }
6887}
6888
6889impl<'new_alloc> CloneIn<'new_alloc> for TSClassImplements<'_> {
6890 type Cloned = TSClassImplements<'new_alloc>;
6891
6892 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6893 TSClassImplements {
6894 span: CloneIn::clone_in(&self.span, allocator),
6895 expression: CloneIn::clone_in(&self.expression, allocator),
6896 type_arguments: CloneIn::clone_in(&self.type_arguments, allocator),
6897 }
6898 }
6899
6900 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6901 TSClassImplements {
6902 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6903 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
6904 type_arguments: CloneIn::clone_in_with_semantic_ids(&self.type_arguments, allocator),
6905 }
6906 }
6907}
6908
6909impl<'new_alloc> CloneIn<'new_alloc> for TSInterfaceDeclaration<'_> {
6910 type Cloned = TSInterfaceDeclaration<'new_alloc>;
6911
6912 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6913 TSInterfaceDeclaration {
6914 span: CloneIn::clone_in(&self.span, allocator),
6915 id: CloneIn::clone_in(&self.id, allocator),
6916 type_parameters: CloneIn::clone_in(&self.type_parameters, allocator),
6917 extends: CloneIn::clone_in(&self.extends, allocator),
6918 body: CloneIn::clone_in(&self.body, allocator),
6919 declare: CloneIn::clone_in(&self.declare, allocator),
6920 scope_id: Default::default(),
6921 }
6922 }
6923
6924 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6925 TSInterfaceDeclaration {
6926 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6927 id: CloneIn::clone_in_with_semantic_ids(&self.id, allocator),
6928 type_parameters: CloneIn::clone_in_with_semantic_ids(&self.type_parameters, allocator),
6929 extends: CloneIn::clone_in_with_semantic_ids(&self.extends, allocator),
6930 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
6931 declare: CloneIn::clone_in_with_semantic_ids(&self.declare, allocator),
6932 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
6933 }
6934 }
6935}
6936
6937impl<'new_alloc> CloneIn<'new_alloc> for TSInterfaceBody<'_> {
6938 type Cloned = TSInterfaceBody<'new_alloc>;
6939
6940 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6941 TSInterfaceBody {
6942 span: CloneIn::clone_in(&self.span, allocator),
6943 body: CloneIn::clone_in(&self.body, allocator),
6944 }
6945 }
6946
6947 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6948 TSInterfaceBody {
6949 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6950 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
6951 }
6952 }
6953}
6954
6955impl<'new_alloc> CloneIn<'new_alloc> for TSPropertySignature<'_> {
6956 type Cloned = TSPropertySignature<'new_alloc>;
6957
6958 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6959 TSPropertySignature {
6960 span: CloneIn::clone_in(&self.span, allocator),
6961 computed: CloneIn::clone_in(&self.computed, allocator),
6962 optional: CloneIn::clone_in(&self.optional, allocator),
6963 readonly: CloneIn::clone_in(&self.readonly, allocator),
6964 key: CloneIn::clone_in(&self.key, allocator),
6965 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
6966 }
6967 }
6968
6969 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6970 TSPropertySignature {
6971 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6972 computed: CloneIn::clone_in_with_semantic_ids(&self.computed, allocator),
6973 optional: CloneIn::clone_in_with_semantic_ids(&self.optional, allocator),
6974 readonly: CloneIn::clone_in_with_semantic_ids(&self.readonly, allocator),
6975 key: CloneIn::clone_in_with_semantic_ids(&self.key, allocator),
6976 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
6977 }
6978 }
6979}
6980
6981impl<'new_alloc> CloneIn<'new_alloc> for TSSignature<'_> {
6982 type Cloned = TSSignature<'new_alloc>;
6983
6984 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6985 match self {
6986 Self::TSIndexSignature(it) => {
6987 TSSignature::TSIndexSignature(CloneIn::clone_in(it, allocator))
6988 }
6989 Self::TSPropertySignature(it) => {
6990 TSSignature::TSPropertySignature(CloneIn::clone_in(it, allocator))
6991 }
6992 Self::TSCallSignatureDeclaration(it) => {
6993 TSSignature::TSCallSignatureDeclaration(CloneIn::clone_in(it, allocator))
6994 }
6995 Self::TSConstructSignatureDeclaration(it) => {
6996 TSSignature::TSConstructSignatureDeclaration(CloneIn::clone_in(it, allocator))
6997 }
6998 Self::TSMethodSignature(it) => {
6999 TSSignature::TSMethodSignature(CloneIn::clone_in(it, allocator))
7000 }
7001 }
7002 }
7003
7004 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7005 match self {
7006 Self::TSIndexSignature(it) => {
7007 TSSignature::TSIndexSignature(CloneIn::clone_in_with_semantic_ids(it, allocator))
7008 }
7009 Self::TSPropertySignature(it) => {
7010 TSSignature::TSPropertySignature(CloneIn::clone_in_with_semantic_ids(it, allocator))
7011 }
7012 Self::TSCallSignatureDeclaration(it) => TSSignature::TSCallSignatureDeclaration(
7013 CloneIn::clone_in_with_semantic_ids(it, allocator),
7014 ),
7015 Self::TSConstructSignatureDeclaration(it) => {
7016 TSSignature::TSConstructSignatureDeclaration(CloneIn::clone_in_with_semantic_ids(
7017 it, allocator,
7018 ))
7019 }
7020 Self::TSMethodSignature(it) => {
7021 TSSignature::TSMethodSignature(CloneIn::clone_in_with_semantic_ids(it, allocator))
7022 }
7023 }
7024 }
7025}
7026
7027impl<'new_alloc> CloneIn<'new_alloc> for TSIndexSignature<'_> {
7028 type Cloned = TSIndexSignature<'new_alloc>;
7029
7030 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7031 TSIndexSignature {
7032 span: CloneIn::clone_in(&self.span, allocator),
7033 parameters: CloneIn::clone_in(&self.parameters, allocator),
7034 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
7035 readonly: CloneIn::clone_in(&self.readonly, allocator),
7036 r#static: CloneIn::clone_in(&self.r#static, allocator),
7037 }
7038 }
7039
7040 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7041 TSIndexSignature {
7042 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7043 parameters: CloneIn::clone_in_with_semantic_ids(&self.parameters, allocator),
7044 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
7045 readonly: CloneIn::clone_in_with_semantic_ids(&self.readonly, allocator),
7046 r#static: CloneIn::clone_in_with_semantic_ids(&self.r#static, allocator),
7047 }
7048 }
7049}
7050
7051impl<'new_alloc> CloneIn<'new_alloc> for TSCallSignatureDeclaration<'_> {
7052 type Cloned = TSCallSignatureDeclaration<'new_alloc>;
7053
7054 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7055 TSCallSignatureDeclaration {
7056 span: CloneIn::clone_in(&self.span, allocator),
7057 type_parameters: CloneIn::clone_in(&self.type_parameters, allocator),
7058 this_param: CloneIn::clone_in(&self.this_param, allocator),
7059 params: CloneIn::clone_in(&self.params, allocator),
7060 return_type: CloneIn::clone_in(&self.return_type, allocator),
7061 scope_id: Default::default(),
7062 }
7063 }
7064
7065 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7066 TSCallSignatureDeclaration {
7067 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7068 type_parameters: CloneIn::clone_in_with_semantic_ids(&self.type_parameters, allocator),
7069 this_param: CloneIn::clone_in_with_semantic_ids(&self.this_param, allocator),
7070 params: CloneIn::clone_in_with_semantic_ids(&self.params, allocator),
7071 return_type: CloneIn::clone_in_with_semantic_ids(&self.return_type, allocator),
7072 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
7073 }
7074 }
7075}
7076
7077impl<'new_alloc> CloneIn<'new_alloc> for TSMethodSignatureKind {
7078 type Cloned = TSMethodSignatureKind;
7079
7080 #[inline(always)]
7081 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7082 *self
7083 }
7084
7085 #[inline(always)]
7086 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7087 *self
7088 }
7089}
7090
7091impl<'new_alloc> CloneIn<'new_alloc> for TSMethodSignature<'_> {
7092 type Cloned = TSMethodSignature<'new_alloc>;
7093
7094 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7095 TSMethodSignature {
7096 span: CloneIn::clone_in(&self.span, allocator),
7097 key: CloneIn::clone_in(&self.key, allocator),
7098 computed: CloneIn::clone_in(&self.computed, allocator),
7099 optional: CloneIn::clone_in(&self.optional, allocator),
7100 kind: CloneIn::clone_in(&self.kind, allocator),
7101 type_parameters: CloneIn::clone_in(&self.type_parameters, allocator),
7102 this_param: CloneIn::clone_in(&self.this_param, allocator),
7103 params: CloneIn::clone_in(&self.params, allocator),
7104 return_type: CloneIn::clone_in(&self.return_type, allocator),
7105 scope_id: Default::default(),
7106 }
7107 }
7108
7109 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7110 TSMethodSignature {
7111 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7112 key: CloneIn::clone_in_with_semantic_ids(&self.key, allocator),
7113 computed: CloneIn::clone_in_with_semantic_ids(&self.computed, allocator),
7114 optional: CloneIn::clone_in_with_semantic_ids(&self.optional, allocator),
7115 kind: CloneIn::clone_in_with_semantic_ids(&self.kind, allocator),
7116 type_parameters: CloneIn::clone_in_with_semantic_ids(&self.type_parameters, allocator),
7117 this_param: CloneIn::clone_in_with_semantic_ids(&self.this_param, allocator),
7118 params: CloneIn::clone_in_with_semantic_ids(&self.params, allocator),
7119 return_type: CloneIn::clone_in_with_semantic_ids(&self.return_type, allocator),
7120 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
7121 }
7122 }
7123}
7124
7125impl<'new_alloc> CloneIn<'new_alloc> for TSConstructSignatureDeclaration<'_> {
7126 type Cloned = TSConstructSignatureDeclaration<'new_alloc>;
7127
7128 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7129 TSConstructSignatureDeclaration {
7130 span: CloneIn::clone_in(&self.span, allocator),
7131 type_parameters: CloneIn::clone_in(&self.type_parameters, allocator),
7132 params: CloneIn::clone_in(&self.params, allocator),
7133 return_type: CloneIn::clone_in(&self.return_type, allocator),
7134 scope_id: Default::default(),
7135 }
7136 }
7137
7138 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7139 TSConstructSignatureDeclaration {
7140 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7141 type_parameters: CloneIn::clone_in_with_semantic_ids(&self.type_parameters, allocator),
7142 params: CloneIn::clone_in_with_semantic_ids(&self.params, allocator),
7143 return_type: CloneIn::clone_in_with_semantic_ids(&self.return_type, allocator),
7144 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
7145 }
7146 }
7147}
7148
7149impl<'new_alloc> CloneIn<'new_alloc> for TSIndexSignatureName<'_> {
7150 type Cloned = TSIndexSignatureName<'new_alloc>;
7151
7152 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7153 TSIndexSignatureName {
7154 span: CloneIn::clone_in(&self.span, allocator),
7155 name: CloneIn::clone_in(&self.name, allocator),
7156 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
7157 }
7158 }
7159
7160 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7161 TSIndexSignatureName {
7162 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7163 name: CloneIn::clone_in_with_semantic_ids(&self.name, allocator),
7164 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
7165 }
7166 }
7167}
7168
7169impl<'new_alloc> CloneIn<'new_alloc> for TSInterfaceHeritage<'_> {
7170 type Cloned = TSInterfaceHeritage<'new_alloc>;
7171
7172 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7173 TSInterfaceHeritage {
7174 span: CloneIn::clone_in(&self.span, allocator),
7175 expression: CloneIn::clone_in(&self.expression, allocator),
7176 type_arguments: CloneIn::clone_in(&self.type_arguments, allocator),
7177 }
7178 }
7179
7180 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7181 TSInterfaceHeritage {
7182 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7183 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
7184 type_arguments: CloneIn::clone_in_with_semantic_ids(&self.type_arguments, allocator),
7185 }
7186 }
7187}
7188
7189impl<'new_alloc> CloneIn<'new_alloc> for TSTypePredicate<'_> {
7190 type Cloned = TSTypePredicate<'new_alloc>;
7191
7192 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7193 TSTypePredicate {
7194 span: CloneIn::clone_in(&self.span, allocator),
7195 parameter_name: CloneIn::clone_in(&self.parameter_name, allocator),
7196 asserts: CloneIn::clone_in(&self.asserts, allocator),
7197 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
7198 }
7199 }
7200
7201 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7202 TSTypePredicate {
7203 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7204 parameter_name: CloneIn::clone_in_with_semantic_ids(&self.parameter_name, allocator),
7205 asserts: CloneIn::clone_in_with_semantic_ids(&self.asserts, allocator),
7206 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
7207 }
7208 }
7209}
7210
7211impl<'new_alloc> CloneIn<'new_alloc> for TSTypePredicateName<'_> {
7212 type Cloned = TSTypePredicateName<'new_alloc>;
7213
7214 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7215 match self {
7216 Self::Identifier(it) => {
7217 TSTypePredicateName::Identifier(CloneIn::clone_in(it, allocator))
7218 }
7219 Self::This(it) => TSTypePredicateName::This(CloneIn::clone_in(it, allocator)),
7220 }
7221 }
7222
7223 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7224 match self {
7225 Self::Identifier(it) => {
7226 TSTypePredicateName::Identifier(CloneIn::clone_in_with_semantic_ids(it, allocator))
7227 }
7228 Self::This(it) => {
7229 TSTypePredicateName::This(CloneIn::clone_in_with_semantic_ids(it, allocator))
7230 }
7231 }
7232 }
7233}
7234
7235impl<'new_alloc> CloneIn<'new_alloc> for TSModuleDeclaration<'_> {
7236 type Cloned = TSModuleDeclaration<'new_alloc>;
7237
7238 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7239 TSModuleDeclaration {
7240 span: CloneIn::clone_in(&self.span, allocator),
7241 id: CloneIn::clone_in(&self.id, allocator),
7242 body: CloneIn::clone_in(&self.body, allocator),
7243 kind: CloneIn::clone_in(&self.kind, allocator),
7244 declare: CloneIn::clone_in(&self.declare, allocator),
7245 scope_id: Default::default(),
7246 }
7247 }
7248
7249 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7250 TSModuleDeclaration {
7251 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7252 id: CloneIn::clone_in_with_semantic_ids(&self.id, allocator),
7253 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
7254 kind: CloneIn::clone_in_with_semantic_ids(&self.kind, allocator),
7255 declare: CloneIn::clone_in_with_semantic_ids(&self.declare, allocator),
7256 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
7257 }
7258 }
7259}
7260
7261impl<'new_alloc> CloneIn<'new_alloc> for TSModuleDeclarationKind {
7262 type Cloned = TSModuleDeclarationKind;
7263
7264 #[inline(always)]
7265 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7266 *self
7267 }
7268
7269 #[inline(always)]
7270 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7271 *self
7272 }
7273}
7274
7275impl<'new_alloc> CloneIn<'new_alloc> for TSModuleDeclarationName<'_> {
7276 type Cloned = TSModuleDeclarationName<'new_alloc>;
7277
7278 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7279 match self {
7280 Self::Identifier(it) => {
7281 TSModuleDeclarationName::Identifier(CloneIn::clone_in(it, allocator))
7282 }
7283 Self::StringLiteral(it) => {
7284 TSModuleDeclarationName::StringLiteral(CloneIn::clone_in(it, allocator))
7285 }
7286 }
7287 }
7288
7289 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7290 match self {
7291 Self::Identifier(it) => TSModuleDeclarationName::Identifier(
7292 CloneIn::clone_in_with_semantic_ids(it, allocator),
7293 ),
7294 Self::StringLiteral(it) => TSModuleDeclarationName::StringLiteral(
7295 CloneIn::clone_in_with_semantic_ids(it, allocator),
7296 ),
7297 }
7298 }
7299}
7300
7301impl<'new_alloc> CloneIn<'new_alloc> for TSModuleDeclarationBody<'_> {
7302 type Cloned = TSModuleDeclarationBody<'new_alloc>;
7303
7304 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7305 match self {
7306 Self::TSModuleDeclaration(it) => {
7307 TSModuleDeclarationBody::TSModuleDeclaration(CloneIn::clone_in(it, allocator))
7308 }
7309 Self::TSModuleBlock(it) => {
7310 TSModuleDeclarationBody::TSModuleBlock(CloneIn::clone_in(it, allocator))
7311 }
7312 }
7313 }
7314
7315 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7316 match self {
7317 Self::TSModuleDeclaration(it) => TSModuleDeclarationBody::TSModuleDeclaration(
7318 CloneIn::clone_in_with_semantic_ids(it, allocator),
7319 ),
7320 Self::TSModuleBlock(it) => TSModuleDeclarationBody::TSModuleBlock(
7321 CloneIn::clone_in_with_semantic_ids(it, allocator),
7322 ),
7323 }
7324 }
7325}
7326
7327impl<'new_alloc> CloneIn<'new_alloc> for TSGlobalDeclaration<'_> {
7328 type Cloned = TSGlobalDeclaration<'new_alloc>;
7329
7330 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7331 TSGlobalDeclaration {
7332 span: CloneIn::clone_in(&self.span, allocator),
7333 global_span: CloneIn::clone_in(&self.global_span, allocator),
7334 body: CloneIn::clone_in(&self.body, allocator),
7335 declare: CloneIn::clone_in(&self.declare, allocator),
7336 scope_id: Default::default(),
7337 }
7338 }
7339
7340 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7341 TSGlobalDeclaration {
7342 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7343 global_span: CloneIn::clone_in_with_semantic_ids(&self.global_span, allocator),
7344 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
7345 declare: CloneIn::clone_in_with_semantic_ids(&self.declare, allocator),
7346 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
7347 }
7348 }
7349}
7350
7351impl<'new_alloc> CloneIn<'new_alloc> for TSModuleBlock<'_> {
7352 type Cloned = TSModuleBlock<'new_alloc>;
7353
7354 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7355 TSModuleBlock {
7356 span: CloneIn::clone_in(&self.span, allocator),
7357 directives: CloneIn::clone_in(&self.directives, allocator),
7358 body: CloneIn::clone_in(&self.body, allocator),
7359 }
7360 }
7361
7362 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7363 TSModuleBlock {
7364 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7365 directives: CloneIn::clone_in_with_semantic_ids(&self.directives, allocator),
7366 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
7367 }
7368 }
7369}
7370
7371impl<'new_alloc> CloneIn<'new_alloc> for TSTypeLiteral<'_> {
7372 type Cloned = TSTypeLiteral<'new_alloc>;
7373
7374 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7375 TSTypeLiteral {
7376 span: CloneIn::clone_in(&self.span, allocator),
7377 members: CloneIn::clone_in(&self.members, allocator),
7378 }
7379 }
7380
7381 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7382 TSTypeLiteral {
7383 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7384 members: CloneIn::clone_in_with_semantic_ids(&self.members, allocator),
7385 }
7386 }
7387}
7388
7389impl<'new_alloc> CloneIn<'new_alloc> for TSInferType<'_> {
7390 type Cloned = TSInferType<'new_alloc>;
7391
7392 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7393 TSInferType {
7394 span: CloneIn::clone_in(&self.span, allocator),
7395 type_parameter: CloneIn::clone_in(&self.type_parameter, allocator),
7396 }
7397 }
7398
7399 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7400 TSInferType {
7401 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7402 type_parameter: CloneIn::clone_in_with_semantic_ids(&self.type_parameter, allocator),
7403 }
7404 }
7405}
7406
7407impl<'new_alloc> CloneIn<'new_alloc> for TSTypeQuery<'_> {
7408 type Cloned = TSTypeQuery<'new_alloc>;
7409
7410 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7411 TSTypeQuery {
7412 span: CloneIn::clone_in(&self.span, allocator),
7413 expr_name: CloneIn::clone_in(&self.expr_name, allocator),
7414 type_arguments: CloneIn::clone_in(&self.type_arguments, allocator),
7415 }
7416 }
7417
7418 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7419 TSTypeQuery {
7420 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7421 expr_name: CloneIn::clone_in_with_semantic_ids(&self.expr_name, allocator),
7422 type_arguments: CloneIn::clone_in_with_semantic_ids(&self.type_arguments, allocator),
7423 }
7424 }
7425}
7426
7427impl<'new_alloc> CloneIn<'new_alloc> for TSTypeQueryExprName<'_> {
7428 type Cloned = TSTypeQueryExprName<'new_alloc>;
7429
7430 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7431 match self {
7432 Self::TSImportType(it) => {
7433 TSTypeQueryExprName::TSImportType(CloneIn::clone_in(it, allocator))
7434 }
7435 Self::IdentifierReference(it) => {
7436 TSTypeQueryExprName::IdentifierReference(CloneIn::clone_in(it, allocator))
7437 }
7438 Self::QualifiedName(it) => {
7439 TSTypeQueryExprName::QualifiedName(CloneIn::clone_in(it, allocator))
7440 }
7441 Self::ThisExpression(it) => {
7442 TSTypeQueryExprName::ThisExpression(CloneIn::clone_in(it, allocator))
7443 }
7444 }
7445 }
7446
7447 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7448 match self {
7449 Self::TSImportType(it) => TSTypeQueryExprName::TSImportType(
7450 CloneIn::clone_in_with_semantic_ids(it, allocator),
7451 ),
7452 Self::IdentifierReference(it) => TSTypeQueryExprName::IdentifierReference(
7453 CloneIn::clone_in_with_semantic_ids(it, allocator),
7454 ),
7455 Self::QualifiedName(it) => TSTypeQueryExprName::QualifiedName(
7456 CloneIn::clone_in_with_semantic_ids(it, allocator),
7457 ),
7458 Self::ThisExpression(it) => TSTypeQueryExprName::ThisExpression(
7459 CloneIn::clone_in_with_semantic_ids(it, allocator),
7460 ),
7461 }
7462 }
7463}
7464
7465impl<'new_alloc> CloneIn<'new_alloc> for TSImportType<'_> {
7466 type Cloned = TSImportType<'new_alloc>;
7467
7468 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7469 TSImportType {
7470 span: CloneIn::clone_in(&self.span, allocator),
7471 argument: CloneIn::clone_in(&self.argument, allocator),
7472 options: CloneIn::clone_in(&self.options, allocator),
7473 qualifier: CloneIn::clone_in(&self.qualifier, allocator),
7474 type_arguments: CloneIn::clone_in(&self.type_arguments, allocator),
7475 }
7476 }
7477
7478 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7479 TSImportType {
7480 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7481 argument: CloneIn::clone_in_with_semantic_ids(&self.argument, allocator),
7482 options: CloneIn::clone_in_with_semantic_ids(&self.options, allocator),
7483 qualifier: CloneIn::clone_in_with_semantic_ids(&self.qualifier, allocator),
7484 type_arguments: CloneIn::clone_in_with_semantic_ids(&self.type_arguments, allocator),
7485 }
7486 }
7487}
7488
7489impl<'new_alloc> CloneIn<'new_alloc> for TSImportTypeQualifier<'_> {
7490 type Cloned = TSImportTypeQualifier<'new_alloc>;
7491
7492 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7493 match self {
7494 Self::Identifier(it) => {
7495 TSImportTypeQualifier::Identifier(CloneIn::clone_in(it, allocator))
7496 }
7497 Self::QualifiedName(it) => {
7498 TSImportTypeQualifier::QualifiedName(CloneIn::clone_in(it, allocator))
7499 }
7500 }
7501 }
7502
7503 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7504 match self {
7505 Self::Identifier(it) => TSImportTypeQualifier::Identifier(
7506 CloneIn::clone_in_with_semantic_ids(it, allocator),
7507 ),
7508 Self::QualifiedName(it) => TSImportTypeQualifier::QualifiedName(
7509 CloneIn::clone_in_with_semantic_ids(it, allocator),
7510 ),
7511 }
7512 }
7513}
7514
7515impl<'new_alloc> CloneIn<'new_alloc> for TSImportTypeQualifiedName<'_> {
7516 type Cloned = TSImportTypeQualifiedName<'new_alloc>;
7517
7518 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7519 TSImportTypeQualifiedName {
7520 span: CloneIn::clone_in(&self.span, allocator),
7521 left: CloneIn::clone_in(&self.left, allocator),
7522 right: CloneIn::clone_in(&self.right, allocator),
7523 }
7524 }
7525
7526 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7527 TSImportTypeQualifiedName {
7528 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7529 left: CloneIn::clone_in_with_semantic_ids(&self.left, allocator),
7530 right: CloneIn::clone_in_with_semantic_ids(&self.right, allocator),
7531 }
7532 }
7533}
7534
7535impl<'new_alloc> CloneIn<'new_alloc> for TSFunctionType<'_> {
7536 type Cloned = TSFunctionType<'new_alloc>;
7537
7538 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7539 TSFunctionType {
7540 span: CloneIn::clone_in(&self.span, allocator),
7541 type_parameters: CloneIn::clone_in(&self.type_parameters, allocator),
7542 this_param: CloneIn::clone_in(&self.this_param, allocator),
7543 params: CloneIn::clone_in(&self.params, allocator),
7544 return_type: CloneIn::clone_in(&self.return_type, allocator),
7545 scope_id: Default::default(),
7546 }
7547 }
7548
7549 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7550 TSFunctionType {
7551 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7552 type_parameters: CloneIn::clone_in_with_semantic_ids(&self.type_parameters, allocator),
7553 this_param: CloneIn::clone_in_with_semantic_ids(&self.this_param, allocator),
7554 params: CloneIn::clone_in_with_semantic_ids(&self.params, allocator),
7555 return_type: CloneIn::clone_in_with_semantic_ids(&self.return_type, allocator),
7556 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
7557 }
7558 }
7559}
7560
7561impl<'new_alloc> CloneIn<'new_alloc> for TSConstructorType<'_> {
7562 type Cloned = TSConstructorType<'new_alloc>;
7563
7564 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7565 TSConstructorType {
7566 span: CloneIn::clone_in(&self.span, allocator),
7567 r#abstract: CloneIn::clone_in(&self.r#abstract, allocator),
7568 type_parameters: CloneIn::clone_in(&self.type_parameters, allocator),
7569 params: CloneIn::clone_in(&self.params, allocator),
7570 return_type: CloneIn::clone_in(&self.return_type, allocator),
7571 scope_id: Default::default(),
7572 }
7573 }
7574
7575 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7576 TSConstructorType {
7577 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7578 r#abstract: CloneIn::clone_in_with_semantic_ids(&self.r#abstract, allocator),
7579 type_parameters: CloneIn::clone_in_with_semantic_ids(&self.type_parameters, allocator),
7580 params: CloneIn::clone_in_with_semantic_ids(&self.params, allocator),
7581 return_type: CloneIn::clone_in_with_semantic_ids(&self.return_type, allocator),
7582 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
7583 }
7584 }
7585}
7586
7587impl<'new_alloc> CloneIn<'new_alloc> for TSMappedType<'_> {
7588 type Cloned = TSMappedType<'new_alloc>;
7589
7590 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7591 TSMappedType {
7592 span: CloneIn::clone_in(&self.span, allocator),
7593 type_parameter: CloneIn::clone_in(&self.type_parameter, allocator),
7594 name_type: CloneIn::clone_in(&self.name_type, allocator),
7595 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
7596 optional: CloneIn::clone_in(&self.optional, allocator),
7597 readonly: CloneIn::clone_in(&self.readonly, allocator),
7598 scope_id: Default::default(),
7599 }
7600 }
7601
7602 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7603 TSMappedType {
7604 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7605 type_parameter: CloneIn::clone_in_with_semantic_ids(&self.type_parameter, allocator),
7606 name_type: CloneIn::clone_in_with_semantic_ids(&self.name_type, allocator),
7607 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
7608 optional: CloneIn::clone_in_with_semantic_ids(&self.optional, allocator),
7609 readonly: CloneIn::clone_in_with_semantic_ids(&self.readonly, allocator),
7610 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
7611 }
7612 }
7613}
7614
7615impl<'new_alloc> CloneIn<'new_alloc> for TSMappedTypeModifierOperator {
7616 type Cloned = TSMappedTypeModifierOperator;
7617
7618 #[inline(always)]
7619 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7620 *self
7621 }
7622
7623 #[inline(always)]
7624 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7625 *self
7626 }
7627}
7628
7629impl<'new_alloc> CloneIn<'new_alloc> for TSTemplateLiteralType<'_> {
7630 type Cloned = TSTemplateLiteralType<'new_alloc>;
7631
7632 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7633 TSTemplateLiteralType {
7634 span: CloneIn::clone_in(&self.span, allocator),
7635 quasis: CloneIn::clone_in(&self.quasis, allocator),
7636 types: CloneIn::clone_in(&self.types, allocator),
7637 }
7638 }
7639
7640 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7641 TSTemplateLiteralType {
7642 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7643 quasis: CloneIn::clone_in_with_semantic_ids(&self.quasis, allocator),
7644 types: CloneIn::clone_in_with_semantic_ids(&self.types, allocator),
7645 }
7646 }
7647}
7648
7649impl<'new_alloc> CloneIn<'new_alloc> for TSAsExpression<'_> {
7650 type Cloned = TSAsExpression<'new_alloc>;
7651
7652 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7653 TSAsExpression {
7654 span: CloneIn::clone_in(&self.span, allocator),
7655 expression: CloneIn::clone_in(&self.expression, allocator),
7656 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
7657 }
7658 }
7659
7660 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7661 TSAsExpression {
7662 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7663 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
7664 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
7665 }
7666 }
7667}
7668
7669impl<'new_alloc> CloneIn<'new_alloc> for TSSatisfiesExpression<'_> {
7670 type Cloned = TSSatisfiesExpression<'new_alloc>;
7671
7672 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7673 TSSatisfiesExpression {
7674 span: CloneIn::clone_in(&self.span, allocator),
7675 expression: CloneIn::clone_in(&self.expression, allocator),
7676 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
7677 }
7678 }
7679
7680 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7681 TSSatisfiesExpression {
7682 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7683 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
7684 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
7685 }
7686 }
7687}
7688
7689impl<'new_alloc> CloneIn<'new_alloc> for TSTypeAssertion<'_> {
7690 type Cloned = TSTypeAssertion<'new_alloc>;
7691
7692 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7693 TSTypeAssertion {
7694 span: CloneIn::clone_in(&self.span, allocator),
7695 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
7696 expression: CloneIn::clone_in(&self.expression, allocator),
7697 }
7698 }
7699
7700 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7701 TSTypeAssertion {
7702 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7703 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
7704 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
7705 }
7706 }
7707}
7708
7709impl<'new_alloc> CloneIn<'new_alloc> for TSImportEqualsDeclaration<'_> {
7710 type Cloned = TSImportEqualsDeclaration<'new_alloc>;
7711
7712 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7713 TSImportEqualsDeclaration {
7714 span: CloneIn::clone_in(&self.span, allocator),
7715 id: CloneIn::clone_in(&self.id, allocator),
7716 module_reference: CloneIn::clone_in(&self.module_reference, allocator),
7717 import_kind: CloneIn::clone_in(&self.import_kind, allocator),
7718 }
7719 }
7720
7721 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7722 TSImportEqualsDeclaration {
7723 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7724 id: CloneIn::clone_in_with_semantic_ids(&self.id, allocator),
7725 module_reference: CloneIn::clone_in_with_semantic_ids(
7726 &self.module_reference,
7727 allocator,
7728 ),
7729 import_kind: CloneIn::clone_in_with_semantic_ids(&self.import_kind, allocator),
7730 }
7731 }
7732}
7733
7734impl<'new_alloc> CloneIn<'new_alloc> for TSModuleReference<'_> {
7735 type Cloned = TSModuleReference<'new_alloc>;
7736
7737 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7738 match self {
7739 Self::ExternalModuleReference(it) => {
7740 TSModuleReference::ExternalModuleReference(CloneIn::clone_in(it, allocator))
7741 }
7742 Self::IdentifierReference(it) => {
7743 TSModuleReference::IdentifierReference(CloneIn::clone_in(it, allocator))
7744 }
7745 Self::QualifiedName(it) => {
7746 TSModuleReference::QualifiedName(CloneIn::clone_in(it, allocator))
7747 }
7748 Self::ThisExpression(it) => {
7749 TSModuleReference::ThisExpression(CloneIn::clone_in(it, allocator))
7750 }
7751 }
7752 }
7753
7754 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7755 match self {
7756 Self::ExternalModuleReference(it) => TSModuleReference::ExternalModuleReference(
7757 CloneIn::clone_in_with_semantic_ids(it, allocator),
7758 ),
7759 Self::IdentifierReference(it) => TSModuleReference::IdentifierReference(
7760 CloneIn::clone_in_with_semantic_ids(it, allocator),
7761 ),
7762 Self::QualifiedName(it) => {
7763 TSModuleReference::QualifiedName(CloneIn::clone_in_with_semantic_ids(it, allocator))
7764 }
7765 Self::ThisExpression(it) => TSModuleReference::ThisExpression(
7766 CloneIn::clone_in_with_semantic_ids(it, allocator),
7767 ),
7768 }
7769 }
7770}
7771
7772impl<'new_alloc> CloneIn<'new_alloc> for TSExternalModuleReference<'_> {
7773 type Cloned = TSExternalModuleReference<'new_alloc>;
7774
7775 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7776 TSExternalModuleReference {
7777 span: CloneIn::clone_in(&self.span, allocator),
7778 expression: CloneIn::clone_in(&self.expression, allocator),
7779 }
7780 }
7781
7782 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7783 TSExternalModuleReference {
7784 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7785 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
7786 }
7787 }
7788}
7789
7790impl<'new_alloc> CloneIn<'new_alloc> for TSNonNullExpression<'_> {
7791 type Cloned = TSNonNullExpression<'new_alloc>;
7792
7793 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7794 TSNonNullExpression {
7795 span: CloneIn::clone_in(&self.span, allocator),
7796 expression: CloneIn::clone_in(&self.expression, allocator),
7797 }
7798 }
7799
7800 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7801 TSNonNullExpression {
7802 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7803 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
7804 }
7805 }
7806}
7807
7808impl<'new_alloc> CloneIn<'new_alloc> for Decorator<'_> {
7809 type Cloned = Decorator<'new_alloc>;
7810
7811 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7812 Decorator {
7813 span: CloneIn::clone_in(&self.span, allocator),
7814 expression: CloneIn::clone_in(&self.expression, allocator),
7815 }
7816 }
7817
7818 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7819 Decorator {
7820 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7821 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
7822 }
7823 }
7824}
7825
7826impl<'new_alloc> CloneIn<'new_alloc> for TSExportAssignment<'_> {
7827 type Cloned = TSExportAssignment<'new_alloc>;
7828
7829 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7830 TSExportAssignment {
7831 span: CloneIn::clone_in(&self.span, allocator),
7832 expression: CloneIn::clone_in(&self.expression, allocator),
7833 }
7834 }
7835
7836 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7837 TSExportAssignment {
7838 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7839 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
7840 }
7841 }
7842}
7843
7844impl<'new_alloc> CloneIn<'new_alloc> for TSNamespaceExportDeclaration<'_> {
7845 type Cloned = TSNamespaceExportDeclaration<'new_alloc>;
7846
7847 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7848 TSNamespaceExportDeclaration {
7849 span: CloneIn::clone_in(&self.span, allocator),
7850 id: CloneIn::clone_in(&self.id, allocator),
7851 }
7852 }
7853
7854 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7855 TSNamespaceExportDeclaration {
7856 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7857 id: CloneIn::clone_in_with_semantic_ids(&self.id, allocator),
7858 }
7859 }
7860}
7861
7862impl<'new_alloc> CloneIn<'new_alloc> for TSInstantiationExpression<'_> {
7863 type Cloned = TSInstantiationExpression<'new_alloc>;
7864
7865 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7866 TSInstantiationExpression {
7867 span: CloneIn::clone_in(&self.span, allocator),
7868 expression: CloneIn::clone_in(&self.expression, allocator),
7869 type_arguments: CloneIn::clone_in(&self.type_arguments, allocator),
7870 }
7871 }
7872
7873 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7874 TSInstantiationExpression {
7875 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7876 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
7877 type_arguments: CloneIn::clone_in_with_semantic_ids(&self.type_arguments, allocator),
7878 }
7879 }
7880}
7881
7882impl<'new_alloc> CloneIn<'new_alloc> for ImportOrExportKind {
7883 type Cloned = ImportOrExportKind;
7884
7885 #[inline(always)]
7886 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7887 *self
7888 }
7889
7890 #[inline(always)]
7891 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7892 *self
7893 }
7894}
7895
7896impl<'new_alloc> CloneIn<'new_alloc> for JSDocNullableType<'_> {
7897 type Cloned = JSDocNullableType<'new_alloc>;
7898
7899 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7900 JSDocNullableType {
7901 span: CloneIn::clone_in(&self.span, allocator),
7902 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
7903 postfix: CloneIn::clone_in(&self.postfix, allocator),
7904 }
7905 }
7906
7907 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7908 JSDocNullableType {
7909 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7910 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
7911 postfix: CloneIn::clone_in_with_semantic_ids(&self.postfix, allocator),
7912 }
7913 }
7914}
7915
7916impl<'new_alloc> CloneIn<'new_alloc> for JSDocNonNullableType<'_> {
7917 type Cloned = JSDocNonNullableType<'new_alloc>;
7918
7919 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7920 JSDocNonNullableType {
7921 span: CloneIn::clone_in(&self.span, allocator),
7922 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
7923 postfix: CloneIn::clone_in(&self.postfix, allocator),
7924 }
7925 }
7926
7927 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7928 JSDocNonNullableType {
7929 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7930 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
7931 postfix: CloneIn::clone_in_with_semantic_ids(&self.postfix, allocator),
7932 }
7933 }
7934}
7935
7936impl<'new_alloc> CloneIn<'new_alloc> for JSDocUnknownType {
7937 type Cloned = JSDocUnknownType;
7938
7939 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7940 JSDocUnknownType { span: CloneIn::clone_in(&self.span, allocator) }
7941 }
7942
7943 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7944 JSDocUnknownType { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
7945 }
7946}
7947
7948impl<'new_alloc> CloneIn<'new_alloc> for CommentKind {
7949 type Cloned = CommentKind;
7950
7951 #[inline(always)]
7952 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7953 *self
7954 }
7955
7956 #[inline(always)]
7957 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7958 *self
7959 }
7960}
7961
7962impl<'new_alloc> CloneIn<'new_alloc> for CommentPosition {
7963 type Cloned = CommentPosition;
7964
7965 #[inline(always)]
7966 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7967 *self
7968 }
7969
7970 #[inline(always)]
7971 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7972 *self
7973 }
7974}
7975
7976impl<'new_alloc> CloneIn<'new_alloc> for CommentContent {
7977 type Cloned = CommentContent;
7978
7979 #[inline(always)]
7980 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7981 *self
7982 }
7983
7984 #[inline(always)]
7985 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7986 *self
7987 }
7988}
7989
7990impl<'new_alloc> CloneIn<'new_alloc> for Comment {
7991 type Cloned = Comment;
7992
7993 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7994 Comment {
7995 span: CloneIn::clone_in(&self.span, allocator),
7996 attached_to: CloneIn::clone_in(&self.attached_to, allocator),
7997 kind: CloneIn::clone_in(&self.kind, allocator),
7998 position: CloneIn::clone_in(&self.position, allocator),
7999 newlines: CloneIn::clone_in(&self.newlines, allocator),
8000 content: CloneIn::clone_in(&self.content, allocator),
8001 }
8002 }
8003
8004 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
8005 Comment {
8006 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
8007 attached_to: CloneIn::clone_in_with_semantic_ids(&self.attached_to, allocator),
8008 kind: CloneIn::clone_in_with_semantic_ids(&self.kind, allocator),
8009 position: CloneIn::clone_in_with_semantic_ids(&self.position, allocator),
8010 newlines: CloneIn::clone_in_with_semantic_ids(&self.newlines, allocator),
8011 content: CloneIn::clone_in_with_semantic_ids(&self.content, allocator),
8012 }
8013 }
8014}