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::TSImportEqualsDeclaration(it) => {
2317 Statement::TSImportEqualsDeclaration(CloneIn::clone_in(it, allocator))
2318 }
2319 Self::ImportDeclaration(it) => {
2320 Statement::ImportDeclaration(CloneIn::clone_in(it, allocator))
2321 }
2322 Self::ExportAllDeclaration(it) => {
2323 Statement::ExportAllDeclaration(CloneIn::clone_in(it, allocator))
2324 }
2325 Self::ExportDefaultDeclaration(it) => {
2326 Statement::ExportDefaultDeclaration(CloneIn::clone_in(it, allocator))
2327 }
2328 Self::ExportNamedDeclaration(it) => {
2329 Statement::ExportNamedDeclaration(CloneIn::clone_in(it, allocator))
2330 }
2331 Self::TSExportAssignment(it) => {
2332 Statement::TSExportAssignment(CloneIn::clone_in(it, allocator))
2333 }
2334 Self::TSNamespaceExportDeclaration(it) => {
2335 Statement::TSNamespaceExportDeclaration(CloneIn::clone_in(it, allocator))
2336 }
2337 }
2338 }
2339
2340 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2341 match self {
2342 Self::BlockStatement(it) => {
2343 Statement::BlockStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2344 }
2345 Self::BreakStatement(it) => {
2346 Statement::BreakStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2347 }
2348 Self::ContinueStatement(it) => {
2349 Statement::ContinueStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2350 }
2351 Self::DebuggerStatement(it) => {
2352 Statement::DebuggerStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2353 }
2354 Self::DoWhileStatement(it) => {
2355 Statement::DoWhileStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2356 }
2357 Self::EmptyStatement(it) => {
2358 Statement::EmptyStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2359 }
2360 Self::ExpressionStatement(it) => {
2361 Statement::ExpressionStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2362 }
2363 Self::ForInStatement(it) => {
2364 Statement::ForInStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2365 }
2366 Self::ForOfStatement(it) => {
2367 Statement::ForOfStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2368 }
2369 Self::ForStatement(it) => {
2370 Statement::ForStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2371 }
2372 Self::IfStatement(it) => {
2373 Statement::IfStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2374 }
2375 Self::LabeledStatement(it) => {
2376 Statement::LabeledStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2377 }
2378 Self::ReturnStatement(it) => {
2379 Statement::ReturnStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2380 }
2381 Self::SwitchStatement(it) => {
2382 Statement::SwitchStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2383 }
2384 Self::ThrowStatement(it) => {
2385 Statement::ThrowStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2386 }
2387 Self::TryStatement(it) => {
2388 Statement::TryStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2389 }
2390 Self::WhileStatement(it) => {
2391 Statement::WhileStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2392 }
2393 Self::WithStatement(it) => {
2394 Statement::WithStatement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2395 }
2396 Self::VariableDeclaration(it) => {
2397 Statement::VariableDeclaration(CloneIn::clone_in_with_semantic_ids(it, allocator))
2398 }
2399 Self::FunctionDeclaration(it) => {
2400 Statement::FunctionDeclaration(CloneIn::clone_in_with_semantic_ids(it, allocator))
2401 }
2402 Self::ClassDeclaration(it) => {
2403 Statement::ClassDeclaration(CloneIn::clone_in_with_semantic_ids(it, allocator))
2404 }
2405 Self::TSTypeAliasDeclaration(it) => Statement::TSTypeAliasDeclaration(
2406 CloneIn::clone_in_with_semantic_ids(it, allocator),
2407 ),
2408 Self::TSInterfaceDeclaration(it) => Statement::TSInterfaceDeclaration(
2409 CloneIn::clone_in_with_semantic_ids(it, allocator),
2410 ),
2411 Self::TSEnumDeclaration(it) => {
2412 Statement::TSEnumDeclaration(CloneIn::clone_in_with_semantic_ids(it, allocator))
2413 }
2414 Self::TSModuleDeclaration(it) => {
2415 Statement::TSModuleDeclaration(CloneIn::clone_in_with_semantic_ids(it, allocator))
2416 }
2417 Self::TSImportEqualsDeclaration(it) => Statement::TSImportEqualsDeclaration(
2418 CloneIn::clone_in_with_semantic_ids(it, allocator),
2419 ),
2420 Self::ImportDeclaration(it) => {
2421 Statement::ImportDeclaration(CloneIn::clone_in_with_semantic_ids(it, allocator))
2422 }
2423 Self::ExportAllDeclaration(it) => {
2424 Statement::ExportAllDeclaration(CloneIn::clone_in_with_semantic_ids(it, allocator))
2425 }
2426 Self::ExportDefaultDeclaration(it) => Statement::ExportDefaultDeclaration(
2427 CloneIn::clone_in_with_semantic_ids(it, allocator),
2428 ),
2429 Self::ExportNamedDeclaration(it) => Statement::ExportNamedDeclaration(
2430 CloneIn::clone_in_with_semantic_ids(it, allocator),
2431 ),
2432 Self::TSExportAssignment(it) => {
2433 Statement::TSExportAssignment(CloneIn::clone_in_with_semantic_ids(it, allocator))
2434 }
2435 Self::TSNamespaceExportDeclaration(it) => Statement::TSNamespaceExportDeclaration(
2436 CloneIn::clone_in_with_semantic_ids(it, allocator),
2437 ),
2438 }
2439 }
2440}
2441
2442impl<'new_alloc> CloneIn<'new_alloc> for Directive<'_> {
2443 type Cloned = Directive<'new_alloc>;
2444
2445 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2446 Directive {
2447 span: CloneIn::clone_in(&self.span, allocator),
2448 expression: CloneIn::clone_in(&self.expression, allocator),
2449 directive: CloneIn::clone_in(&self.directive, allocator),
2450 }
2451 }
2452
2453 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2454 Directive {
2455 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
2456 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
2457 directive: CloneIn::clone_in_with_semantic_ids(&self.directive, allocator),
2458 }
2459 }
2460}
2461
2462impl<'new_alloc> CloneIn<'new_alloc> for Hashbang<'_> {
2463 type Cloned = Hashbang<'new_alloc>;
2464
2465 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2466 Hashbang {
2467 span: CloneIn::clone_in(&self.span, allocator),
2468 value: CloneIn::clone_in(&self.value, allocator),
2469 }
2470 }
2471
2472 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2473 Hashbang {
2474 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
2475 value: CloneIn::clone_in_with_semantic_ids(&self.value, allocator),
2476 }
2477 }
2478}
2479
2480impl<'new_alloc> CloneIn<'new_alloc> for BlockStatement<'_> {
2481 type Cloned = BlockStatement<'new_alloc>;
2482
2483 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2484 BlockStatement {
2485 span: CloneIn::clone_in(&self.span, allocator),
2486 body: CloneIn::clone_in(&self.body, allocator),
2487 scope_id: Default::default(),
2488 }
2489 }
2490
2491 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2492 BlockStatement {
2493 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
2494 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
2495 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
2496 }
2497 }
2498}
2499
2500impl<'new_alloc> CloneIn<'new_alloc> for Declaration<'_> {
2501 type Cloned = Declaration<'new_alloc>;
2502
2503 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2504 match self {
2505 Self::VariableDeclaration(it) => {
2506 Declaration::VariableDeclaration(CloneIn::clone_in(it, allocator))
2507 }
2508 Self::FunctionDeclaration(it) => {
2509 Declaration::FunctionDeclaration(CloneIn::clone_in(it, allocator))
2510 }
2511 Self::ClassDeclaration(it) => {
2512 Declaration::ClassDeclaration(CloneIn::clone_in(it, allocator))
2513 }
2514 Self::TSTypeAliasDeclaration(it) => {
2515 Declaration::TSTypeAliasDeclaration(CloneIn::clone_in(it, allocator))
2516 }
2517 Self::TSInterfaceDeclaration(it) => {
2518 Declaration::TSInterfaceDeclaration(CloneIn::clone_in(it, allocator))
2519 }
2520 Self::TSEnumDeclaration(it) => {
2521 Declaration::TSEnumDeclaration(CloneIn::clone_in(it, allocator))
2522 }
2523 Self::TSModuleDeclaration(it) => {
2524 Declaration::TSModuleDeclaration(CloneIn::clone_in(it, allocator))
2525 }
2526 Self::TSImportEqualsDeclaration(it) => {
2527 Declaration::TSImportEqualsDeclaration(CloneIn::clone_in(it, allocator))
2528 }
2529 }
2530 }
2531
2532 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2533 match self {
2534 Self::VariableDeclaration(it) => {
2535 Declaration::VariableDeclaration(CloneIn::clone_in_with_semantic_ids(it, allocator))
2536 }
2537 Self::FunctionDeclaration(it) => {
2538 Declaration::FunctionDeclaration(CloneIn::clone_in_with_semantic_ids(it, allocator))
2539 }
2540 Self::ClassDeclaration(it) => {
2541 Declaration::ClassDeclaration(CloneIn::clone_in_with_semantic_ids(it, allocator))
2542 }
2543 Self::TSTypeAliasDeclaration(it) => Declaration::TSTypeAliasDeclaration(
2544 CloneIn::clone_in_with_semantic_ids(it, allocator),
2545 ),
2546 Self::TSInterfaceDeclaration(it) => Declaration::TSInterfaceDeclaration(
2547 CloneIn::clone_in_with_semantic_ids(it, allocator),
2548 ),
2549 Self::TSEnumDeclaration(it) => {
2550 Declaration::TSEnumDeclaration(CloneIn::clone_in_with_semantic_ids(it, allocator))
2551 }
2552 Self::TSModuleDeclaration(it) => {
2553 Declaration::TSModuleDeclaration(CloneIn::clone_in_with_semantic_ids(it, allocator))
2554 }
2555 Self::TSImportEqualsDeclaration(it) => Declaration::TSImportEqualsDeclaration(
2556 CloneIn::clone_in_with_semantic_ids(it, allocator),
2557 ),
2558 }
2559 }
2560}
2561
2562impl<'new_alloc> CloneIn<'new_alloc> for VariableDeclaration<'_> {
2563 type Cloned = VariableDeclaration<'new_alloc>;
2564
2565 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2566 VariableDeclaration {
2567 span: CloneIn::clone_in(&self.span, allocator),
2568 kind: CloneIn::clone_in(&self.kind, allocator),
2569 declarations: CloneIn::clone_in(&self.declarations, allocator),
2570 declare: CloneIn::clone_in(&self.declare, allocator),
2571 }
2572 }
2573
2574 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2575 VariableDeclaration {
2576 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
2577 kind: CloneIn::clone_in_with_semantic_ids(&self.kind, allocator),
2578 declarations: CloneIn::clone_in_with_semantic_ids(&self.declarations, allocator),
2579 declare: CloneIn::clone_in_with_semantic_ids(&self.declare, allocator),
2580 }
2581 }
2582}
2583
2584impl<'new_alloc> CloneIn<'new_alloc> for VariableDeclarationKind {
2585 type Cloned = VariableDeclarationKind;
2586
2587 #[inline(always)]
2588 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2589 *self
2590 }
2591
2592 #[inline(always)]
2593 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2594 *self
2595 }
2596}
2597
2598impl<'new_alloc> CloneIn<'new_alloc> for VariableDeclarator<'_> {
2599 type Cloned = VariableDeclarator<'new_alloc>;
2600
2601 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2602 VariableDeclarator {
2603 span: CloneIn::clone_in(&self.span, allocator),
2604 kind: CloneIn::clone_in(&self.kind, allocator),
2605 id: CloneIn::clone_in(&self.id, allocator),
2606 init: CloneIn::clone_in(&self.init, allocator),
2607 definite: CloneIn::clone_in(&self.definite, allocator),
2608 }
2609 }
2610
2611 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2612 VariableDeclarator {
2613 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
2614 kind: CloneIn::clone_in_with_semantic_ids(&self.kind, allocator),
2615 id: CloneIn::clone_in_with_semantic_ids(&self.id, allocator),
2616 init: CloneIn::clone_in_with_semantic_ids(&self.init, allocator),
2617 definite: CloneIn::clone_in_with_semantic_ids(&self.definite, allocator),
2618 }
2619 }
2620}
2621
2622impl<'new_alloc> CloneIn<'new_alloc> for EmptyStatement {
2623 type Cloned = EmptyStatement;
2624
2625 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2626 EmptyStatement { span: CloneIn::clone_in(&self.span, allocator) }
2627 }
2628
2629 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2630 EmptyStatement { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
2631 }
2632}
2633
2634impl<'new_alloc> CloneIn<'new_alloc> for ExpressionStatement<'_> {
2635 type Cloned = ExpressionStatement<'new_alloc>;
2636
2637 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2638 ExpressionStatement {
2639 span: CloneIn::clone_in(&self.span, allocator),
2640 expression: CloneIn::clone_in(&self.expression, allocator),
2641 }
2642 }
2643
2644 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2645 ExpressionStatement {
2646 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
2647 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
2648 }
2649 }
2650}
2651
2652impl<'new_alloc> CloneIn<'new_alloc> for IfStatement<'_> {
2653 type Cloned = IfStatement<'new_alloc>;
2654
2655 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2656 IfStatement {
2657 span: CloneIn::clone_in(&self.span, allocator),
2658 test: CloneIn::clone_in(&self.test, allocator),
2659 consequent: CloneIn::clone_in(&self.consequent, allocator),
2660 alternate: CloneIn::clone_in(&self.alternate, allocator),
2661 }
2662 }
2663
2664 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2665 IfStatement {
2666 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
2667 test: CloneIn::clone_in_with_semantic_ids(&self.test, allocator),
2668 consequent: CloneIn::clone_in_with_semantic_ids(&self.consequent, allocator),
2669 alternate: CloneIn::clone_in_with_semantic_ids(&self.alternate, allocator),
2670 }
2671 }
2672}
2673
2674impl<'new_alloc> CloneIn<'new_alloc> for DoWhileStatement<'_> {
2675 type Cloned = DoWhileStatement<'new_alloc>;
2676
2677 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2678 DoWhileStatement {
2679 span: CloneIn::clone_in(&self.span, allocator),
2680 body: CloneIn::clone_in(&self.body, allocator),
2681 test: CloneIn::clone_in(&self.test, allocator),
2682 }
2683 }
2684
2685 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2686 DoWhileStatement {
2687 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
2688 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
2689 test: CloneIn::clone_in_with_semantic_ids(&self.test, allocator),
2690 }
2691 }
2692}
2693
2694impl<'new_alloc> CloneIn<'new_alloc> for WhileStatement<'_> {
2695 type Cloned = WhileStatement<'new_alloc>;
2696
2697 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2698 WhileStatement {
2699 span: CloneIn::clone_in(&self.span, allocator),
2700 test: CloneIn::clone_in(&self.test, allocator),
2701 body: CloneIn::clone_in(&self.body, allocator),
2702 }
2703 }
2704
2705 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2706 WhileStatement {
2707 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
2708 test: CloneIn::clone_in_with_semantic_ids(&self.test, allocator),
2709 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
2710 }
2711 }
2712}
2713
2714impl<'new_alloc> CloneIn<'new_alloc> for ForStatement<'_> {
2715 type Cloned = ForStatement<'new_alloc>;
2716
2717 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2718 ForStatement {
2719 span: CloneIn::clone_in(&self.span, allocator),
2720 init: CloneIn::clone_in(&self.init, allocator),
2721 test: CloneIn::clone_in(&self.test, allocator),
2722 update: CloneIn::clone_in(&self.update, allocator),
2723 body: CloneIn::clone_in(&self.body, allocator),
2724 scope_id: Default::default(),
2725 }
2726 }
2727
2728 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2729 ForStatement {
2730 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
2731 init: CloneIn::clone_in_with_semantic_ids(&self.init, allocator),
2732 test: CloneIn::clone_in_with_semantic_ids(&self.test, allocator),
2733 update: CloneIn::clone_in_with_semantic_ids(&self.update, allocator),
2734 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
2735 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
2736 }
2737 }
2738}
2739
2740impl<'new_alloc> CloneIn<'new_alloc> for ForStatementInit<'_> {
2741 type Cloned = ForStatementInit<'new_alloc>;
2742
2743 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2744 match self {
2745 Self::VariableDeclaration(it) => {
2746 ForStatementInit::VariableDeclaration(CloneIn::clone_in(it, allocator))
2747 }
2748 Self::BooleanLiteral(it) => {
2749 ForStatementInit::BooleanLiteral(CloneIn::clone_in(it, allocator))
2750 }
2751 Self::NullLiteral(it) => {
2752 ForStatementInit::NullLiteral(CloneIn::clone_in(it, allocator))
2753 }
2754 Self::NumericLiteral(it) => {
2755 ForStatementInit::NumericLiteral(CloneIn::clone_in(it, allocator))
2756 }
2757 Self::BigIntLiteral(it) => {
2758 ForStatementInit::BigIntLiteral(CloneIn::clone_in(it, allocator))
2759 }
2760 Self::RegExpLiteral(it) => {
2761 ForStatementInit::RegExpLiteral(CloneIn::clone_in(it, allocator))
2762 }
2763 Self::StringLiteral(it) => {
2764 ForStatementInit::StringLiteral(CloneIn::clone_in(it, allocator))
2765 }
2766 Self::TemplateLiteral(it) => {
2767 ForStatementInit::TemplateLiteral(CloneIn::clone_in(it, allocator))
2768 }
2769 Self::Identifier(it) => ForStatementInit::Identifier(CloneIn::clone_in(it, allocator)),
2770 Self::MetaProperty(it) => {
2771 ForStatementInit::MetaProperty(CloneIn::clone_in(it, allocator))
2772 }
2773 Self::Super(it) => ForStatementInit::Super(CloneIn::clone_in(it, allocator)),
2774 Self::ArrayExpression(it) => {
2775 ForStatementInit::ArrayExpression(CloneIn::clone_in(it, allocator))
2776 }
2777 Self::ArrowFunctionExpression(it) => {
2778 ForStatementInit::ArrowFunctionExpression(CloneIn::clone_in(it, allocator))
2779 }
2780 Self::AssignmentExpression(it) => {
2781 ForStatementInit::AssignmentExpression(CloneIn::clone_in(it, allocator))
2782 }
2783 Self::AwaitExpression(it) => {
2784 ForStatementInit::AwaitExpression(CloneIn::clone_in(it, allocator))
2785 }
2786 Self::BinaryExpression(it) => {
2787 ForStatementInit::BinaryExpression(CloneIn::clone_in(it, allocator))
2788 }
2789 Self::CallExpression(it) => {
2790 ForStatementInit::CallExpression(CloneIn::clone_in(it, allocator))
2791 }
2792 Self::ChainExpression(it) => {
2793 ForStatementInit::ChainExpression(CloneIn::clone_in(it, allocator))
2794 }
2795 Self::ClassExpression(it) => {
2796 ForStatementInit::ClassExpression(CloneIn::clone_in(it, allocator))
2797 }
2798 Self::ConditionalExpression(it) => {
2799 ForStatementInit::ConditionalExpression(CloneIn::clone_in(it, allocator))
2800 }
2801 Self::FunctionExpression(it) => {
2802 ForStatementInit::FunctionExpression(CloneIn::clone_in(it, allocator))
2803 }
2804 Self::ImportExpression(it) => {
2805 ForStatementInit::ImportExpression(CloneIn::clone_in(it, allocator))
2806 }
2807 Self::LogicalExpression(it) => {
2808 ForStatementInit::LogicalExpression(CloneIn::clone_in(it, allocator))
2809 }
2810 Self::NewExpression(it) => {
2811 ForStatementInit::NewExpression(CloneIn::clone_in(it, allocator))
2812 }
2813 Self::ObjectExpression(it) => {
2814 ForStatementInit::ObjectExpression(CloneIn::clone_in(it, allocator))
2815 }
2816 Self::ParenthesizedExpression(it) => {
2817 ForStatementInit::ParenthesizedExpression(CloneIn::clone_in(it, allocator))
2818 }
2819 Self::SequenceExpression(it) => {
2820 ForStatementInit::SequenceExpression(CloneIn::clone_in(it, allocator))
2821 }
2822 Self::TaggedTemplateExpression(it) => {
2823 ForStatementInit::TaggedTemplateExpression(CloneIn::clone_in(it, allocator))
2824 }
2825 Self::ThisExpression(it) => {
2826 ForStatementInit::ThisExpression(CloneIn::clone_in(it, allocator))
2827 }
2828 Self::UnaryExpression(it) => {
2829 ForStatementInit::UnaryExpression(CloneIn::clone_in(it, allocator))
2830 }
2831 Self::UpdateExpression(it) => {
2832 ForStatementInit::UpdateExpression(CloneIn::clone_in(it, allocator))
2833 }
2834 Self::YieldExpression(it) => {
2835 ForStatementInit::YieldExpression(CloneIn::clone_in(it, allocator))
2836 }
2837 Self::PrivateInExpression(it) => {
2838 ForStatementInit::PrivateInExpression(CloneIn::clone_in(it, allocator))
2839 }
2840 Self::JSXElement(it) => ForStatementInit::JSXElement(CloneIn::clone_in(it, allocator)),
2841 Self::JSXFragment(it) => {
2842 ForStatementInit::JSXFragment(CloneIn::clone_in(it, allocator))
2843 }
2844 Self::TSAsExpression(it) => {
2845 ForStatementInit::TSAsExpression(CloneIn::clone_in(it, allocator))
2846 }
2847 Self::TSSatisfiesExpression(it) => {
2848 ForStatementInit::TSSatisfiesExpression(CloneIn::clone_in(it, allocator))
2849 }
2850 Self::TSTypeAssertion(it) => {
2851 ForStatementInit::TSTypeAssertion(CloneIn::clone_in(it, allocator))
2852 }
2853 Self::TSNonNullExpression(it) => {
2854 ForStatementInit::TSNonNullExpression(CloneIn::clone_in(it, allocator))
2855 }
2856 Self::TSInstantiationExpression(it) => {
2857 ForStatementInit::TSInstantiationExpression(CloneIn::clone_in(it, allocator))
2858 }
2859 Self::V8IntrinsicExpression(it) => {
2860 ForStatementInit::V8IntrinsicExpression(CloneIn::clone_in(it, allocator))
2861 }
2862 Self::ComputedMemberExpression(it) => {
2863 ForStatementInit::ComputedMemberExpression(CloneIn::clone_in(it, allocator))
2864 }
2865 Self::StaticMemberExpression(it) => {
2866 ForStatementInit::StaticMemberExpression(CloneIn::clone_in(it, allocator))
2867 }
2868 Self::PrivateFieldExpression(it) => {
2869 ForStatementInit::PrivateFieldExpression(CloneIn::clone_in(it, allocator))
2870 }
2871 }
2872 }
2873
2874 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
2875 match self {
2876 Self::VariableDeclaration(it) => ForStatementInit::VariableDeclaration(
2877 CloneIn::clone_in_with_semantic_ids(it, allocator),
2878 ),
2879 Self::BooleanLiteral(it) => {
2880 ForStatementInit::BooleanLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
2881 }
2882 Self::NullLiteral(it) => {
2883 ForStatementInit::NullLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
2884 }
2885 Self::NumericLiteral(it) => {
2886 ForStatementInit::NumericLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
2887 }
2888 Self::BigIntLiteral(it) => {
2889 ForStatementInit::BigIntLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
2890 }
2891 Self::RegExpLiteral(it) => {
2892 ForStatementInit::RegExpLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
2893 }
2894 Self::StringLiteral(it) => {
2895 ForStatementInit::StringLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
2896 }
2897 Self::TemplateLiteral(it) => ForStatementInit::TemplateLiteral(
2898 CloneIn::clone_in_with_semantic_ids(it, allocator),
2899 ),
2900 Self::Identifier(it) => {
2901 ForStatementInit::Identifier(CloneIn::clone_in_with_semantic_ids(it, allocator))
2902 }
2903 Self::MetaProperty(it) => {
2904 ForStatementInit::MetaProperty(CloneIn::clone_in_with_semantic_ids(it, allocator))
2905 }
2906 Self::Super(it) => {
2907 ForStatementInit::Super(CloneIn::clone_in_with_semantic_ids(it, allocator))
2908 }
2909 Self::ArrayExpression(it) => ForStatementInit::ArrayExpression(
2910 CloneIn::clone_in_with_semantic_ids(it, allocator),
2911 ),
2912 Self::ArrowFunctionExpression(it) => ForStatementInit::ArrowFunctionExpression(
2913 CloneIn::clone_in_with_semantic_ids(it, allocator),
2914 ),
2915 Self::AssignmentExpression(it) => ForStatementInit::AssignmentExpression(
2916 CloneIn::clone_in_with_semantic_ids(it, allocator),
2917 ),
2918 Self::AwaitExpression(it) => ForStatementInit::AwaitExpression(
2919 CloneIn::clone_in_with_semantic_ids(it, allocator),
2920 ),
2921 Self::BinaryExpression(it) => ForStatementInit::BinaryExpression(
2922 CloneIn::clone_in_with_semantic_ids(it, allocator),
2923 ),
2924 Self::CallExpression(it) => {
2925 ForStatementInit::CallExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
2926 }
2927 Self::ChainExpression(it) => ForStatementInit::ChainExpression(
2928 CloneIn::clone_in_with_semantic_ids(it, allocator),
2929 ),
2930 Self::ClassExpression(it) => ForStatementInit::ClassExpression(
2931 CloneIn::clone_in_with_semantic_ids(it, allocator),
2932 ),
2933 Self::ConditionalExpression(it) => ForStatementInit::ConditionalExpression(
2934 CloneIn::clone_in_with_semantic_ids(it, allocator),
2935 ),
2936 Self::FunctionExpression(it) => ForStatementInit::FunctionExpression(
2937 CloneIn::clone_in_with_semantic_ids(it, allocator),
2938 ),
2939 Self::ImportExpression(it) => ForStatementInit::ImportExpression(
2940 CloneIn::clone_in_with_semantic_ids(it, allocator),
2941 ),
2942 Self::LogicalExpression(it) => ForStatementInit::LogicalExpression(
2943 CloneIn::clone_in_with_semantic_ids(it, allocator),
2944 ),
2945 Self::NewExpression(it) => {
2946 ForStatementInit::NewExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
2947 }
2948 Self::ObjectExpression(it) => ForStatementInit::ObjectExpression(
2949 CloneIn::clone_in_with_semantic_ids(it, allocator),
2950 ),
2951 Self::ParenthesizedExpression(it) => ForStatementInit::ParenthesizedExpression(
2952 CloneIn::clone_in_with_semantic_ids(it, allocator),
2953 ),
2954 Self::SequenceExpression(it) => ForStatementInit::SequenceExpression(
2955 CloneIn::clone_in_with_semantic_ids(it, allocator),
2956 ),
2957 Self::TaggedTemplateExpression(it) => ForStatementInit::TaggedTemplateExpression(
2958 CloneIn::clone_in_with_semantic_ids(it, allocator),
2959 ),
2960 Self::ThisExpression(it) => {
2961 ForStatementInit::ThisExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
2962 }
2963 Self::UnaryExpression(it) => ForStatementInit::UnaryExpression(
2964 CloneIn::clone_in_with_semantic_ids(it, allocator),
2965 ),
2966 Self::UpdateExpression(it) => ForStatementInit::UpdateExpression(
2967 CloneIn::clone_in_with_semantic_ids(it, allocator),
2968 ),
2969 Self::YieldExpression(it) => ForStatementInit::YieldExpression(
2970 CloneIn::clone_in_with_semantic_ids(it, allocator),
2971 ),
2972 Self::PrivateInExpression(it) => ForStatementInit::PrivateInExpression(
2973 CloneIn::clone_in_with_semantic_ids(it, allocator),
2974 ),
2975 Self::JSXElement(it) => {
2976 ForStatementInit::JSXElement(CloneIn::clone_in_with_semantic_ids(it, allocator))
2977 }
2978 Self::JSXFragment(it) => {
2979 ForStatementInit::JSXFragment(CloneIn::clone_in_with_semantic_ids(it, allocator))
2980 }
2981 Self::TSAsExpression(it) => {
2982 ForStatementInit::TSAsExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
2983 }
2984 Self::TSSatisfiesExpression(it) => ForStatementInit::TSSatisfiesExpression(
2985 CloneIn::clone_in_with_semantic_ids(it, allocator),
2986 ),
2987 Self::TSTypeAssertion(it) => ForStatementInit::TSTypeAssertion(
2988 CloneIn::clone_in_with_semantic_ids(it, allocator),
2989 ),
2990 Self::TSNonNullExpression(it) => ForStatementInit::TSNonNullExpression(
2991 CloneIn::clone_in_with_semantic_ids(it, allocator),
2992 ),
2993 Self::TSInstantiationExpression(it) => ForStatementInit::TSInstantiationExpression(
2994 CloneIn::clone_in_with_semantic_ids(it, allocator),
2995 ),
2996 Self::V8IntrinsicExpression(it) => ForStatementInit::V8IntrinsicExpression(
2997 CloneIn::clone_in_with_semantic_ids(it, allocator),
2998 ),
2999 Self::ComputedMemberExpression(it) => ForStatementInit::ComputedMemberExpression(
3000 CloneIn::clone_in_with_semantic_ids(it, allocator),
3001 ),
3002 Self::StaticMemberExpression(it) => ForStatementInit::StaticMemberExpression(
3003 CloneIn::clone_in_with_semantic_ids(it, allocator),
3004 ),
3005 Self::PrivateFieldExpression(it) => ForStatementInit::PrivateFieldExpression(
3006 CloneIn::clone_in_with_semantic_ids(it, allocator),
3007 ),
3008 }
3009 }
3010}
3011
3012impl<'new_alloc> CloneIn<'new_alloc> for ForInStatement<'_> {
3013 type Cloned = ForInStatement<'new_alloc>;
3014
3015 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3016 ForInStatement {
3017 span: CloneIn::clone_in(&self.span, allocator),
3018 left: CloneIn::clone_in(&self.left, allocator),
3019 right: CloneIn::clone_in(&self.right, allocator),
3020 body: CloneIn::clone_in(&self.body, allocator),
3021 scope_id: Default::default(),
3022 }
3023 }
3024
3025 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3026 ForInStatement {
3027 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3028 left: CloneIn::clone_in_with_semantic_ids(&self.left, allocator),
3029 right: CloneIn::clone_in_with_semantic_ids(&self.right, allocator),
3030 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
3031 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
3032 }
3033 }
3034}
3035
3036impl<'new_alloc> CloneIn<'new_alloc> for ForStatementLeft<'_> {
3037 type Cloned = ForStatementLeft<'new_alloc>;
3038
3039 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3040 match self {
3041 Self::VariableDeclaration(it) => {
3042 ForStatementLeft::VariableDeclaration(CloneIn::clone_in(it, allocator))
3043 }
3044 Self::AssignmentTargetIdentifier(it) => {
3045 ForStatementLeft::AssignmentTargetIdentifier(CloneIn::clone_in(it, allocator))
3046 }
3047 Self::TSAsExpression(it) => {
3048 ForStatementLeft::TSAsExpression(CloneIn::clone_in(it, allocator))
3049 }
3050 Self::TSSatisfiesExpression(it) => {
3051 ForStatementLeft::TSSatisfiesExpression(CloneIn::clone_in(it, allocator))
3052 }
3053 Self::TSNonNullExpression(it) => {
3054 ForStatementLeft::TSNonNullExpression(CloneIn::clone_in(it, allocator))
3055 }
3056 Self::TSTypeAssertion(it) => {
3057 ForStatementLeft::TSTypeAssertion(CloneIn::clone_in(it, allocator))
3058 }
3059 Self::ComputedMemberExpression(it) => {
3060 ForStatementLeft::ComputedMemberExpression(CloneIn::clone_in(it, allocator))
3061 }
3062 Self::StaticMemberExpression(it) => {
3063 ForStatementLeft::StaticMemberExpression(CloneIn::clone_in(it, allocator))
3064 }
3065 Self::PrivateFieldExpression(it) => {
3066 ForStatementLeft::PrivateFieldExpression(CloneIn::clone_in(it, allocator))
3067 }
3068 Self::ArrayAssignmentTarget(it) => {
3069 ForStatementLeft::ArrayAssignmentTarget(CloneIn::clone_in(it, allocator))
3070 }
3071 Self::ObjectAssignmentTarget(it) => {
3072 ForStatementLeft::ObjectAssignmentTarget(CloneIn::clone_in(it, allocator))
3073 }
3074 }
3075 }
3076
3077 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3078 match self {
3079 Self::VariableDeclaration(it) => ForStatementLeft::VariableDeclaration(
3080 CloneIn::clone_in_with_semantic_ids(it, allocator),
3081 ),
3082 Self::AssignmentTargetIdentifier(it) => ForStatementLeft::AssignmentTargetIdentifier(
3083 CloneIn::clone_in_with_semantic_ids(it, allocator),
3084 ),
3085 Self::TSAsExpression(it) => {
3086 ForStatementLeft::TSAsExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
3087 }
3088 Self::TSSatisfiesExpression(it) => ForStatementLeft::TSSatisfiesExpression(
3089 CloneIn::clone_in_with_semantic_ids(it, allocator),
3090 ),
3091 Self::TSNonNullExpression(it) => ForStatementLeft::TSNonNullExpression(
3092 CloneIn::clone_in_with_semantic_ids(it, allocator),
3093 ),
3094 Self::TSTypeAssertion(it) => ForStatementLeft::TSTypeAssertion(
3095 CloneIn::clone_in_with_semantic_ids(it, allocator),
3096 ),
3097 Self::ComputedMemberExpression(it) => ForStatementLeft::ComputedMemberExpression(
3098 CloneIn::clone_in_with_semantic_ids(it, allocator),
3099 ),
3100 Self::StaticMemberExpression(it) => ForStatementLeft::StaticMemberExpression(
3101 CloneIn::clone_in_with_semantic_ids(it, allocator),
3102 ),
3103 Self::PrivateFieldExpression(it) => ForStatementLeft::PrivateFieldExpression(
3104 CloneIn::clone_in_with_semantic_ids(it, allocator),
3105 ),
3106 Self::ArrayAssignmentTarget(it) => ForStatementLeft::ArrayAssignmentTarget(
3107 CloneIn::clone_in_with_semantic_ids(it, allocator),
3108 ),
3109 Self::ObjectAssignmentTarget(it) => ForStatementLeft::ObjectAssignmentTarget(
3110 CloneIn::clone_in_with_semantic_ids(it, allocator),
3111 ),
3112 }
3113 }
3114}
3115
3116impl<'new_alloc> CloneIn<'new_alloc> for ForOfStatement<'_> {
3117 type Cloned = ForOfStatement<'new_alloc>;
3118
3119 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3120 ForOfStatement {
3121 span: CloneIn::clone_in(&self.span, allocator),
3122 r#await: CloneIn::clone_in(&self.r#await, allocator),
3123 left: CloneIn::clone_in(&self.left, allocator),
3124 right: CloneIn::clone_in(&self.right, allocator),
3125 body: CloneIn::clone_in(&self.body, allocator),
3126 scope_id: Default::default(),
3127 }
3128 }
3129
3130 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3131 ForOfStatement {
3132 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3133 r#await: CloneIn::clone_in_with_semantic_ids(&self.r#await, allocator),
3134 left: CloneIn::clone_in_with_semantic_ids(&self.left, allocator),
3135 right: CloneIn::clone_in_with_semantic_ids(&self.right, allocator),
3136 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
3137 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
3138 }
3139 }
3140}
3141
3142impl<'new_alloc> CloneIn<'new_alloc> for ContinueStatement<'_> {
3143 type Cloned = ContinueStatement<'new_alloc>;
3144
3145 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3146 ContinueStatement {
3147 span: CloneIn::clone_in(&self.span, allocator),
3148 label: CloneIn::clone_in(&self.label, allocator),
3149 }
3150 }
3151
3152 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3153 ContinueStatement {
3154 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3155 label: CloneIn::clone_in_with_semantic_ids(&self.label, allocator),
3156 }
3157 }
3158}
3159
3160impl<'new_alloc> CloneIn<'new_alloc> for BreakStatement<'_> {
3161 type Cloned = BreakStatement<'new_alloc>;
3162
3163 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3164 BreakStatement {
3165 span: CloneIn::clone_in(&self.span, allocator),
3166 label: CloneIn::clone_in(&self.label, allocator),
3167 }
3168 }
3169
3170 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3171 BreakStatement {
3172 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3173 label: CloneIn::clone_in_with_semantic_ids(&self.label, allocator),
3174 }
3175 }
3176}
3177
3178impl<'new_alloc> CloneIn<'new_alloc> for ReturnStatement<'_> {
3179 type Cloned = ReturnStatement<'new_alloc>;
3180
3181 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3182 ReturnStatement {
3183 span: CloneIn::clone_in(&self.span, allocator),
3184 argument: CloneIn::clone_in(&self.argument, allocator),
3185 }
3186 }
3187
3188 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3189 ReturnStatement {
3190 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3191 argument: CloneIn::clone_in_with_semantic_ids(&self.argument, allocator),
3192 }
3193 }
3194}
3195
3196impl<'new_alloc> CloneIn<'new_alloc> for WithStatement<'_> {
3197 type Cloned = WithStatement<'new_alloc>;
3198
3199 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3200 WithStatement {
3201 span: CloneIn::clone_in(&self.span, allocator),
3202 object: CloneIn::clone_in(&self.object, allocator),
3203 body: CloneIn::clone_in(&self.body, allocator),
3204 scope_id: Default::default(),
3205 }
3206 }
3207
3208 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3209 WithStatement {
3210 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3211 object: CloneIn::clone_in_with_semantic_ids(&self.object, allocator),
3212 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
3213 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
3214 }
3215 }
3216}
3217
3218impl<'new_alloc> CloneIn<'new_alloc> for SwitchStatement<'_> {
3219 type Cloned = SwitchStatement<'new_alloc>;
3220
3221 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3222 SwitchStatement {
3223 span: CloneIn::clone_in(&self.span, allocator),
3224 discriminant: CloneIn::clone_in(&self.discriminant, allocator),
3225 cases: CloneIn::clone_in(&self.cases, allocator),
3226 scope_id: Default::default(),
3227 }
3228 }
3229
3230 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3231 SwitchStatement {
3232 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3233 discriminant: CloneIn::clone_in_with_semantic_ids(&self.discriminant, allocator),
3234 cases: CloneIn::clone_in_with_semantic_ids(&self.cases, allocator),
3235 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
3236 }
3237 }
3238}
3239
3240impl<'new_alloc> CloneIn<'new_alloc> for SwitchCase<'_> {
3241 type Cloned = SwitchCase<'new_alloc>;
3242
3243 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3244 SwitchCase {
3245 span: CloneIn::clone_in(&self.span, allocator),
3246 test: CloneIn::clone_in(&self.test, allocator),
3247 consequent: CloneIn::clone_in(&self.consequent, allocator),
3248 }
3249 }
3250
3251 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3252 SwitchCase {
3253 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3254 test: CloneIn::clone_in_with_semantic_ids(&self.test, allocator),
3255 consequent: CloneIn::clone_in_with_semantic_ids(&self.consequent, allocator),
3256 }
3257 }
3258}
3259
3260impl<'new_alloc> CloneIn<'new_alloc> for LabeledStatement<'_> {
3261 type Cloned = LabeledStatement<'new_alloc>;
3262
3263 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3264 LabeledStatement {
3265 span: CloneIn::clone_in(&self.span, allocator),
3266 label: CloneIn::clone_in(&self.label, allocator),
3267 body: CloneIn::clone_in(&self.body, allocator),
3268 }
3269 }
3270
3271 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3272 LabeledStatement {
3273 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3274 label: CloneIn::clone_in_with_semantic_ids(&self.label, allocator),
3275 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
3276 }
3277 }
3278}
3279
3280impl<'new_alloc> CloneIn<'new_alloc> for ThrowStatement<'_> {
3281 type Cloned = ThrowStatement<'new_alloc>;
3282
3283 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3284 ThrowStatement {
3285 span: CloneIn::clone_in(&self.span, allocator),
3286 argument: CloneIn::clone_in(&self.argument, allocator),
3287 }
3288 }
3289
3290 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3291 ThrowStatement {
3292 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3293 argument: CloneIn::clone_in_with_semantic_ids(&self.argument, allocator),
3294 }
3295 }
3296}
3297
3298impl<'new_alloc> CloneIn<'new_alloc> for TryStatement<'_> {
3299 type Cloned = TryStatement<'new_alloc>;
3300
3301 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3302 TryStatement {
3303 span: CloneIn::clone_in(&self.span, allocator),
3304 block: CloneIn::clone_in(&self.block, allocator),
3305 handler: CloneIn::clone_in(&self.handler, allocator),
3306 finalizer: CloneIn::clone_in(&self.finalizer, allocator),
3307 }
3308 }
3309
3310 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3311 TryStatement {
3312 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3313 block: CloneIn::clone_in_with_semantic_ids(&self.block, allocator),
3314 handler: CloneIn::clone_in_with_semantic_ids(&self.handler, allocator),
3315 finalizer: CloneIn::clone_in_with_semantic_ids(&self.finalizer, allocator),
3316 }
3317 }
3318}
3319
3320impl<'new_alloc> CloneIn<'new_alloc> for CatchClause<'_> {
3321 type Cloned = CatchClause<'new_alloc>;
3322
3323 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3324 CatchClause {
3325 span: CloneIn::clone_in(&self.span, allocator),
3326 param: CloneIn::clone_in(&self.param, allocator),
3327 body: CloneIn::clone_in(&self.body, allocator),
3328 scope_id: Default::default(),
3329 }
3330 }
3331
3332 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3333 CatchClause {
3334 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3335 param: CloneIn::clone_in_with_semantic_ids(&self.param, allocator),
3336 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
3337 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
3338 }
3339 }
3340}
3341
3342impl<'new_alloc> CloneIn<'new_alloc> for CatchParameter<'_> {
3343 type Cloned = CatchParameter<'new_alloc>;
3344
3345 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3346 CatchParameter {
3347 span: CloneIn::clone_in(&self.span, allocator),
3348 pattern: CloneIn::clone_in(&self.pattern, allocator),
3349 }
3350 }
3351
3352 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3353 CatchParameter {
3354 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3355 pattern: CloneIn::clone_in_with_semantic_ids(&self.pattern, allocator),
3356 }
3357 }
3358}
3359
3360impl<'new_alloc> CloneIn<'new_alloc> for DebuggerStatement {
3361 type Cloned = DebuggerStatement;
3362
3363 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3364 DebuggerStatement { span: CloneIn::clone_in(&self.span, allocator) }
3365 }
3366
3367 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3368 DebuggerStatement { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
3369 }
3370}
3371
3372impl<'new_alloc> CloneIn<'new_alloc> for BindingPattern<'_> {
3373 type Cloned = BindingPattern<'new_alloc>;
3374
3375 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3376 BindingPattern {
3377 kind: CloneIn::clone_in(&self.kind, allocator),
3378 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
3379 optional: CloneIn::clone_in(&self.optional, allocator),
3380 }
3381 }
3382
3383 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3384 BindingPattern {
3385 kind: CloneIn::clone_in_with_semantic_ids(&self.kind, allocator),
3386 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
3387 optional: CloneIn::clone_in_with_semantic_ids(&self.optional, allocator),
3388 }
3389 }
3390}
3391
3392impl<'new_alloc> CloneIn<'new_alloc> for BindingPatternKind<'_> {
3393 type Cloned = BindingPatternKind<'new_alloc>;
3394
3395 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3396 match self {
3397 Self::BindingIdentifier(it) => {
3398 BindingPatternKind::BindingIdentifier(CloneIn::clone_in(it, allocator))
3399 }
3400 Self::ObjectPattern(it) => {
3401 BindingPatternKind::ObjectPattern(CloneIn::clone_in(it, allocator))
3402 }
3403 Self::ArrayPattern(it) => {
3404 BindingPatternKind::ArrayPattern(CloneIn::clone_in(it, allocator))
3405 }
3406 Self::AssignmentPattern(it) => {
3407 BindingPatternKind::AssignmentPattern(CloneIn::clone_in(it, allocator))
3408 }
3409 }
3410 }
3411
3412 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3413 match self {
3414 Self::BindingIdentifier(it) => BindingPatternKind::BindingIdentifier(
3415 CloneIn::clone_in_with_semantic_ids(it, allocator),
3416 ),
3417 Self::ObjectPattern(it) => BindingPatternKind::ObjectPattern(
3418 CloneIn::clone_in_with_semantic_ids(it, allocator),
3419 ),
3420 Self::ArrayPattern(it) => {
3421 BindingPatternKind::ArrayPattern(CloneIn::clone_in_with_semantic_ids(it, allocator))
3422 }
3423 Self::AssignmentPattern(it) => BindingPatternKind::AssignmentPattern(
3424 CloneIn::clone_in_with_semantic_ids(it, allocator),
3425 ),
3426 }
3427 }
3428}
3429
3430impl<'new_alloc> CloneIn<'new_alloc> for AssignmentPattern<'_> {
3431 type Cloned = AssignmentPattern<'new_alloc>;
3432
3433 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3434 AssignmentPattern {
3435 span: CloneIn::clone_in(&self.span, allocator),
3436 left: CloneIn::clone_in(&self.left, allocator),
3437 right: CloneIn::clone_in(&self.right, allocator),
3438 }
3439 }
3440
3441 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3442 AssignmentPattern {
3443 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3444 left: CloneIn::clone_in_with_semantic_ids(&self.left, allocator),
3445 right: CloneIn::clone_in_with_semantic_ids(&self.right, allocator),
3446 }
3447 }
3448}
3449
3450impl<'new_alloc> CloneIn<'new_alloc> for ObjectPattern<'_> {
3451 type Cloned = ObjectPattern<'new_alloc>;
3452
3453 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3454 ObjectPattern {
3455 span: CloneIn::clone_in(&self.span, allocator),
3456 properties: CloneIn::clone_in(&self.properties, allocator),
3457 rest: CloneIn::clone_in(&self.rest, allocator),
3458 }
3459 }
3460
3461 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3462 ObjectPattern {
3463 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3464 properties: CloneIn::clone_in_with_semantic_ids(&self.properties, allocator),
3465 rest: CloneIn::clone_in_with_semantic_ids(&self.rest, allocator),
3466 }
3467 }
3468}
3469
3470impl<'new_alloc> CloneIn<'new_alloc> for BindingProperty<'_> {
3471 type Cloned = BindingProperty<'new_alloc>;
3472
3473 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3474 BindingProperty {
3475 span: CloneIn::clone_in(&self.span, allocator),
3476 key: CloneIn::clone_in(&self.key, allocator),
3477 value: CloneIn::clone_in(&self.value, allocator),
3478 shorthand: CloneIn::clone_in(&self.shorthand, allocator),
3479 computed: CloneIn::clone_in(&self.computed, allocator),
3480 }
3481 }
3482
3483 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3484 BindingProperty {
3485 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3486 key: CloneIn::clone_in_with_semantic_ids(&self.key, allocator),
3487 value: CloneIn::clone_in_with_semantic_ids(&self.value, allocator),
3488 shorthand: CloneIn::clone_in_with_semantic_ids(&self.shorthand, allocator),
3489 computed: CloneIn::clone_in_with_semantic_ids(&self.computed, allocator),
3490 }
3491 }
3492}
3493
3494impl<'new_alloc> CloneIn<'new_alloc> for ArrayPattern<'_> {
3495 type Cloned = ArrayPattern<'new_alloc>;
3496
3497 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3498 ArrayPattern {
3499 span: CloneIn::clone_in(&self.span, allocator),
3500 elements: CloneIn::clone_in(&self.elements, allocator),
3501 rest: CloneIn::clone_in(&self.rest, allocator),
3502 }
3503 }
3504
3505 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3506 ArrayPattern {
3507 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3508 elements: CloneIn::clone_in_with_semantic_ids(&self.elements, allocator),
3509 rest: CloneIn::clone_in_with_semantic_ids(&self.rest, allocator),
3510 }
3511 }
3512}
3513
3514impl<'new_alloc> CloneIn<'new_alloc> for BindingRestElement<'_> {
3515 type Cloned = BindingRestElement<'new_alloc>;
3516
3517 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3518 BindingRestElement {
3519 span: CloneIn::clone_in(&self.span, allocator),
3520 argument: CloneIn::clone_in(&self.argument, allocator),
3521 }
3522 }
3523
3524 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3525 BindingRestElement {
3526 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3527 argument: CloneIn::clone_in_with_semantic_ids(&self.argument, allocator),
3528 }
3529 }
3530}
3531
3532impl<'new_alloc> CloneIn<'new_alloc> for Function<'_> {
3533 type Cloned = Function<'new_alloc>;
3534
3535 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3536 Function {
3537 span: CloneIn::clone_in(&self.span, allocator),
3538 r#type: CloneIn::clone_in(&self.r#type, allocator),
3539 id: CloneIn::clone_in(&self.id, allocator),
3540 generator: CloneIn::clone_in(&self.generator, allocator),
3541 r#async: CloneIn::clone_in(&self.r#async, allocator),
3542 declare: CloneIn::clone_in(&self.declare, allocator),
3543 type_parameters: CloneIn::clone_in(&self.type_parameters, allocator),
3544 this_param: CloneIn::clone_in(&self.this_param, allocator),
3545 params: CloneIn::clone_in(&self.params, allocator),
3546 return_type: CloneIn::clone_in(&self.return_type, allocator),
3547 body: CloneIn::clone_in(&self.body, allocator),
3548 scope_id: Default::default(),
3549 pure: CloneIn::clone_in(&self.pure, allocator),
3550 pife: CloneIn::clone_in(&self.pife, allocator),
3551 }
3552 }
3553
3554 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3555 Function {
3556 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3557 r#type: CloneIn::clone_in_with_semantic_ids(&self.r#type, allocator),
3558 id: CloneIn::clone_in_with_semantic_ids(&self.id, allocator),
3559 generator: CloneIn::clone_in_with_semantic_ids(&self.generator, allocator),
3560 r#async: CloneIn::clone_in_with_semantic_ids(&self.r#async, allocator),
3561 declare: CloneIn::clone_in_with_semantic_ids(&self.declare, allocator),
3562 type_parameters: CloneIn::clone_in_with_semantic_ids(&self.type_parameters, allocator),
3563 this_param: CloneIn::clone_in_with_semantic_ids(&self.this_param, allocator),
3564 params: CloneIn::clone_in_with_semantic_ids(&self.params, allocator),
3565 return_type: CloneIn::clone_in_with_semantic_ids(&self.return_type, allocator),
3566 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
3567 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
3568 pure: CloneIn::clone_in_with_semantic_ids(&self.pure, allocator),
3569 pife: CloneIn::clone_in_with_semantic_ids(&self.pife, allocator),
3570 }
3571 }
3572}
3573
3574impl<'new_alloc> CloneIn<'new_alloc> for FunctionType {
3575 type Cloned = FunctionType;
3576
3577 #[inline(always)]
3578 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3579 *self
3580 }
3581
3582 #[inline(always)]
3583 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3584 *self
3585 }
3586}
3587
3588impl<'new_alloc> CloneIn<'new_alloc> for FormalParameters<'_> {
3589 type Cloned = FormalParameters<'new_alloc>;
3590
3591 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3592 FormalParameters {
3593 span: CloneIn::clone_in(&self.span, allocator),
3594 kind: CloneIn::clone_in(&self.kind, allocator),
3595 items: CloneIn::clone_in(&self.items, allocator),
3596 rest: CloneIn::clone_in(&self.rest, allocator),
3597 }
3598 }
3599
3600 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3601 FormalParameters {
3602 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3603 kind: CloneIn::clone_in_with_semantic_ids(&self.kind, allocator),
3604 items: CloneIn::clone_in_with_semantic_ids(&self.items, allocator),
3605 rest: CloneIn::clone_in_with_semantic_ids(&self.rest, allocator),
3606 }
3607 }
3608}
3609
3610impl<'new_alloc> CloneIn<'new_alloc> for FormalParameter<'_> {
3611 type Cloned = FormalParameter<'new_alloc>;
3612
3613 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3614 FormalParameter {
3615 span: CloneIn::clone_in(&self.span, allocator),
3616 decorators: CloneIn::clone_in(&self.decorators, allocator),
3617 pattern: CloneIn::clone_in(&self.pattern, allocator),
3618 accessibility: CloneIn::clone_in(&self.accessibility, allocator),
3619 readonly: CloneIn::clone_in(&self.readonly, allocator),
3620 r#override: CloneIn::clone_in(&self.r#override, allocator),
3621 }
3622 }
3623
3624 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3625 FormalParameter {
3626 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3627 decorators: CloneIn::clone_in_with_semantic_ids(&self.decorators, allocator),
3628 pattern: CloneIn::clone_in_with_semantic_ids(&self.pattern, allocator),
3629 accessibility: CloneIn::clone_in_with_semantic_ids(&self.accessibility, allocator),
3630 readonly: CloneIn::clone_in_with_semantic_ids(&self.readonly, allocator),
3631 r#override: CloneIn::clone_in_with_semantic_ids(&self.r#override, allocator),
3632 }
3633 }
3634}
3635
3636impl<'new_alloc> CloneIn<'new_alloc> for FormalParameterKind {
3637 type Cloned = FormalParameterKind;
3638
3639 #[inline(always)]
3640 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3641 *self
3642 }
3643
3644 #[inline(always)]
3645 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3646 *self
3647 }
3648}
3649
3650impl<'new_alloc> CloneIn<'new_alloc> for FunctionBody<'_> {
3651 type Cloned = FunctionBody<'new_alloc>;
3652
3653 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3654 FunctionBody {
3655 span: CloneIn::clone_in(&self.span, allocator),
3656 directives: CloneIn::clone_in(&self.directives, allocator),
3657 statements: CloneIn::clone_in(&self.statements, allocator),
3658 }
3659 }
3660
3661 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3662 FunctionBody {
3663 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3664 directives: CloneIn::clone_in_with_semantic_ids(&self.directives, allocator),
3665 statements: CloneIn::clone_in_with_semantic_ids(&self.statements, allocator),
3666 }
3667 }
3668}
3669
3670impl<'new_alloc> CloneIn<'new_alloc> for ArrowFunctionExpression<'_> {
3671 type Cloned = ArrowFunctionExpression<'new_alloc>;
3672
3673 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3674 ArrowFunctionExpression {
3675 span: CloneIn::clone_in(&self.span, allocator),
3676 expression: CloneIn::clone_in(&self.expression, allocator),
3677 r#async: CloneIn::clone_in(&self.r#async, allocator),
3678 type_parameters: CloneIn::clone_in(&self.type_parameters, allocator),
3679 params: CloneIn::clone_in(&self.params, allocator),
3680 return_type: CloneIn::clone_in(&self.return_type, allocator),
3681 body: CloneIn::clone_in(&self.body, allocator),
3682 scope_id: Default::default(),
3683 pure: CloneIn::clone_in(&self.pure, allocator),
3684 pife: CloneIn::clone_in(&self.pife, allocator),
3685 }
3686 }
3687
3688 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3689 ArrowFunctionExpression {
3690 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3691 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
3692 r#async: CloneIn::clone_in_with_semantic_ids(&self.r#async, allocator),
3693 type_parameters: CloneIn::clone_in_with_semantic_ids(&self.type_parameters, allocator),
3694 params: CloneIn::clone_in_with_semantic_ids(&self.params, allocator),
3695 return_type: CloneIn::clone_in_with_semantic_ids(&self.return_type, allocator),
3696 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
3697 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
3698 pure: CloneIn::clone_in_with_semantic_ids(&self.pure, allocator),
3699 pife: CloneIn::clone_in_with_semantic_ids(&self.pife, allocator),
3700 }
3701 }
3702}
3703
3704impl<'new_alloc> CloneIn<'new_alloc> for YieldExpression<'_> {
3705 type Cloned = YieldExpression<'new_alloc>;
3706
3707 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3708 YieldExpression {
3709 span: CloneIn::clone_in(&self.span, allocator),
3710 delegate: CloneIn::clone_in(&self.delegate, allocator),
3711 argument: CloneIn::clone_in(&self.argument, allocator),
3712 }
3713 }
3714
3715 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3716 YieldExpression {
3717 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3718 delegate: CloneIn::clone_in_with_semantic_ids(&self.delegate, allocator),
3719 argument: CloneIn::clone_in_with_semantic_ids(&self.argument, allocator),
3720 }
3721 }
3722}
3723
3724impl<'new_alloc> CloneIn<'new_alloc> for Class<'_> {
3725 type Cloned = Class<'new_alloc>;
3726
3727 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3728 Class {
3729 span: CloneIn::clone_in(&self.span, allocator),
3730 r#type: CloneIn::clone_in(&self.r#type, allocator),
3731 decorators: CloneIn::clone_in(&self.decorators, allocator),
3732 id: CloneIn::clone_in(&self.id, allocator),
3733 type_parameters: CloneIn::clone_in(&self.type_parameters, allocator),
3734 super_class: CloneIn::clone_in(&self.super_class, allocator),
3735 super_type_arguments: CloneIn::clone_in(&self.super_type_arguments, allocator),
3736 implements: CloneIn::clone_in(&self.implements, allocator),
3737 body: CloneIn::clone_in(&self.body, allocator),
3738 r#abstract: CloneIn::clone_in(&self.r#abstract, allocator),
3739 declare: CloneIn::clone_in(&self.declare, allocator),
3740 scope_id: Default::default(),
3741 }
3742 }
3743
3744 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3745 Class {
3746 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3747 r#type: CloneIn::clone_in_with_semantic_ids(&self.r#type, allocator),
3748 decorators: CloneIn::clone_in_with_semantic_ids(&self.decorators, allocator),
3749 id: CloneIn::clone_in_with_semantic_ids(&self.id, allocator),
3750 type_parameters: CloneIn::clone_in_with_semantic_ids(&self.type_parameters, allocator),
3751 super_class: CloneIn::clone_in_with_semantic_ids(&self.super_class, allocator),
3752 super_type_arguments: CloneIn::clone_in_with_semantic_ids(
3753 &self.super_type_arguments,
3754 allocator,
3755 ),
3756 implements: CloneIn::clone_in_with_semantic_ids(&self.implements, allocator),
3757 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
3758 r#abstract: CloneIn::clone_in_with_semantic_ids(&self.r#abstract, allocator),
3759 declare: CloneIn::clone_in_with_semantic_ids(&self.declare, allocator),
3760 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
3761 }
3762 }
3763}
3764
3765impl<'new_alloc> CloneIn<'new_alloc> for ClassType {
3766 type Cloned = ClassType;
3767
3768 #[inline(always)]
3769 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3770 *self
3771 }
3772
3773 #[inline(always)]
3774 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3775 *self
3776 }
3777}
3778
3779impl<'new_alloc> CloneIn<'new_alloc> for ClassBody<'_> {
3780 type Cloned = ClassBody<'new_alloc>;
3781
3782 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3783 ClassBody {
3784 span: CloneIn::clone_in(&self.span, allocator),
3785 body: CloneIn::clone_in(&self.body, allocator),
3786 }
3787 }
3788
3789 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3790 ClassBody {
3791 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3792 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
3793 }
3794 }
3795}
3796
3797impl<'new_alloc> CloneIn<'new_alloc> for ClassElement<'_> {
3798 type Cloned = ClassElement<'new_alloc>;
3799
3800 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3801 match self {
3802 Self::StaticBlock(it) => ClassElement::StaticBlock(CloneIn::clone_in(it, allocator)),
3803 Self::MethodDefinition(it) => {
3804 ClassElement::MethodDefinition(CloneIn::clone_in(it, allocator))
3805 }
3806 Self::PropertyDefinition(it) => {
3807 ClassElement::PropertyDefinition(CloneIn::clone_in(it, allocator))
3808 }
3809 Self::AccessorProperty(it) => {
3810 ClassElement::AccessorProperty(CloneIn::clone_in(it, allocator))
3811 }
3812 Self::TSIndexSignature(it) => {
3813 ClassElement::TSIndexSignature(CloneIn::clone_in(it, allocator))
3814 }
3815 }
3816 }
3817
3818 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3819 match self {
3820 Self::StaticBlock(it) => {
3821 ClassElement::StaticBlock(CloneIn::clone_in_with_semantic_ids(it, allocator))
3822 }
3823 Self::MethodDefinition(it) => {
3824 ClassElement::MethodDefinition(CloneIn::clone_in_with_semantic_ids(it, allocator))
3825 }
3826 Self::PropertyDefinition(it) => {
3827 ClassElement::PropertyDefinition(CloneIn::clone_in_with_semantic_ids(it, allocator))
3828 }
3829 Self::AccessorProperty(it) => {
3830 ClassElement::AccessorProperty(CloneIn::clone_in_with_semantic_ids(it, allocator))
3831 }
3832 Self::TSIndexSignature(it) => {
3833 ClassElement::TSIndexSignature(CloneIn::clone_in_with_semantic_ids(it, allocator))
3834 }
3835 }
3836 }
3837}
3838
3839impl<'new_alloc> CloneIn<'new_alloc> for MethodDefinition<'_> {
3840 type Cloned = MethodDefinition<'new_alloc>;
3841
3842 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3843 MethodDefinition {
3844 span: CloneIn::clone_in(&self.span, allocator),
3845 r#type: CloneIn::clone_in(&self.r#type, allocator),
3846 decorators: CloneIn::clone_in(&self.decorators, allocator),
3847 key: CloneIn::clone_in(&self.key, allocator),
3848 value: CloneIn::clone_in(&self.value, allocator),
3849 kind: CloneIn::clone_in(&self.kind, allocator),
3850 computed: CloneIn::clone_in(&self.computed, allocator),
3851 r#static: CloneIn::clone_in(&self.r#static, allocator),
3852 r#override: CloneIn::clone_in(&self.r#override, allocator),
3853 optional: CloneIn::clone_in(&self.optional, allocator),
3854 accessibility: CloneIn::clone_in(&self.accessibility, allocator),
3855 }
3856 }
3857
3858 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3859 MethodDefinition {
3860 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3861 r#type: CloneIn::clone_in_with_semantic_ids(&self.r#type, allocator),
3862 decorators: CloneIn::clone_in_with_semantic_ids(&self.decorators, allocator),
3863 key: CloneIn::clone_in_with_semantic_ids(&self.key, allocator),
3864 value: CloneIn::clone_in_with_semantic_ids(&self.value, allocator),
3865 kind: CloneIn::clone_in_with_semantic_ids(&self.kind, allocator),
3866 computed: CloneIn::clone_in_with_semantic_ids(&self.computed, allocator),
3867 r#static: CloneIn::clone_in_with_semantic_ids(&self.r#static, allocator),
3868 r#override: CloneIn::clone_in_with_semantic_ids(&self.r#override, allocator),
3869 optional: CloneIn::clone_in_with_semantic_ids(&self.optional, allocator),
3870 accessibility: CloneIn::clone_in_with_semantic_ids(&self.accessibility, allocator),
3871 }
3872 }
3873}
3874
3875impl<'new_alloc> CloneIn<'new_alloc> for MethodDefinitionType {
3876 type Cloned = MethodDefinitionType;
3877
3878 #[inline(always)]
3879 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3880 *self
3881 }
3882
3883 #[inline(always)]
3884 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3885 *self
3886 }
3887}
3888
3889impl<'new_alloc> CloneIn<'new_alloc> for PropertyDefinition<'_> {
3890 type Cloned = PropertyDefinition<'new_alloc>;
3891
3892 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3893 PropertyDefinition {
3894 span: CloneIn::clone_in(&self.span, allocator),
3895 r#type: CloneIn::clone_in(&self.r#type, allocator),
3896 decorators: CloneIn::clone_in(&self.decorators, allocator),
3897 key: CloneIn::clone_in(&self.key, allocator),
3898 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
3899 value: CloneIn::clone_in(&self.value, allocator),
3900 computed: CloneIn::clone_in(&self.computed, allocator),
3901 r#static: CloneIn::clone_in(&self.r#static, allocator),
3902 declare: CloneIn::clone_in(&self.declare, allocator),
3903 r#override: CloneIn::clone_in(&self.r#override, allocator),
3904 optional: CloneIn::clone_in(&self.optional, allocator),
3905 definite: CloneIn::clone_in(&self.definite, allocator),
3906 readonly: CloneIn::clone_in(&self.readonly, allocator),
3907 accessibility: CloneIn::clone_in(&self.accessibility, allocator),
3908 }
3909 }
3910
3911 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3912 PropertyDefinition {
3913 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3914 r#type: CloneIn::clone_in_with_semantic_ids(&self.r#type, allocator),
3915 decorators: CloneIn::clone_in_with_semantic_ids(&self.decorators, allocator),
3916 key: CloneIn::clone_in_with_semantic_ids(&self.key, allocator),
3917 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
3918 value: CloneIn::clone_in_with_semantic_ids(&self.value, allocator),
3919 computed: CloneIn::clone_in_with_semantic_ids(&self.computed, allocator),
3920 r#static: CloneIn::clone_in_with_semantic_ids(&self.r#static, allocator),
3921 declare: CloneIn::clone_in_with_semantic_ids(&self.declare, allocator),
3922 r#override: CloneIn::clone_in_with_semantic_ids(&self.r#override, allocator),
3923 optional: CloneIn::clone_in_with_semantic_ids(&self.optional, allocator),
3924 definite: CloneIn::clone_in_with_semantic_ids(&self.definite, allocator),
3925 readonly: CloneIn::clone_in_with_semantic_ids(&self.readonly, allocator),
3926 accessibility: CloneIn::clone_in_with_semantic_ids(&self.accessibility, allocator),
3927 }
3928 }
3929}
3930
3931impl<'new_alloc> CloneIn<'new_alloc> for PropertyDefinitionType {
3932 type Cloned = PropertyDefinitionType;
3933
3934 #[inline(always)]
3935 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3936 *self
3937 }
3938
3939 #[inline(always)]
3940 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3941 *self
3942 }
3943}
3944
3945impl<'new_alloc> CloneIn<'new_alloc> for MethodDefinitionKind {
3946 type Cloned = MethodDefinitionKind;
3947
3948 #[inline(always)]
3949 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3950 *self
3951 }
3952
3953 #[inline(always)]
3954 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3955 *self
3956 }
3957}
3958
3959impl<'new_alloc> CloneIn<'new_alloc> for PrivateIdentifier<'_> {
3960 type Cloned = PrivateIdentifier<'new_alloc>;
3961
3962 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3963 PrivateIdentifier {
3964 span: CloneIn::clone_in(&self.span, allocator),
3965 name: CloneIn::clone_in(&self.name, allocator),
3966 }
3967 }
3968
3969 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3970 PrivateIdentifier {
3971 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3972 name: CloneIn::clone_in_with_semantic_ids(&self.name, allocator),
3973 }
3974 }
3975}
3976
3977impl<'new_alloc> CloneIn<'new_alloc> for StaticBlock<'_> {
3978 type Cloned = StaticBlock<'new_alloc>;
3979
3980 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3981 StaticBlock {
3982 span: CloneIn::clone_in(&self.span, allocator),
3983 body: CloneIn::clone_in(&self.body, allocator),
3984 scope_id: Default::default(),
3985 }
3986 }
3987
3988 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
3989 StaticBlock {
3990 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
3991 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
3992 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
3993 }
3994 }
3995}
3996
3997impl<'new_alloc> CloneIn<'new_alloc> for ModuleDeclaration<'_> {
3998 type Cloned = ModuleDeclaration<'new_alloc>;
3999
4000 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4001 match self {
4002 Self::ImportDeclaration(it) => {
4003 ModuleDeclaration::ImportDeclaration(CloneIn::clone_in(it, allocator))
4004 }
4005 Self::ExportAllDeclaration(it) => {
4006 ModuleDeclaration::ExportAllDeclaration(CloneIn::clone_in(it, allocator))
4007 }
4008 Self::ExportDefaultDeclaration(it) => {
4009 ModuleDeclaration::ExportDefaultDeclaration(CloneIn::clone_in(it, allocator))
4010 }
4011 Self::ExportNamedDeclaration(it) => {
4012 ModuleDeclaration::ExportNamedDeclaration(CloneIn::clone_in(it, allocator))
4013 }
4014 Self::TSExportAssignment(it) => {
4015 ModuleDeclaration::TSExportAssignment(CloneIn::clone_in(it, allocator))
4016 }
4017 Self::TSNamespaceExportDeclaration(it) => {
4018 ModuleDeclaration::TSNamespaceExportDeclaration(CloneIn::clone_in(it, allocator))
4019 }
4020 }
4021 }
4022
4023 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4024 match self {
4025 Self::ImportDeclaration(it) => ModuleDeclaration::ImportDeclaration(
4026 CloneIn::clone_in_with_semantic_ids(it, allocator),
4027 ),
4028 Self::ExportAllDeclaration(it) => ModuleDeclaration::ExportAllDeclaration(
4029 CloneIn::clone_in_with_semantic_ids(it, allocator),
4030 ),
4031 Self::ExportDefaultDeclaration(it) => ModuleDeclaration::ExportDefaultDeclaration(
4032 CloneIn::clone_in_with_semantic_ids(it, allocator),
4033 ),
4034 Self::ExportNamedDeclaration(it) => ModuleDeclaration::ExportNamedDeclaration(
4035 CloneIn::clone_in_with_semantic_ids(it, allocator),
4036 ),
4037 Self::TSExportAssignment(it) => ModuleDeclaration::TSExportAssignment(
4038 CloneIn::clone_in_with_semantic_ids(it, allocator),
4039 ),
4040 Self::TSNamespaceExportDeclaration(it) => {
4041 ModuleDeclaration::TSNamespaceExportDeclaration(
4042 CloneIn::clone_in_with_semantic_ids(it, allocator),
4043 )
4044 }
4045 }
4046 }
4047}
4048
4049impl<'new_alloc> CloneIn<'new_alloc> for AccessorPropertyType {
4050 type Cloned = AccessorPropertyType;
4051
4052 #[inline(always)]
4053 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4054 *self
4055 }
4056
4057 #[inline(always)]
4058 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4059 *self
4060 }
4061}
4062
4063impl<'new_alloc> CloneIn<'new_alloc> for AccessorProperty<'_> {
4064 type Cloned = AccessorProperty<'new_alloc>;
4065
4066 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4067 AccessorProperty {
4068 span: CloneIn::clone_in(&self.span, allocator),
4069 r#type: CloneIn::clone_in(&self.r#type, allocator),
4070 decorators: CloneIn::clone_in(&self.decorators, allocator),
4071 key: CloneIn::clone_in(&self.key, allocator),
4072 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
4073 value: CloneIn::clone_in(&self.value, allocator),
4074 computed: CloneIn::clone_in(&self.computed, allocator),
4075 r#static: CloneIn::clone_in(&self.r#static, allocator),
4076 r#override: CloneIn::clone_in(&self.r#override, allocator),
4077 definite: CloneIn::clone_in(&self.definite, allocator),
4078 accessibility: CloneIn::clone_in(&self.accessibility, allocator),
4079 }
4080 }
4081
4082 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4083 AccessorProperty {
4084 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4085 r#type: CloneIn::clone_in_with_semantic_ids(&self.r#type, allocator),
4086 decorators: CloneIn::clone_in_with_semantic_ids(&self.decorators, allocator),
4087 key: CloneIn::clone_in_with_semantic_ids(&self.key, allocator),
4088 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
4089 value: CloneIn::clone_in_with_semantic_ids(&self.value, allocator),
4090 computed: CloneIn::clone_in_with_semantic_ids(&self.computed, allocator),
4091 r#static: CloneIn::clone_in_with_semantic_ids(&self.r#static, allocator),
4092 r#override: CloneIn::clone_in_with_semantic_ids(&self.r#override, allocator),
4093 definite: CloneIn::clone_in_with_semantic_ids(&self.definite, allocator),
4094 accessibility: CloneIn::clone_in_with_semantic_ids(&self.accessibility, allocator),
4095 }
4096 }
4097}
4098
4099impl<'new_alloc> CloneIn<'new_alloc> for ImportExpression<'_> {
4100 type Cloned = ImportExpression<'new_alloc>;
4101
4102 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4103 ImportExpression {
4104 span: CloneIn::clone_in(&self.span, allocator),
4105 source: CloneIn::clone_in(&self.source, allocator),
4106 options: CloneIn::clone_in(&self.options, allocator),
4107 phase: CloneIn::clone_in(&self.phase, allocator),
4108 }
4109 }
4110
4111 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4112 ImportExpression {
4113 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4114 source: CloneIn::clone_in_with_semantic_ids(&self.source, allocator),
4115 options: CloneIn::clone_in_with_semantic_ids(&self.options, allocator),
4116 phase: CloneIn::clone_in_with_semantic_ids(&self.phase, allocator),
4117 }
4118 }
4119}
4120
4121impl<'new_alloc> CloneIn<'new_alloc> for ImportDeclaration<'_> {
4122 type Cloned = ImportDeclaration<'new_alloc>;
4123
4124 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4125 ImportDeclaration {
4126 span: CloneIn::clone_in(&self.span, allocator),
4127 specifiers: CloneIn::clone_in(&self.specifiers, allocator),
4128 source: CloneIn::clone_in(&self.source, allocator),
4129 phase: CloneIn::clone_in(&self.phase, allocator),
4130 with_clause: CloneIn::clone_in(&self.with_clause, allocator),
4131 import_kind: CloneIn::clone_in(&self.import_kind, allocator),
4132 }
4133 }
4134
4135 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4136 ImportDeclaration {
4137 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4138 specifiers: CloneIn::clone_in_with_semantic_ids(&self.specifiers, allocator),
4139 source: CloneIn::clone_in_with_semantic_ids(&self.source, allocator),
4140 phase: CloneIn::clone_in_with_semantic_ids(&self.phase, allocator),
4141 with_clause: CloneIn::clone_in_with_semantic_ids(&self.with_clause, allocator),
4142 import_kind: CloneIn::clone_in_with_semantic_ids(&self.import_kind, allocator),
4143 }
4144 }
4145}
4146
4147impl<'new_alloc> CloneIn<'new_alloc> for ImportPhase {
4148 type Cloned = ImportPhase;
4149
4150 #[inline(always)]
4151 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4152 *self
4153 }
4154
4155 #[inline(always)]
4156 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4157 *self
4158 }
4159}
4160
4161impl<'new_alloc> CloneIn<'new_alloc> for ImportDeclarationSpecifier<'_> {
4162 type Cloned = ImportDeclarationSpecifier<'new_alloc>;
4163
4164 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4165 match self {
4166 Self::ImportSpecifier(it) => {
4167 ImportDeclarationSpecifier::ImportSpecifier(CloneIn::clone_in(it, allocator))
4168 }
4169 Self::ImportDefaultSpecifier(it) => {
4170 ImportDeclarationSpecifier::ImportDefaultSpecifier(CloneIn::clone_in(it, allocator))
4171 }
4172 Self::ImportNamespaceSpecifier(it) => {
4173 ImportDeclarationSpecifier::ImportNamespaceSpecifier(CloneIn::clone_in(
4174 it, allocator,
4175 ))
4176 }
4177 }
4178 }
4179
4180 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4181 match self {
4182 Self::ImportSpecifier(it) => ImportDeclarationSpecifier::ImportSpecifier(
4183 CloneIn::clone_in_with_semantic_ids(it, allocator),
4184 ),
4185 Self::ImportDefaultSpecifier(it) => ImportDeclarationSpecifier::ImportDefaultSpecifier(
4186 CloneIn::clone_in_with_semantic_ids(it, allocator),
4187 ),
4188 Self::ImportNamespaceSpecifier(it) => {
4189 ImportDeclarationSpecifier::ImportNamespaceSpecifier(
4190 CloneIn::clone_in_with_semantic_ids(it, allocator),
4191 )
4192 }
4193 }
4194 }
4195}
4196
4197impl<'new_alloc> CloneIn<'new_alloc> for ImportSpecifier<'_> {
4198 type Cloned = ImportSpecifier<'new_alloc>;
4199
4200 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4201 ImportSpecifier {
4202 span: CloneIn::clone_in(&self.span, allocator),
4203 imported: CloneIn::clone_in(&self.imported, allocator),
4204 local: CloneIn::clone_in(&self.local, allocator),
4205 import_kind: CloneIn::clone_in(&self.import_kind, allocator),
4206 }
4207 }
4208
4209 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4210 ImportSpecifier {
4211 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4212 imported: CloneIn::clone_in_with_semantic_ids(&self.imported, allocator),
4213 local: CloneIn::clone_in_with_semantic_ids(&self.local, allocator),
4214 import_kind: CloneIn::clone_in_with_semantic_ids(&self.import_kind, allocator),
4215 }
4216 }
4217}
4218
4219impl<'new_alloc> CloneIn<'new_alloc> for ImportDefaultSpecifier<'_> {
4220 type Cloned = ImportDefaultSpecifier<'new_alloc>;
4221
4222 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4223 ImportDefaultSpecifier {
4224 span: CloneIn::clone_in(&self.span, allocator),
4225 local: CloneIn::clone_in(&self.local, allocator),
4226 }
4227 }
4228
4229 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4230 ImportDefaultSpecifier {
4231 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4232 local: CloneIn::clone_in_with_semantic_ids(&self.local, allocator),
4233 }
4234 }
4235}
4236
4237impl<'new_alloc> CloneIn<'new_alloc> for ImportNamespaceSpecifier<'_> {
4238 type Cloned = ImportNamespaceSpecifier<'new_alloc>;
4239
4240 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4241 ImportNamespaceSpecifier {
4242 span: CloneIn::clone_in(&self.span, allocator),
4243 local: CloneIn::clone_in(&self.local, allocator),
4244 }
4245 }
4246
4247 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4248 ImportNamespaceSpecifier {
4249 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4250 local: CloneIn::clone_in_with_semantic_ids(&self.local, allocator),
4251 }
4252 }
4253}
4254
4255impl<'new_alloc> CloneIn<'new_alloc> for WithClause<'_> {
4256 type Cloned = WithClause<'new_alloc>;
4257
4258 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4259 WithClause {
4260 span: CloneIn::clone_in(&self.span, allocator),
4261 keyword: CloneIn::clone_in(&self.keyword, allocator),
4262 with_entries: CloneIn::clone_in(&self.with_entries, allocator),
4263 }
4264 }
4265
4266 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4267 WithClause {
4268 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4269 keyword: CloneIn::clone_in_with_semantic_ids(&self.keyword, allocator),
4270 with_entries: CloneIn::clone_in_with_semantic_ids(&self.with_entries, allocator),
4271 }
4272 }
4273}
4274
4275impl<'new_alloc> CloneIn<'new_alloc> for WithClauseKeyword {
4276 type Cloned = WithClauseKeyword;
4277
4278 #[inline(always)]
4279 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4280 *self
4281 }
4282
4283 #[inline(always)]
4284 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4285 *self
4286 }
4287}
4288
4289impl<'new_alloc> CloneIn<'new_alloc> for ImportAttribute<'_> {
4290 type Cloned = ImportAttribute<'new_alloc>;
4291
4292 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4293 ImportAttribute {
4294 span: CloneIn::clone_in(&self.span, allocator),
4295 key: CloneIn::clone_in(&self.key, allocator),
4296 value: CloneIn::clone_in(&self.value, allocator),
4297 }
4298 }
4299
4300 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4301 ImportAttribute {
4302 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4303 key: CloneIn::clone_in_with_semantic_ids(&self.key, allocator),
4304 value: CloneIn::clone_in_with_semantic_ids(&self.value, allocator),
4305 }
4306 }
4307}
4308
4309impl<'new_alloc> CloneIn<'new_alloc> for ImportAttributeKey<'_> {
4310 type Cloned = ImportAttributeKey<'new_alloc>;
4311
4312 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4313 match self {
4314 Self::Identifier(it) => {
4315 ImportAttributeKey::Identifier(CloneIn::clone_in(it, allocator))
4316 }
4317 Self::StringLiteral(it) => {
4318 ImportAttributeKey::StringLiteral(CloneIn::clone_in(it, allocator))
4319 }
4320 }
4321 }
4322
4323 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4324 match self {
4325 Self::Identifier(it) => {
4326 ImportAttributeKey::Identifier(CloneIn::clone_in_with_semantic_ids(it, allocator))
4327 }
4328 Self::StringLiteral(it) => ImportAttributeKey::StringLiteral(
4329 CloneIn::clone_in_with_semantic_ids(it, allocator),
4330 ),
4331 }
4332 }
4333}
4334
4335impl<'new_alloc> CloneIn<'new_alloc> for ExportNamedDeclaration<'_> {
4336 type Cloned = ExportNamedDeclaration<'new_alloc>;
4337
4338 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4339 ExportNamedDeclaration {
4340 span: CloneIn::clone_in(&self.span, allocator),
4341 declaration: CloneIn::clone_in(&self.declaration, allocator),
4342 specifiers: CloneIn::clone_in(&self.specifiers, allocator),
4343 source: CloneIn::clone_in(&self.source, allocator),
4344 export_kind: CloneIn::clone_in(&self.export_kind, allocator),
4345 with_clause: CloneIn::clone_in(&self.with_clause, allocator),
4346 }
4347 }
4348
4349 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4350 ExportNamedDeclaration {
4351 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4352 declaration: CloneIn::clone_in_with_semantic_ids(&self.declaration, allocator),
4353 specifiers: CloneIn::clone_in_with_semantic_ids(&self.specifiers, allocator),
4354 source: CloneIn::clone_in_with_semantic_ids(&self.source, allocator),
4355 export_kind: CloneIn::clone_in_with_semantic_ids(&self.export_kind, allocator),
4356 with_clause: CloneIn::clone_in_with_semantic_ids(&self.with_clause, allocator),
4357 }
4358 }
4359}
4360
4361impl<'new_alloc> CloneIn<'new_alloc> for ExportDefaultDeclaration<'_> {
4362 type Cloned = ExportDefaultDeclaration<'new_alloc>;
4363
4364 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4365 ExportDefaultDeclaration {
4366 span: CloneIn::clone_in(&self.span, allocator),
4367 declaration: CloneIn::clone_in(&self.declaration, allocator),
4368 }
4369 }
4370
4371 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4372 ExportDefaultDeclaration {
4373 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4374 declaration: CloneIn::clone_in_with_semantic_ids(&self.declaration, allocator),
4375 }
4376 }
4377}
4378
4379impl<'new_alloc> CloneIn<'new_alloc> for ExportAllDeclaration<'_> {
4380 type Cloned = ExportAllDeclaration<'new_alloc>;
4381
4382 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4383 ExportAllDeclaration {
4384 span: CloneIn::clone_in(&self.span, allocator),
4385 exported: CloneIn::clone_in(&self.exported, allocator),
4386 source: CloneIn::clone_in(&self.source, allocator),
4387 with_clause: CloneIn::clone_in(&self.with_clause, allocator),
4388 export_kind: CloneIn::clone_in(&self.export_kind, allocator),
4389 }
4390 }
4391
4392 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4393 ExportAllDeclaration {
4394 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4395 exported: CloneIn::clone_in_with_semantic_ids(&self.exported, allocator),
4396 source: CloneIn::clone_in_with_semantic_ids(&self.source, allocator),
4397 with_clause: CloneIn::clone_in_with_semantic_ids(&self.with_clause, allocator),
4398 export_kind: CloneIn::clone_in_with_semantic_ids(&self.export_kind, allocator),
4399 }
4400 }
4401}
4402
4403impl<'new_alloc> CloneIn<'new_alloc> for ExportSpecifier<'_> {
4404 type Cloned = ExportSpecifier<'new_alloc>;
4405
4406 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4407 ExportSpecifier {
4408 span: CloneIn::clone_in(&self.span, allocator),
4409 local: CloneIn::clone_in(&self.local, allocator),
4410 exported: CloneIn::clone_in(&self.exported, allocator),
4411 export_kind: CloneIn::clone_in(&self.export_kind, allocator),
4412 }
4413 }
4414
4415 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4416 ExportSpecifier {
4417 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4418 local: CloneIn::clone_in_with_semantic_ids(&self.local, allocator),
4419 exported: CloneIn::clone_in_with_semantic_ids(&self.exported, allocator),
4420 export_kind: CloneIn::clone_in_with_semantic_ids(&self.export_kind, allocator),
4421 }
4422 }
4423}
4424
4425impl<'new_alloc> CloneIn<'new_alloc> for ExportDefaultDeclarationKind<'_> {
4426 type Cloned = ExportDefaultDeclarationKind<'new_alloc>;
4427
4428 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4429 match self {
4430 Self::FunctionDeclaration(it) => {
4431 ExportDefaultDeclarationKind::FunctionDeclaration(CloneIn::clone_in(it, allocator))
4432 }
4433 Self::ClassDeclaration(it) => {
4434 ExportDefaultDeclarationKind::ClassDeclaration(CloneIn::clone_in(it, allocator))
4435 }
4436 Self::TSInterfaceDeclaration(it) => {
4437 ExportDefaultDeclarationKind::TSInterfaceDeclaration(CloneIn::clone_in(
4438 it, allocator,
4439 ))
4440 }
4441 Self::BooleanLiteral(it) => {
4442 ExportDefaultDeclarationKind::BooleanLiteral(CloneIn::clone_in(it, allocator))
4443 }
4444 Self::NullLiteral(it) => {
4445 ExportDefaultDeclarationKind::NullLiteral(CloneIn::clone_in(it, allocator))
4446 }
4447 Self::NumericLiteral(it) => {
4448 ExportDefaultDeclarationKind::NumericLiteral(CloneIn::clone_in(it, allocator))
4449 }
4450 Self::BigIntLiteral(it) => {
4451 ExportDefaultDeclarationKind::BigIntLiteral(CloneIn::clone_in(it, allocator))
4452 }
4453 Self::RegExpLiteral(it) => {
4454 ExportDefaultDeclarationKind::RegExpLiteral(CloneIn::clone_in(it, allocator))
4455 }
4456 Self::StringLiteral(it) => {
4457 ExportDefaultDeclarationKind::StringLiteral(CloneIn::clone_in(it, allocator))
4458 }
4459 Self::TemplateLiteral(it) => {
4460 ExportDefaultDeclarationKind::TemplateLiteral(CloneIn::clone_in(it, allocator))
4461 }
4462 Self::Identifier(it) => {
4463 ExportDefaultDeclarationKind::Identifier(CloneIn::clone_in(it, allocator))
4464 }
4465 Self::MetaProperty(it) => {
4466 ExportDefaultDeclarationKind::MetaProperty(CloneIn::clone_in(it, allocator))
4467 }
4468 Self::Super(it) => {
4469 ExportDefaultDeclarationKind::Super(CloneIn::clone_in(it, allocator))
4470 }
4471 Self::ArrayExpression(it) => {
4472 ExportDefaultDeclarationKind::ArrayExpression(CloneIn::clone_in(it, allocator))
4473 }
4474 Self::ArrowFunctionExpression(it) => {
4475 ExportDefaultDeclarationKind::ArrowFunctionExpression(CloneIn::clone_in(
4476 it, allocator,
4477 ))
4478 }
4479 Self::AssignmentExpression(it) => {
4480 ExportDefaultDeclarationKind::AssignmentExpression(CloneIn::clone_in(it, allocator))
4481 }
4482 Self::AwaitExpression(it) => {
4483 ExportDefaultDeclarationKind::AwaitExpression(CloneIn::clone_in(it, allocator))
4484 }
4485 Self::BinaryExpression(it) => {
4486 ExportDefaultDeclarationKind::BinaryExpression(CloneIn::clone_in(it, allocator))
4487 }
4488 Self::CallExpression(it) => {
4489 ExportDefaultDeclarationKind::CallExpression(CloneIn::clone_in(it, allocator))
4490 }
4491 Self::ChainExpression(it) => {
4492 ExportDefaultDeclarationKind::ChainExpression(CloneIn::clone_in(it, allocator))
4493 }
4494 Self::ClassExpression(it) => {
4495 ExportDefaultDeclarationKind::ClassExpression(CloneIn::clone_in(it, allocator))
4496 }
4497 Self::ConditionalExpression(it) => ExportDefaultDeclarationKind::ConditionalExpression(
4498 CloneIn::clone_in(it, allocator),
4499 ),
4500 Self::FunctionExpression(it) => {
4501 ExportDefaultDeclarationKind::FunctionExpression(CloneIn::clone_in(it, allocator))
4502 }
4503 Self::ImportExpression(it) => {
4504 ExportDefaultDeclarationKind::ImportExpression(CloneIn::clone_in(it, allocator))
4505 }
4506 Self::LogicalExpression(it) => {
4507 ExportDefaultDeclarationKind::LogicalExpression(CloneIn::clone_in(it, allocator))
4508 }
4509 Self::NewExpression(it) => {
4510 ExportDefaultDeclarationKind::NewExpression(CloneIn::clone_in(it, allocator))
4511 }
4512 Self::ObjectExpression(it) => {
4513 ExportDefaultDeclarationKind::ObjectExpression(CloneIn::clone_in(it, allocator))
4514 }
4515 Self::ParenthesizedExpression(it) => {
4516 ExportDefaultDeclarationKind::ParenthesizedExpression(CloneIn::clone_in(
4517 it, allocator,
4518 ))
4519 }
4520 Self::SequenceExpression(it) => {
4521 ExportDefaultDeclarationKind::SequenceExpression(CloneIn::clone_in(it, allocator))
4522 }
4523 Self::TaggedTemplateExpression(it) => {
4524 ExportDefaultDeclarationKind::TaggedTemplateExpression(CloneIn::clone_in(
4525 it, allocator,
4526 ))
4527 }
4528 Self::ThisExpression(it) => {
4529 ExportDefaultDeclarationKind::ThisExpression(CloneIn::clone_in(it, allocator))
4530 }
4531 Self::UnaryExpression(it) => {
4532 ExportDefaultDeclarationKind::UnaryExpression(CloneIn::clone_in(it, allocator))
4533 }
4534 Self::UpdateExpression(it) => {
4535 ExportDefaultDeclarationKind::UpdateExpression(CloneIn::clone_in(it, allocator))
4536 }
4537 Self::YieldExpression(it) => {
4538 ExportDefaultDeclarationKind::YieldExpression(CloneIn::clone_in(it, allocator))
4539 }
4540 Self::PrivateInExpression(it) => {
4541 ExportDefaultDeclarationKind::PrivateInExpression(CloneIn::clone_in(it, allocator))
4542 }
4543 Self::JSXElement(it) => {
4544 ExportDefaultDeclarationKind::JSXElement(CloneIn::clone_in(it, allocator))
4545 }
4546 Self::JSXFragment(it) => {
4547 ExportDefaultDeclarationKind::JSXFragment(CloneIn::clone_in(it, allocator))
4548 }
4549 Self::TSAsExpression(it) => {
4550 ExportDefaultDeclarationKind::TSAsExpression(CloneIn::clone_in(it, allocator))
4551 }
4552 Self::TSSatisfiesExpression(it) => ExportDefaultDeclarationKind::TSSatisfiesExpression(
4553 CloneIn::clone_in(it, allocator),
4554 ),
4555 Self::TSTypeAssertion(it) => {
4556 ExportDefaultDeclarationKind::TSTypeAssertion(CloneIn::clone_in(it, allocator))
4557 }
4558 Self::TSNonNullExpression(it) => {
4559 ExportDefaultDeclarationKind::TSNonNullExpression(CloneIn::clone_in(it, allocator))
4560 }
4561 Self::TSInstantiationExpression(it) => {
4562 ExportDefaultDeclarationKind::TSInstantiationExpression(CloneIn::clone_in(
4563 it, allocator,
4564 ))
4565 }
4566 Self::V8IntrinsicExpression(it) => ExportDefaultDeclarationKind::V8IntrinsicExpression(
4567 CloneIn::clone_in(it, allocator),
4568 ),
4569 Self::ComputedMemberExpression(it) => {
4570 ExportDefaultDeclarationKind::ComputedMemberExpression(CloneIn::clone_in(
4571 it, allocator,
4572 ))
4573 }
4574 Self::StaticMemberExpression(it) => {
4575 ExportDefaultDeclarationKind::StaticMemberExpression(CloneIn::clone_in(
4576 it, allocator,
4577 ))
4578 }
4579 Self::PrivateFieldExpression(it) => {
4580 ExportDefaultDeclarationKind::PrivateFieldExpression(CloneIn::clone_in(
4581 it, allocator,
4582 ))
4583 }
4584 }
4585 }
4586
4587 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4588 match self {
4589 Self::FunctionDeclaration(it) => ExportDefaultDeclarationKind::FunctionDeclaration(
4590 CloneIn::clone_in_with_semantic_ids(it, allocator),
4591 ),
4592 Self::ClassDeclaration(it) => ExportDefaultDeclarationKind::ClassDeclaration(
4593 CloneIn::clone_in_with_semantic_ids(it, allocator),
4594 ),
4595 Self::TSInterfaceDeclaration(it) => {
4596 ExportDefaultDeclarationKind::TSInterfaceDeclaration(
4597 CloneIn::clone_in_with_semantic_ids(it, allocator),
4598 )
4599 }
4600 Self::BooleanLiteral(it) => ExportDefaultDeclarationKind::BooleanLiteral(
4601 CloneIn::clone_in_with_semantic_ids(it, allocator),
4602 ),
4603 Self::NullLiteral(it) => ExportDefaultDeclarationKind::NullLiteral(
4604 CloneIn::clone_in_with_semantic_ids(it, allocator),
4605 ),
4606 Self::NumericLiteral(it) => ExportDefaultDeclarationKind::NumericLiteral(
4607 CloneIn::clone_in_with_semantic_ids(it, allocator),
4608 ),
4609 Self::BigIntLiteral(it) => ExportDefaultDeclarationKind::BigIntLiteral(
4610 CloneIn::clone_in_with_semantic_ids(it, allocator),
4611 ),
4612 Self::RegExpLiteral(it) => ExportDefaultDeclarationKind::RegExpLiteral(
4613 CloneIn::clone_in_with_semantic_ids(it, allocator),
4614 ),
4615 Self::StringLiteral(it) => ExportDefaultDeclarationKind::StringLiteral(
4616 CloneIn::clone_in_with_semantic_ids(it, allocator),
4617 ),
4618 Self::TemplateLiteral(it) => ExportDefaultDeclarationKind::TemplateLiteral(
4619 CloneIn::clone_in_with_semantic_ids(it, allocator),
4620 ),
4621 Self::Identifier(it) => ExportDefaultDeclarationKind::Identifier(
4622 CloneIn::clone_in_with_semantic_ids(it, allocator),
4623 ),
4624 Self::MetaProperty(it) => ExportDefaultDeclarationKind::MetaProperty(
4625 CloneIn::clone_in_with_semantic_ids(it, allocator),
4626 ),
4627 Self::Super(it) => ExportDefaultDeclarationKind::Super(
4628 CloneIn::clone_in_with_semantic_ids(it, allocator),
4629 ),
4630 Self::ArrayExpression(it) => ExportDefaultDeclarationKind::ArrayExpression(
4631 CloneIn::clone_in_with_semantic_ids(it, allocator),
4632 ),
4633 Self::ArrowFunctionExpression(it) => {
4634 ExportDefaultDeclarationKind::ArrowFunctionExpression(
4635 CloneIn::clone_in_with_semantic_ids(it, allocator),
4636 )
4637 }
4638 Self::AssignmentExpression(it) => ExportDefaultDeclarationKind::AssignmentExpression(
4639 CloneIn::clone_in_with_semantic_ids(it, allocator),
4640 ),
4641 Self::AwaitExpression(it) => ExportDefaultDeclarationKind::AwaitExpression(
4642 CloneIn::clone_in_with_semantic_ids(it, allocator),
4643 ),
4644 Self::BinaryExpression(it) => ExportDefaultDeclarationKind::BinaryExpression(
4645 CloneIn::clone_in_with_semantic_ids(it, allocator),
4646 ),
4647 Self::CallExpression(it) => ExportDefaultDeclarationKind::CallExpression(
4648 CloneIn::clone_in_with_semantic_ids(it, allocator),
4649 ),
4650 Self::ChainExpression(it) => ExportDefaultDeclarationKind::ChainExpression(
4651 CloneIn::clone_in_with_semantic_ids(it, allocator),
4652 ),
4653 Self::ClassExpression(it) => ExportDefaultDeclarationKind::ClassExpression(
4654 CloneIn::clone_in_with_semantic_ids(it, allocator),
4655 ),
4656 Self::ConditionalExpression(it) => ExportDefaultDeclarationKind::ConditionalExpression(
4657 CloneIn::clone_in_with_semantic_ids(it, allocator),
4658 ),
4659 Self::FunctionExpression(it) => ExportDefaultDeclarationKind::FunctionExpression(
4660 CloneIn::clone_in_with_semantic_ids(it, allocator),
4661 ),
4662 Self::ImportExpression(it) => ExportDefaultDeclarationKind::ImportExpression(
4663 CloneIn::clone_in_with_semantic_ids(it, allocator),
4664 ),
4665 Self::LogicalExpression(it) => ExportDefaultDeclarationKind::LogicalExpression(
4666 CloneIn::clone_in_with_semantic_ids(it, allocator),
4667 ),
4668 Self::NewExpression(it) => ExportDefaultDeclarationKind::NewExpression(
4669 CloneIn::clone_in_with_semantic_ids(it, allocator),
4670 ),
4671 Self::ObjectExpression(it) => ExportDefaultDeclarationKind::ObjectExpression(
4672 CloneIn::clone_in_with_semantic_ids(it, allocator),
4673 ),
4674 Self::ParenthesizedExpression(it) => {
4675 ExportDefaultDeclarationKind::ParenthesizedExpression(
4676 CloneIn::clone_in_with_semantic_ids(it, allocator),
4677 )
4678 }
4679 Self::SequenceExpression(it) => ExportDefaultDeclarationKind::SequenceExpression(
4680 CloneIn::clone_in_with_semantic_ids(it, allocator),
4681 ),
4682 Self::TaggedTemplateExpression(it) => {
4683 ExportDefaultDeclarationKind::TaggedTemplateExpression(
4684 CloneIn::clone_in_with_semantic_ids(it, allocator),
4685 )
4686 }
4687 Self::ThisExpression(it) => ExportDefaultDeclarationKind::ThisExpression(
4688 CloneIn::clone_in_with_semantic_ids(it, allocator),
4689 ),
4690 Self::UnaryExpression(it) => ExportDefaultDeclarationKind::UnaryExpression(
4691 CloneIn::clone_in_with_semantic_ids(it, allocator),
4692 ),
4693 Self::UpdateExpression(it) => ExportDefaultDeclarationKind::UpdateExpression(
4694 CloneIn::clone_in_with_semantic_ids(it, allocator),
4695 ),
4696 Self::YieldExpression(it) => ExportDefaultDeclarationKind::YieldExpression(
4697 CloneIn::clone_in_with_semantic_ids(it, allocator),
4698 ),
4699 Self::PrivateInExpression(it) => ExportDefaultDeclarationKind::PrivateInExpression(
4700 CloneIn::clone_in_with_semantic_ids(it, allocator),
4701 ),
4702 Self::JSXElement(it) => ExportDefaultDeclarationKind::JSXElement(
4703 CloneIn::clone_in_with_semantic_ids(it, allocator),
4704 ),
4705 Self::JSXFragment(it) => ExportDefaultDeclarationKind::JSXFragment(
4706 CloneIn::clone_in_with_semantic_ids(it, allocator),
4707 ),
4708 Self::TSAsExpression(it) => ExportDefaultDeclarationKind::TSAsExpression(
4709 CloneIn::clone_in_with_semantic_ids(it, allocator),
4710 ),
4711 Self::TSSatisfiesExpression(it) => ExportDefaultDeclarationKind::TSSatisfiesExpression(
4712 CloneIn::clone_in_with_semantic_ids(it, allocator),
4713 ),
4714 Self::TSTypeAssertion(it) => ExportDefaultDeclarationKind::TSTypeAssertion(
4715 CloneIn::clone_in_with_semantic_ids(it, allocator),
4716 ),
4717 Self::TSNonNullExpression(it) => ExportDefaultDeclarationKind::TSNonNullExpression(
4718 CloneIn::clone_in_with_semantic_ids(it, allocator),
4719 ),
4720 Self::TSInstantiationExpression(it) => {
4721 ExportDefaultDeclarationKind::TSInstantiationExpression(
4722 CloneIn::clone_in_with_semantic_ids(it, allocator),
4723 )
4724 }
4725 Self::V8IntrinsicExpression(it) => ExportDefaultDeclarationKind::V8IntrinsicExpression(
4726 CloneIn::clone_in_with_semantic_ids(it, allocator),
4727 ),
4728 Self::ComputedMemberExpression(it) => {
4729 ExportDefaultDeclarationKind::ComputedMemberExpression(
4730 CloneIn::clone_in_with_semantic_ids(it, allocator),
4731 )
4732 }
4733 Self::StaticMemberExpression(it) => {
4734 ExportDefaultDeclarationKind::StaticMemberExpression(
4735 CloneIn::clone_in_with_semantic_ids(it, allocator),
4736 )
4737 }
4738 Self::PrivateFieldExpression(it) => {
4739 ExportDefaultDeclarationKind::PrivateFieldExpression(
4740 CloneIn::clone_in_with_semantic_ids(it, allocator),
4741 )
4742 }
4743 }
4744 }
4745}
4746
4747impl<'new_alloc> CloneIn<'new_alloc> for ModuleExportName<'_> {
4748 type Cloned = ModuleExportName<'new_alloc>;
4749
4750 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4751 match self {
4752 Self::IdentifierName(it) => {
4753 ModuleExportName::IdentifierName(CloneIn::clone_in(it, allocator))
4754 }
4755 Self::IdentifierReference(it) => {
4756 ModuleExportName::IdentifierReference(CloneIn::clone_in(it, allocator))
4757 }
4758 Self::StringLiteral(it) => {
4759 ModuleExportName::StringLiteral(CloneIn::clone_in(it, allocator))
4760 }
4761 }
4762 }
4763
4764 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4765 match self {
4766 Self::IdentifierName(it) => {
4767 ModuleExportName::IdentifierName(CloneIn::clone_in_with_semantic_ids(it, allocator))
4768 }
4769 Self::IdentifierReference(it) => ModuleExportName::IdentifierReference(
4770 CloneIn::clone_in_with_semantic_ids(it, allocator),
4771 ),
4772 Self::StringLiteral(it) => {
4773 ModuleExportName::StringLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
4774 }
4775 }
4776 }
4777}
4778
4779impl<'new_alloc> CloneIn<'new_alloc> for V8IntrinsicExpression<'_> {
4780 type Cloned = V8IntrinsicExpression<'new_alloc>;
4781
4782 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4783 V8IntrinsicExpression {
4784 span: CloneIn::clone_in(&self.span, allocator),
4785 name: CloneIn::clone_in(&self.name, allocator),
4786 arguments: CloneIn::clone_in(&self.arguments, allocator),
4787 }
4788 }
4789
4790 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4791 V8IntrinsicExpression {
4792 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4793 name: CloneIn::clone_in_with_semantic_ids(&self.name, allocator),
4794 arguments: CloneIn::clone_in_with_semantic_ids(&self.arguments, allocator),
4795 }
4796 }
4797}
4798
4799impl<'new_alloc> CloneIn<'new_alloc> for BooleanLiteral {
4800 type Cloned = BooleanLiteral;
4801
4802 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4803 BooleanLiteral {
4804 span: CloneIn::clone_in(&self.span, allocator),
4805 value: CloneIn::clone_in(&self.value, allocator),
4806 }
4807 }
4808
4809 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4810 BooleanLiteral {
4811 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4812 value: CloneIn::clone_in_with_semantic_ids(&self.value, allocator),
4813 }
4814 }
4815}
4816
4817impl<'new_alloc> CloneIn<'new_alloc> for NullLiteral {
4818 type Cloned = NullLiteral;
4819
4820 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4821 NullLiteral { span: CloneIn::clone_in(&self.span, allocator) }
4822 }
4823
4824 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4825 NullLiteral { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
4826 }
4827}
4828
4829impl<'new_alloc> CloneIn<'new_alloc> for NumericLiteral<'_> {
4830 type Cloned = NumericLiteral<'new_alloc>;
4831
4832 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4833 NumericLiteral {
4834 span: CloneIn::clone_in(&self.span, allocator),
4835 value: CloneIn::clone_in(&self.value, allocator),
4836 raw: CloneIn::clone_in(&self.raw, allocator),
4837 base: CloneIn::clone_in(&self.base, allocator),
4838 }
4839 }
4840
4841 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4842 NumericLiteral {
4843 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4844 value: CloneIn::clone_in_with_semantic_ids(&self.value, allocator),
4845 raw: CloneIn::clone_in_with_semantic_ids(&self.raw, allocator),
4846 base: CloneIn::clone_in_with_semantic_ids(&self.base, allocator),
4847 }
4848 }
4849}
4850
4851impl<'new_alloc> CloneIn<'new_alloc> for StringLiteral<'_> {
4852 type Cloned = StringLiteral<'new_alloc>;
4853
4854 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4855 StringLiteral {
4856 span: CloneIn::clone_in(&self.span, allocator),
4857 value: CloneIn::clone_in(&self.value, allocator),
4858 raw: CloneIn::clone_in(&self.raw, allocator),
4859 lone_surrogates: CloneIn::clone_in(&self.lone_surrogates, allocator),
4860 }
4861 }
4862
4863 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4864 StringLiteral {
4865 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4866 value: CloneIn::clone_in_with_semantic_ids(&self.value, allocator),
4867 raw: CloneIn::clone_in_with_semantic_ids(&self.raw, allocator),
4868 lone_surrogates: CloneIn::clone_in_with_semantic_ids(&self.lone_surrogates, allocator),
4869 }
4870 }
4871}
4872
4873impl<'new_alloc> CloneIn<'new_alloc> for BigIntLiteral<'_> {
4874 type Cloned = BigIntLiteral<'new_alloc>;
4875
4876 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4877 BigIntLiteral {
4878 span: CloneIn::clone_in(&self.span, allocator),
4879 value: CloneIn::clone_in(&self.value, allocator),
4880 raw: CloneIn::clone_in(&self.raw, allocator),
4881 base: CloneIn::clone_in(&self.base, allocator),
4882 }
4883 }
4884
4885 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4886 BigIntLiteral {
4887 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4888 value: CloneIn::clone_in_with_semantic_ids(&self.value, allocator),
4889 raw: CloneIn::clone_in_with_semantic_ids(&self.raw, allocator),
4890 base: CloneIn::clone_in_with_semantic_ids(&self.base, allocator),
4891 }
4892 }
4893}
4894
4895impl<'new_alloc> CloneIn<'new_alloc> for RegExpLiteral<'_> {
4896 type Cloned = RegExpLiteral<'new_alloc>;
4897
4898 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4899 RegExpLiteral {
4900 span: CloneIn::clone_in(&self.span, allocator),
4901 regex: CloneIn::clone_in(&self.regex, allocator),
4902 raw: CloneIn::clone_in(&self.raw, allocator),
4903 }
4904 }
4905
4906 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4907 RegExpLiteral {
4908 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4909 regex: CloneIn::clone_in_with_semantic_ids(&self.regex, allocator),
4910 raw: CloneIn::clone_in_with_semantic_ids(&self.raw, allocator),
4911 }
4912 }
4913}
4914
4915impl<'new_alloc> CloneIn<'new_alloc> for RegExp<'_> {
4916 type Cloned = RegExp<'new_alloc>;
4917
4918 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4919 RegExp {
4920 pattern: CloneIn::clone_in(&self.pattern, allocator),
4921 flags: CloneIn::clone_in(&self.flags, allocator),
4922 }
4923 }
4924
4925 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4926 RegExp {
4927 pattern: CloneIn::clone_in_with_semantic_ids(&self.pattern, allocator),
4928 flags: CloneIn::clone_in_with_semantic_ids(&self.flags, allocator),
4929 }
4930 }
4931}
4932
4933impl<'new_alloc> CloneIn<'new_alloc> for RegExpPattern<'_> {
4934 type Cloned = RegExpPattern<'new_alloc>;
4935
4936 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4937 RegExpPattern {
4938 text: CloneIn::clone_in(&self.text, allocator),
4939 pattern: CloneIn::clone_in(&self.pattern, allocator),
4940 }
4941 }
4942
4943 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4944 RegExpPattern {
4945 text: CloneIn::clone_in_with_semantic_ids(&self.text, allocator),
4946 pattern: CloneIn::clone_in_with_semantic_ids(&self.pattern, allocator),
4947 }
4948 }
4949}
4950
4951impl<'new_alloc> CloneIn<'new_alloc> for JSXElement<'_> {
4952 type Cloned = JSXElement<'new_alloc>;
4953
4954 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4955 JSXElement {
4956 span: CloneIn::clone_in(&self.span, allocator),
4957 opening_element: CloneIn::clone_in(&self.opening_element, allocator),
4958 children: CloneIn::clone_in(&self.children, allocator),
4959 closing_element: CloneIn::clone_in(&self.closing_element, allocator),
4960 }
4961 }
4962
4963 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4964 JSXElement {
4965 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4966 opening_element: CloneIn::clone_in_with_semantic_ids(&self.opening_element, allocator),
4967 children: CloneIn::clone_in_with_semantic_ids(&self.children, allocator),
4968 closing_element: CloneIn::clone_in_with_semantic_ids(&self.closing_element, allocator),
4969 }
4970 }
4971}
4972
4973impl<'new_alloc> CloneIn<'new_alloc> for JSXOpeningElement<'_> {
4974 type Cloned = JSXOpeningElement<'new_alloc>;
4975
4976 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4977 JSXOpeningElement {
4978 span: CloneIn::clone_in(&self.span, allocator),
4979 name: CloneIn::clone_in(&self.name, allocator),
4980 type_arguments: CloneIn::clone_in(&self.type_arguments, allocator),
4981 attributes: CloneIn::clone_in(&self.attributes, allocator),
4982 }
4983 }
4984
4985 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4986 JSXOpeningElement {
4987 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
4988 name: CloneIn::clone_in_with_semantic_ids(&self.name, allocator),
4989 type_arguments: CloneIn::clone_in_with_semantic_ids(&self.type_arguments, allocator),
4990 attributes: CloneIn::clone_in_with_semantic_ids(&self.attributes, allocator),
4991 }
4992 }
4993}
4994
4995impl<'new_alloc> CloneIn<'new_alloc> for JSXClosingElement<'_> {
4996 type Cloned = JSXClosingElement<'new_alloc>;
4997
4998 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
4999 JSXClosingElement {
5000 span: CloneIn::clone_in(&self.span, allocator),
5001 name: CloneIn::clone_in(&self.name, allocator),
5002 }
5003 }
5004
5005 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5006 JSXClosingElement {
5007 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5008 name: CloneIn::clone_in_with_semantic_ids(&self.name, allocator),
5009 }
5010 }
5011}
5012
5013impl<'new_alloc> CloneIn<'new_alloc> for JSXFragment<'_> {
5014 type Cloned = JSXFragment<'new_alloc>;
5015
5016 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5017 JSXFragment {
5018 span: CloneIn::clone_in(&self.span, allocator),
5019 opening_fragment: CloneIn::clone_in(&self.opening_fragment, allocator),
5020 children: CloneIn::clone_in(&self.children, allocator),
5021 closing_fragment: CloneIn::clone_in(&self.closing_fragment, allocator),
5022 }
5023 }
5024
5025 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5026 JSXFragment {
5027 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5028 opening_fragment: CloneIn::clone_in_with_semantic_ids(
5029 &self.opening_fragment,
5030 allocator,
5031 ),
5032 children: CloneIn::clone_in_with_semantic_ids(&self.children, allocator),
5033 closing_fragment: CloneIn::clone_in_with_semantic_ids(
5034 &self.closing_fragment,
5035 allocator,
5036 ),
5037 }
5038 }
5039}
5040
5041impl<'new_alloc> CloneIn<'new_alloc> for JSXOpeningFragment {
5042 type Cloned = JSXOpeningFragment;
5043
5044 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5045 JSXOpeningFragment { span: CloneIn::clone_in(&self.span, allocator) }
5046 }
5047
5048 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5049 JSXOpeningFragment { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
5050 }
5051}
5052
5053impl<'new_alloc> CloneIn<'new_alloc> for JSXClosingFragment {
5054 type Cloned = JSXClosingFragment;
5055
5056 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5057 JSXClosingFragment { span: CloneIn::clone_in(&self.span, allocator) }
5058 }
5059
5060 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5061 JSXClosingFragment { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
5062 }
5063}
5064
5065impl<'new_alloc> CloneIn<'new_alloc> for JSXElementName<'_> {
5066 type Cloned = JSXElementName<'new_alloc>;
5067
5068 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5069 match self {
5070 Self::Identifier(it) => JSXElementName::Identifier(CloneIn::clone_in(it, allocator)),
5071 Self::IdentifierReference(it) => {
5072 JSXElementName::IdentifierReference(CloneIn::clone_in(it, allocator))
5073 }
5074 Self::NamespacedName(it) => {
5075 JSXElementName::NamespacedName(CloneIn::clone_in(it, allocator))
5076 }
5077 Self::MemberExpression(it) => {
5078 JSXElementName::MemberExpression(CloneIn::clone_in(it, allocator))
5079 }
5080 Self::ThisExpression(it) => {
5081 JSXElementName::ThisExpression(CloneIn::clone_in(it, allocator))
5082 }
5083 }
5084 }
5085
5086 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5087 match self {
5088 Self::Identifier(it) => {
5089 JSXElementName::Identifier(CloneIn::clone_in_with_semantic_ids(it, allocator))
5090 }
5091 Self::IdentifierReference(it) => JSXElementName::IdentifierReference(
5092 CloneIn::clone_in_with_semantic_ids(it, allocator),
5093 ),
5094 Self::NamespacedName(it) => {
5095 JSXElementName::NamespacedName(CloneIn::clone_in_with_semantic_ids(it, allocator))
5096 }
5097 Self::MemberExpression(it) => {
5098 JSXElementName::MemberExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5099 }
5100 Self::ThisExpression(it) => {
5101 JSXElementName::ThisExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5102 }
5103 }
5104 }
5105}
5106
5107impl<'new_alloc> CloneIn<'new_alloc> for JSXNamespacedName<'_> {
5108 type Cloned = JSXNamespacedName<'new_alloc>;
5109
5110 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5111 JSXNamespacedName {
5112 span: CloneIn::clone_in(&self.span, allocator),
5113 namespace: CloneIn::clone_in(&self.namespace, allocator),
5114 name: CloneIn::clone_in(&self.name, allocator),
5115 }
5116 }
5117
5118 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5119 JSXNamespacedName {
5120 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5121 namespace: CloneIn::clone_in_with_semantic_ids(&self.namespace, allocator),
5122 name: CloneIn::clone_in_with_semantic_ids(&self.name, allocator),
5123 }
5124 }
5125}
5126
5127impl<'new_alloc> CloneIn<'new_alloc> for JSXMemberExpression<'_> {
5128 type Cloned = JSXMemberExpression<'new_alloc>;
5129
5130 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5131 JSXMemberExpression {
5132 span: CloneIn::clone_in(&self.span, allocator),
5133 object: CloneIn::clone_in(&self.object, allocator),
5134 property: CloneIn::clone_in(&self.property, allocator),
5135 }
5136 }
5137
5138 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5139 JSXMemberExpression {
5140 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5141 object: CloneIn::clone_in_with_semantic_ids(&self.object, allocator),
5142 property: CloneIn::clone_in_with_semantic_ids(&self.property, allocator),
5143 }
5144 }
5145}
5146
5147impl<'new_alloc> CloneIn<'new_alloc> for JSXMemberExpressionObject<'_> {
5148 type Cloned = JSXMemberExpressionObject<'new_alloc>;
5149
5150 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5151 match self {
5152 Self::IdentifierReference(it) => {
5153 JSXMemberExpressionObject::IdentifierReference(CloneIn::clone_in(it, allocator))
5154 }
5155 Self::MemberExpression(it) => {
5156 JSXMemberExpressionObject::MemberExpression(CloneIn::clone_in(it, allocator))
5157 }
5158 Self::ThisExpression(it) => {
5159 JSXMemberExpressionObject::ThisExpression(CloneIn::clone_in(it, allocator))
5160 }
5161 }
5162 }
5163
5164 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5165 match self {
5166 Self::IdentifierReference(it) => JSXMemberExpressionObject::IdentifierReference(
5167 CloneIn::clone_in_with_semantic_ids(it, allocator),
5168 ),
5169 Self::MemberExpression(it) => JSXMemberExpressionObject::MemberExpression(
5170 CloneIn::clone_in_with_semantic_ids(it, allocator),
5171 ),
5172 Self::ThisExpression(it) => JSXMemberExpressionObject::ThisExpression(
5173 CloneIn::clone_in_with_semantic_ids(it, allocator),
5174 ),
5175 }
5176 }
5177}
5178
5179impl<'new_alloc> CloneIn<'new_alloc> for JSXExpressionContainer<'_> {
5180 type Cloned = JSXExpressionContainer<'new_alloc>;
5181
5182 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5183 JSXExpressionContainer {
5184 span: CloneIn::clone_in(&self.span, allocator),
5185 expression: CloneIn::clone_in(&self.expression, allocator),
5186 }
5187 }
5188
5189 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5190 JSXExpressionContainer {
5191 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5192 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
5193 }
5194 }
5195}
5196
5197impl<'new_alloc> CloneIn<'new_alloc> for JSXExpression<'_> {
5198 type Cloned = JSXExpression<'new_alloc>;
5199
5200 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5201 match self {
5202 Self::EmptyExpression(it) => {
5203 JSXExpression::EmptyExpression(CloneIn::clone_in(it, allocator))
5204 }
5205 Self::BooleanLiteral(it) => {
5206 JSXExpression::BooleanLiteral(CloneIn::clone_in(it, allocator))
5207 }
5208 Self::NullLiteral(it) => JSXExpression::NullLiteral(CloneIn::clone_in(it, allocator)),
5209 Self::NumericLiteral(it) => {
5210 JSXExpression::NumericLiteral(CloneIn::clone_in(it, allocator))
5211 }
5212 Self::BigIntLiteral(it) => {
5213 JSXExpression::BigIntLiteral(CloneIn::clone_in(it, allocator))
5214 }
5215 Self::RegExpLiteral(it) => {
5216 JSXExpression::RegExpLiteral(CloneIn::clone_in(it, allocator))
5217 }
5218 Self::StringLiteral(it) => {
5219 JSXExpression::StringLiteral(CloneIn::clone_in(it, allocator))
5220 }
5221 Self::TemplateLiteral(it) => {
5222 JSXExpression::TemplateLiteral(CloneIn::clone_in(it, allocator))
5223 }
5224 Self::Identifier(it) => JSXExpression::Identifier(CloneIn::clone_in(it, allocator)),
5225 Self::MetaProperty(it) => JSXExpression::MetaProperty(CloneIn::clone_in(it, allocator)),
5226 Self::Super(it) => JSXExpression::Super(CloneIn::clone_in(it, allocator)),
5227 Self::ArrayExpression(it) => {
5228 JSXExpression::ArrayExpression(CloneIn::clone_in(it, allocator))
5229 }
5230 Self::ArrowFunctionExpression(it) => {
5231 JSXExpression::ArrowFunctionExpression(CloneIn::clone_in(it, allocator))
5232 }
5233 Self::AssignmentExpression(it) => {
5234 JSXExpression::AssignmentExpression(CloneIn::clone_in(it, allocator))
5235 }
5236 Self::AwaitExpression(it) => {
5237 JSXExpression::AwaitExpression(CloneIn::clone_in(it, allocator))
5238 }
5239 Self::BinaryExpression(it) => {
5240 JSXExpression::BinaryExpression(CloneIn::clone_in(it, allocator))
5241 }
5242 Self::CallExpression(it) => {
5243 JSXExpression::CallExpression(CloneIn::clone_in(it, allocator))
5244 }
5245 Self::ChainExpression(it) => {
5246 JSXExpression::ChainExpression(CloneIn::clone_in(it, allocator))
5247 }
5248 Self::ClassExpression(it) => {
5249 JSXExpression::ClassExpression(CloneIn::clone_in(it, allocator))
5250 }
5251 Self::ConditionalExpression(it) => {
5252 JSXExpression::ConditionalExpression(CloneIn::clone_in(it, allocator))
5253 }
5254 Self::FunctionExpression(it) => {
5255 JSXExpression::FunctionExpression(CloneIn::clone_in(it, allocator))
5256 }
5257 Self::ImportExpression(it) => {
5258 JSXExpression::ImportExpression(CloneIn::clone_in(it, allocator))
5259 }
5260 Self::LogicalExpression(it) => {
5261 JSXExpression::LogicalExpression(CloneIn::clone_in(it, allocator))
5262 }
5263 Self::NewExpression(it) => {
5264 JSXExpression::NewExpression(CloneIn::clone_in(it, allocator))
5265 }
5266 Self::ObjectExpression(it) => {
5267 JSXExpression::ObjectExpression(CloneIn::clone_in(it, allocator))
5268 }
5269 Self::ParenthesizedExpression(it) => {
5270 JSXExpression::ParenthesizedExpression(CloneIn::clone_in(it, allocator))
5271 }
5272 Self::SequenceExpression(it) => {
5273 JSXExpression::SequenceExpression(CloneIn::clone_in(it, allocator))
5274 }
5275 Self::TaggedTemplateExpression(it) => {
5276 JSXExpression::TaggedTemplateExpression(CloneIn::clone_in(it, allocator))
5277 }
5278 Self::ThisExpression(it) => {
5279 JSXExpression::ThisExpression(CloneIn::clone_in(it, allocator))
5280 }
5281 Self::UnaryExpression(it) => {
5282 JSXExpression::UnaryExpression(CloneIn::clone_in(it, allocator))
5283 }
5284 Self::UpdateExpression(it) => {
5285 JSXExpression::UpdateExpression(CloneIn::clone_in(it, allocator))
5286 }
5287 Self::YieldExpression(it) => {
5288 JSXExpression::YieldExpression(CloneIn::clone_in(it, allocator))
5289 }
5290 Self::PrivateInExpression(it) => {
5291 JSXExpression::PrivateInExpression(CloneIn::clone_in(it, allocator))
5292 }
5293 Self::JSXElement(it) => JSXExpression::JSXElement(CloneIn::clone_in(it, allocator)),
5294 Self::JSXFragment(it) => JSXExpression::JSXFragment(CloneIn::clone_in(it, allocator)),
5295 Self::TSAsExpression(it) => {
5296 JSXExpression::TSAsExpression(CloneIn::clone_in(it, allocator))
5297 }
5298 Self::TSSatisfiesExpression(it) => {
5299 JSXExpression::TSSatisfiesExpression(CloneIn::clone_in(it, allocator))
5300 }
5301 Self::TSTypeAssertion(it) => {
5302 JSXExpression::TSTypeAssertion(CloneIn::clone_in(it, allocator))
5303 }
5304 Self::TSNonNullExpression(it) => {
5305 JSXExpression::TSNonNullExpression(CloneIn::clone_in(it, allocator))
5306 }
5307 Self::TSInstantiationExpression(it) => {
5308 JSXExpression::TSInstantiationExpression(CloneIn::clone_in(it, allocator))
5309 }
5310 Self::V8IntrinsicExpression(it) => {
5311 JSXExpression::V8IntrinsicExpression(CloneIn::clone_in(it, allocator))
5312 }
5313 Self::ComputedMemberExpression(it) => {
5314 JSXExpression::ComputedMemberExpression(CloneIn::clone_in(it, allocator))
5315 }
5316 Self::StaticMemberExpression(it) => {
5317 JSXExpression::StaticMemberExpression(CloneIn::clone_in(it, allocator))
5318 }
5319 Self::PrivateFieldExpression(it) => {
5320 JSXExpression::PrivateFieldExpression(CloneIn::clone_in(it, allocator))
5321 }
5322 }
5323 }
5324
5325 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5326 match self {
5327 Self::EmptyExpression(it) => {
5328 JSXExpression::EmptyExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5329 }
5330 Self::BooleanLiteral(it) => {
5331 JSXExpression::BooleanLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
5332 }
5333 Self::NullLiteral(it) => {
5334 JSXExpression::NullLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
5335 }
5336 Self::NumericLiteral(it) => {
5337 JSXExpression::NumericLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
5338 }
5339 Self::BigIntLiteral(it) => {
5340 JSXExpression::BigIntLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
5341 }
5342 Self::RegExpLiteral(it) => {
5343 JSXExpression::RegExpLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
5344 }
5345 Self::StringLiteral(it) => {
5346 JSXExpression::StringLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
5347 }
5348 Self::TemplateLiteral(it) => {
5349 JSXExpression::TemplateLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
5350 }
5351 Self::Identifier(it) => {
5352 JSXExpression::Identifier(CloneIn::clone_in_with_semantic_ids(it, allocator))
5353 }
5354 Self::MetaProperty(it) => {
5355 JSXExpression::MetaProperty(CloneIn::clone_in_with_semantic_ids(it, allocator))
5356 }
5357 Self::Super(it) => {
5358 JSXExpression::Super(CloneIn::clone_in_with_semantic_ids(it, allocator))
5359 }
5360 Self::ArrayExpression(it) => {
5361 JSXExpression::ArrayExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5362 }
5363 Self::ArrowFunctionExpression(it) => JSXExpression::ArrowFunctionExpression(
5364 CloneIn::clone_in_with_semantic_ids(it, allocator),
5365 ),
5366 Self::AssignmentExpression(it) => JSXExpression::AssignmentExpression(
5367 CloneIn::clone_in_with_semantic_ids(it, allocator),
5368 ),
5369 Self::AwaitExpression(it) => {
5370 JSXExpression::AwaitExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5371 }
5372 Self::BinaryExpression(it) => {
5373 JSXExpression::BinaryExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5374 }
5375 Self::CallExpression(it) => {
5376 JSXExpression::CallExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5377 }
5378 Self::ChainExpression(it) => {
5379 JSXExpression::ChainExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5380 }
5381 Self::ClassExpression(it) => {
5382 JSXExpression::ClassExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5383 }
5384 Self::ConditionalExpression(it) => JSXExpression::ConditionalExpression(
5385 CloneIn::clone_in_with_semantic_ids(it, allocator),
5386 ),
5387 Self::FunctionExpression(it) => JSXExpression::FunctionExpression(
5388 CloneIn::clone_in_with_semantic_ids(it, allocator),
5389 ),
5390 Self::ImportExpression(it) => {
5391 JSXExpression::ImportExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5392 }
5393 Self::LogicalExpression(it) => {
5394 JSXExpression::LogicalExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5395 }
5396 Self::NewExpression(it) => {
5397 JSXExpression::NewExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5398 }
5399 Self::ObjectExpression(it) => {
5400 JSXExpression::ObjectExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5401 }
5402 Self::ParenthesizedExpression(it) => JSXExpression::ParenthesizedExpression(
5403 CloneIn::clone_in_with_semantic_ids(it, allocator),
5404 ),
5405 Self::SequenceExpression(it) => JSXExpression::SequenceExpression(
5406 CloneIn::clone_in_with_semantic_ids(it, allocator),
5407 ),
5408 Self::TaggedTemplateExpression(it) => JSXExpression::TaggedTemplateExpression(
5409 CloneIn::clone_in_with_semantic_ids(it, allocator),
5410 ),
5411 Self::ThisExpression(it) => {
5412 JSXExpression::ThisExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5413 }
5414 Self::UnaryExpression(it) => {
5415 JSXExpression::UnaryExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5416 }
5417 Self::UpdateExpression(it) => {
5418 JSXExpression::UpdateExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5419 }
5420 Self::YieldExpression(it) => {
5421 JSXExpression::YieldExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5422 }
5423 Self::PrivateInExpression(it) => JSXExpression::PrivateInExpression(
5424 CloneIn::clone_in_with_semantic_ids(it, allocator),
5425 ),
5426 Self::JSXElement(it) => {
5427 JSXExpression::JSXElement(CloneIn::clone_in_with_semantic_ids(it, allocator))
5428 }
5429 Self::JSXFragment(it) => {
5430 JSXExpression::JSXFragment(CloneIn::clone_in_with_semantic_ids(it, allocator))
5431 }
5432 Self::TSAsExpression(it) => {
5433 JSXExpression::TSAsExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5434 }
5435 Self::TSSatisfiesExpression(it) => JSXExpression::TSSatisfiesExpression(
5436 CloneIn::clone_in_with_semantic_ids(it, allocator),
5437 ),
5438 Self::TSTypeAssertion(it) => {
5439 JSXExpression::TSTypeAssertion(CloneIn::clone_in_with_semantic_ids(it, allocator))
5440 }
5441 Self::TSNonNullExpression(it) => JSXExpression::TSNonNullExpression(
5442 CloneIn::clone_in_with_semantic_ids(it, allocator),
5443 ),
5444 Self::TSInstantiationExpression(it) => JSXExpression::TSInstantiationExpression(
5445 CloneIn::clone_in_with_semantic_ids(it, allocator),
5446 ),
5447 Self::V8IntrinsicExpression(it) => JSXExpression::V8IntrinsicExpression(
5448 CloneIn::clone_in_with_semantic_ids(it, allocator),
5449 ),
5450 Self::ComputedMemberExpression(it) => JSXExpression::ComputedMemberExpression(
5451 CloneIn::clone_in_with_semantic_ids(it, allocator),
5452 ),
5453 Self::StaticMemberExpression(it) => JSXExpression::StaticMemberExpression(
5454 CloneIn::clone_in_with_semantic_ids(it, allocator),
5455 ),
5456 Self::PrivateFieldExpression(it) => JSXExpression::PrivateFieldExpression(
5457 CloneIn::clone_in_with_semantic_ids(it, allocator),
5458 ),
5459 }
5460 }
5461}
5462
5463impl<'new_alloc> CloneIn<'new_alloc> for JSXEmptyExpression {
5464 type Cloned = JSXEmptyExpression;
5465
5466 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5467 JSXEmptyExpression { span: CloneIn::clone_in(&self.span, allocator) }
5468 }
5469
5470 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5471 JSXEmptyExpression { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
5472 }
5473}
5474
5475impl<'new_alloc> CloneIn<'new_alloc> for JSXAttributeItem<'_> {
5476 type Cloned = JSXAttributeItem<'new_alloc>;
5477
5478 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5479 match self {
5480 Self::Attribute(it) => JSXAttributeItem::Attribute(CloneIn::clone_in(it, allocator)),
5481 Self::SpreadAttribute(it) => {
5482 JSXAttributeItem::SpreadAttribute(CloneIn::clone_in(it, allocator))
5483 }
5484 }
5485 }
5486
5487 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5488 match self {
5489 Self::Attribute(it) => {
5490 JSXAttributeItem::Attribute(CloneIn::clone_in_with_semantic_ids(it, allocator))
5491 }
5492 Self::SpreadAttribute(it) => JSXAttributeItem::SpreadAttribute(
5493 CloneIn::clone_in_with_semantic_ids(it, allocator),
5494 ),
5495 }
5496 }
5497}
5498
5499impl<'new_alloc> CloneIn<'new_alloc> for JSXAttribute<'_> {
5500 type Cloned = JSXAttribute<'new_alloc>;
5501
5502 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5503 JSXAttribute {
5504 span: CloneIn::clone_in(&self.span, allocator),
5505 name: CloneIn::clone_in(&self.name, allocator),
5506 value: CloneIn::clone_in(&self.value, allocator),
5507 }
5508 }
5509
5510 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5511 JSXAttribute {
5512 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5513 name: CloneIn::clone_in_with_semantic_ids(&self.name, allocator),
5514 value: CloneIn::clone_in_with_semantic_ids(&self.value, allocator),
5515 }
5516 }
5517}
5518
5519impl<'new_alloc> CloneIn<'new_alloc> for JSXSpreadAttribute<'_> {
5520 type Cloned = JSXSpreadAttribute<'new_alloc>;
5521
5522 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5523 JSXSpreadAttribute {
5524 span: CloneIn::clone_in(&self.span, allocator),
5525 argument: CloneIn::clone_in(&self.argument, allocator),
5526 }
5527 }
5528
5529 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5530 JSXSpreadAttribute {
5531 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5532 argument: CloneIn::clone_in_with_semantic_ids(&self.argument, allocator),
5533 }
5534 }
5535}
5536
5537impl<'new_alloc> CloneIn<'new_alloc> for JSXAttributeName<'_> {
5538 type Cloned = JSXAttributeName<'new_alloc>;
5539
5540 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5541 match self {
5542 Self::Identifier(it) => JSXAttributeName::Identifier(CloneIn::clone_in(it, allocator)),
5543 Self::NamespacedName(it) => {
5544 JSXAttributeName::NamespacedName(CloneIn::clone_in(it, allocator))
5545 }
5546 }
5547 }
5548
5549 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5550 match self {
5551 Self::Identifier(it) => {
5552 JSXAttributeName::Identifier(CloneIn::clone_in_with_semantic_ids(it, allocator))
5553 }
5554 Self::NamespacedName(it) => {
5555 JSXAttributeName::NamespacedName(CloneIn::clone_in_with_semantic_ids(it, allocator))
5556 }
5557 }
5558 }
5559}
5560
5561impl<'new_alloc> CloneIn<'new_alloc> for JSXAttributeValue<'_> {
5562 type Cloned = JSXAttributeValue<'new_alloc>;
5563
5564 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5565 match self {
5566 Self::StringLiteral(it) => {
5567 JSXAttributeValue::StringLiteral(CloneIn::clone_in(it, allocator))
5568 }
5569 Self::ExpressionContainer(it) => {
5570 JSXAttributeValue::ExpressionContainer(CloneIn::clone_in(it, allocator))
5571 }
5572 Self::Element(it) => JSXAttributeValue::Element(CloneIn::clone_in(it, allocator)),
5573 Self::Fragment(it) => JSXAttributeValue::Fragment(CloneIn::clone_in(it, allocator)),
5574 }
5575 }
5576
5577 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5578 match self {
5579 Self::StringLiteral(it) => {
5580 JSXAttributeValue::StringLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
5581 }
5582 Self::ExpressionContainer(it) => JSXAttributeValue::ExpressionContainer(
5583 CloneIn::clone_in_with_semantic_ids(it, allocator),
5584 ),
5585 Self::Element(it) => {
5586 JSXAttributeValue::Element(CloneIn::clone_in_with_semantic_ids(it, allocator))
5587 }
5588 Self::Fragment(it) => {
5589 JSXAttributeValue::Fragment(CloneIn::clone_in_with_semantic_ids(it, allocator))
5590 }
5591 }
5592 }
5593}
5594
5595impl<'new_alloc> CloneIn<'new_alloc> for JSXIdentifier<'_> {
5596 type Cloned = JSXIdentifier<'new_alloc>;
5597
5598 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5599 JSXIdentifier {
5600 span: CloneIn::clone_in(&self.span, allocator),
5601 name: CloneIn::clone_in(&self.name, allocator),
5602 }
5603 }
5604
5605 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5606 JSXIdentifier {
5607 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5608 name: CloneIn::clone_in_with_semantic_ids(&self.name, allocator),
5609 }
5610 }
5611}
5612
5613impl<'new_alloc> CloneIn<'new_alloc> for JSXChild<'_> {
5614 type Cloned = JSXChild<'new_alloc>;
5615
5616 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5617 match self {
5618 Self::Text(it) => JSXChild::Text(CloneIn::clone_in(it, allocator)),
5619 Self::Element(it) => JSXChild::Element(CloneIn::clone_in(it, allocator)),
5620 Self::Fragment(it) => JSXChild::Fragment(CloneIn::clone_in(it, allocator)),
5621 Self::ExpressionContainer(it) => {
5622 JSXChild::ExpressionContainer(CloneIn::clone_in(it, allocator))
5623 }
5624 Self::Spread(it) => JSXChild::Spread(CloneIn::clone_in(it, allocator)),
5625 }
5626 }
5627
5628 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5629 match self {
5630 Self::Text(it) => JSXChild::Text(CloneIn::clone_in_with_semantic_ids(it, allocator)),
5631 Self::Element(it) => {
5632 JSXChild::Element(CloneIn::clone_in_with_semantic_ids(it, allocator))
5633 }
5634 Self::Fragment(it) => {
5635 JSXChild::Fragment(CloneIn::clone_in_with_semantic_ids(it, allocator))
5636 }
5637 Self::ExpressionContainer(it) => {
5638 JSXChild::ExpressionContainer(CloneIn::clone_in_with_semantic_ids(it, allocator))
5639 }
5640 Self::Spread(it) => {
5641 JSXChild::Spread(CloneIn::clone_in_with_semantic_ids(it, allocator))
5642 }
5643 }
5644 }
5645}
5646
5647impl<'new_alloc> CloneIn<'new_alloc> for JSXSpreadChild<'_> {
5648 type Cloned = JSXSpreadChild<'new_alloc>;
5649
5650 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5651 JSXSpreadChild {
5652 span: CloneIn::clone_in(&self.span, allocator),
5653 expression: CloneIn::clone_in(&self.expression, allocator),
5654 }
5655 }
5656
5657 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5658 JSXSpreadChild {
5659 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5660 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
5661 }
5662 }
5663}
5664
5665impl<'new_alloc> CloneIn<'new_alloc> for JSXText<'_> {
5666 type Cloned = JSXText<'new_alloc>;
5667
5668 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5669 JSXText {
5670 span: CloneIn::clone_in(&self.span, allocator),
5671 value: CloneIn::clone_in(&self.value, allocator),
5672 raw: CloneIn::clone_in(&self.raw, allocator),
5673 }
5674 }
5675
5676 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5677 JSXText {
5678 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5679 value: CloneIn::clone_in_with_semantic_ids(&self.value, allocator),
5680 raw: CloneIn::clone_in_with_semantic_ids(&self.raw, allocator),
5681 }
5682 }
5683}
5684
5685impl<'new_alloc> CloneIn<'new_alloc> for TSThisParameter<'_> {
5686 type Cloned = TSThisParameter<'new_alloc>;
5687
5688 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5689 TSThisParameter {
5690 span: CloneIn::clone_in(&self.span, allocator),
5691 this_span: CloneIn::clone_in(&self.this_span, allocator),
5692 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
5693 }
5694 }
5695
5696 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5697 TSThisParameter {
5698 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5699 this_span: CloneIn::clone_in_with_semantic_ids(&self.this_span, allocator),
5700 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
5701 }
5702 }
5703}
5704
5705impl<'new_alloc> CloneIn<'new_alloc> for TSEnumDeclaration<'_> {
5706 type Cloned = TSEnumDeclaration<'new_alloc>;
5707
5708 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5709 TSEnumDeclaration {
5710 span: CloneIn::clone_in(&self.span, allocator),
5711 id: CloneIn::clone_in(&self.id, allocator),
5712 body: CloneIn::clone_in(&self.body, allocator),
5713 r#const: CloneIn::clone_in(&self.r#const, allocator),
5714 declare: CloneIn::clone_in(&self.declare, allocator),
5715 scope_id: Default::default(),
5716 }
5717 }
5718
5719 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5720 TSEnumDeclaration {
5721 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5722 id: CloneIn::clone_in_with_semantic_ids(&self.id, allocator),
5723 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
5724 r#const: CloneIn::clone_in_with_semantic_ids(&self.r#const, allocator),
5725 declare: CloneIn::clone_in_with_semantic_ids(&self.declare, allocator),
5726 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
5727 }
5728 }
5729}
5730
5731impl<'new_alloc> CloneIn<'new_alloc> for TSEnumBody<'_> {
5732 type Cloned = TSEnumBody<'new_alloc>;
5733
5734 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5735 TSEnumBody {
5736 span: CloneIn::clone_in(&self.span, allocator),
5737 members: CloneIn::clone_in(&self.members, allocator),
5738 }
5739 }
5740
5741 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5742 TSEnumBody {
5743 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5744 members: CloneIn::clone_in_with_semantic_ids(&self.members, allocator),
5745 }
5746 }
5747}
5748
5749impl<'new_alloc> CloneIn<'new_alloc> for TSEnumMember<'_> {
5750 type Cloned = TSEnumMember<'new_alloc>;
5751
5752 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5753 TSEnumMember {
5754 span: CloneIn::clone_in(&self.span, allocator),
5755 id: CloneIn::clone_in(&self.id, allocator),
5756 initializer: CloneIn::clone_in(&self.initializer, allocator),
5757 }
5758 }
5759
5760 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5761 TSEnumMember {
5762 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5763 id: CloneIn::clone_in_with_semantic_ids(&self.id, allocator),
5764 initializer: CloneIn::clone_in_with_semantic_ids(&self.initializer, allocator),
5765 }
5766 }
5767}
5768
5769impl<'new_alloc> CloneIn<'new_alloc> for TSEnumMemberName<'_> {
5770 type Cloned = TSEnumMemberName<'new_alloc>;
5771
5772 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5773 match self {
5774 Self::Identifier(it) => TSEnumMemberName::Identifier(CloneIn::clone_in(it, allocator)),
5775 Self::String(it) => TSEnumMemberName::String(CloneIn::clone_in(it, allocator)),
5776 Self::ComputedString(it) => {
5777 TSEnumMemberName::ComputedString(CloneIn::clone_in(it, allocator))
5778 }
5779 Self::ComputedTemplateString(it) => {
5780 TSEnumMemberName::ComputedTemplateString(CloneIn::clone_in(it, allocator))
5781 }
5782 }
5783 }
5784
5785 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5786 match self {
5787 Self::Identifier(it) => {
5788 TSEnumMemberName::Identifier(CloneIn::clone_in_with_semantic_ids(it, allocator))
5789 }
5790 Self::String(it) => {
5791 TSEnumMemberName::String(CloneIn::clone_in_with_semantic_ids(it, allocator))
5792 }
5793 Self::ComputedString(it) => {
5794 TSEnumMemberName::ComputedString(CloneIn::clone_in_with_semantic_ids(it, allocator))
5795 }
5796 Self::ComputedTemplateString(it) => TSEnumMemberName::ComputedTemplateString(
5797 CloneIn::clone_in_with_semantic_ids(it, allocator),
5798 ),
5799 }
5800 }
5801}
5802
5803impl<'new_alloc> CloneIn<'new_alloc> for TSTypeAnnotation<'_> {
5804 type Cloned = TSTypeAnnotation<'new_alloc>;
5805
5806 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5807 TSTypeAnnotation {
5808 span: CloneIn::clone_in(&self.span, allocator),
5809 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
5810 }
5811 }
5812
5813 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5814 TSTypeAnnotation {
5815 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5816 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
5817 }
5818 }
5819}
5820
5821impl<'new_alloc> CloneIn<'new_alloc> for TSLiteralType<'_> {
5822 type Cloned = TSLiteralType<'new_alloc>;
5823
5824 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5825 TSLiteralType {
5826 span: CloneIn::clone_in(&self.span, allocator),
5827 literal: CloneIn::clone_in(&self.literal, allocator),
5828 }
5829 }
5830
5831 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5832 TSLiteralType {
5833 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
5834 literal: CloneIn::clone_in_with_semantic_ids(&self.literal, allocator),
5835 }
5836 }
5837}
5838
5839impl<'new_alloc> CloneIn<'new_alloc> for TSLiteral<'_> {
5840 type Cloned = TSLiteral<'new_alloc>;
5841
5842 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5843 match self {
5844 Self::BooleanLiteral(it) => TSLiteral::BooleanLiteral(CloneIn::clone_in(it, allocator)),
5845 Self::NumericLiteral(it) => TSLiteral::NumericLiteral(CloneIn::clone_in(it, allocator)),
5846 Self::BigIntLiteral(it) => TSLiteral::BigIntLiteral(CloneIn::clone_in(it, allocator)),
5847 Self::StringLiteral(it) => TSLiteral::StringLiteral(CloneIn::clone_in(it, allocator)),
5848 Self::TemplateLiteral(it) => {
5849 TSLiteral::TemplateLiteral(CloneIn::clone_in(it, allocator))
5850 }
5851 Self::UnaryExpression(it) => {
5852 TSLiteral::UnaryExpression(CloneIn::clone_in(it, allocator))
5853 }
5854 }
5855 }
5856
5857 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5858 match self {
5859 Self::BooleanLiteral(it) => {
5860 TSLiteral::BooleanLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
5861 }
5862 Self::NumericLiteral(it) => {
5863 TSLiteral::NumericLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
5864 }
5865 Self::BigIntLiteral(it) => {
5866 TSLiteral::BigIntLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
5867 }
5868 Self::StringLiteral(it) => {
5869 TSLiteral::StringLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
5870 }
5871 Self::TemplateLiteral(it) => {
5872 TSLiteral::TemplateLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
5873 }
5874 Self::UnaryExpression(it) => {
5875 TSLiteral::UnaryExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
5876 }
5877 }
5878 }
5879}
5880
5881impl<'new_alloc> CloneIn<'new_alloc> for TSType<'_> {
5882 type Cloned = TSType<'new_alloc>;
5883
5884 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5885 match self {
5886 Self::TSAnyKeyword(it) => TSType::TSAnyKeyword(CloneIn::clone_in(it, allocator)),
5887 Self::TSBigIntKeyword(it) => TSType::TSBigIntKeyword(CloneIn::clone_in(it, allocator)),
5888 Self::TSBooleanKeyword(it) => {
5889 TSType::TSBooleanKeyword(CloneIn::clone_in(it, allocator))
5890 }
5891 Self::TSIntrinsicKeyword(it) => {
5892 TSType::TSIntrinsicKeyword(CloneIn::clone_in(it, allocator))
5893 }
5894 Self::TSNeverKeyword(it) => TSType::TSNeverKeyword(CloneIn::clone_in(it, allocator)),
5895 Self::TSNullKeyword(it) => TSType::TSNullKeyword(CloneIn::clone_in(it, allocator)),
5896 Self::TSNumberKeyword(it) => TSType::TSNumberKeyword(CloneIn::clone_in(it, allocator)),
5897 Self::TSObjectKeyword(it) => TSType::TSObjectKeyword(CloneIn::clone_in(it, allocator)),
5898 Self::TSStringKeyword(it) => TSType::TSStringKeyword(CloneIn::clone_in(it, allocator)),
5899 Self::TSSymbolKeyword(it) => TSType::TSSymbolKeyword(CloneIn::clone_in(it, allocator)),
5900 Self::TSUndefinedKeyword(it) => {
5901 TSType::TSUndefinedKeyword(CloneIn::clone_in(it, allocator))
5902 }
5903 Self::TSUnknownKeyword(it) => {
5904 TSType::TSUnknownKeyword(CloneIn::clone_in(it, allocator))
5905 }
5906 Self::TSVoidKeyword(it) => TSType::TSVoidKeyword(CloneIn::clone_in(it, allocator)),
5907 Self::TSArrayType(it) => TSType::TSArrayType(CloneIn::clone_in(it, allocator)),
5908 Self::TSConditionalType(it) => {
5909 TSType::TSConditionalType(CloneIn::clone_in(it, allocator))
5910 }
5911 Self::TSConstructorType(it) => {
5912 TSType::TSConstructorType(CloneIn::clone_in(it, allocator))
5913 }
5914 Self::TSFunctionType(it) => TSType::TSFunctionType(CloneIn::clone_in(it, allocator)),
5915 Self::TSImportType(it) => TSType::TSImportType(CloneIn::clone_in(it, allocator)),
5916 Self::TSIndexedAccessType(it) => {
5917 TSType::TSIndexedAccessType(CloneIn::clone_in(it, allocator))
5918 }
5919 Self::TSInferType(it) => TSType::TSInferType(CloneIn::clone_in(it, allocator)),
5920 Self::TSIntersectionType(it) => {
5921 TSType::TSIntersectionType(CloneIn::clone_in(it, allocator))
5922 }
5923 Self::TSLiteralType(it) => TSType::TSLiteralType(CloneIn::clone_in(it, allocator)),
5924 Self::TSMappedType(it) => TSType::TSMappedType(CloneIn::clone_in(it, allocator)),
5925 Self::TSNamedTupleMember(it) => {
5926 TSType::TSNamedTupleMember(CloneIn::clone_in(it, allocator))
5927 }
5928 Self::TSTemplateLiteralType(it) => {
5929 TSType::TSTemplateLiteralType(CloneIn::clone_in(it, allocator))
5930 }
5931 Self::TSThisType(it) => TSType::TSThisType(CloneIn::clone_in(it, allocator)),
5932 Self::TSTupleType(it) => TSType::TSTupleType(CloneIn::clone_in(it, allocator)),
5933 Self::TSTypeLiteral(it) => TSType::TSTypeLiteral(CloneIn::clone_in(it, allocator)),
5934 Self::TSTypeOperatorType(it) => {
5935 TSType::TSTypeOperatorType(CloneIn::clone_in(it, allocator))
5936 }
5937 Self::TSTypePredicate(it) => TSType::TSTypePredicate(CloneIn::clone_in(it, allocator)),
5938 Self::TSTypeQuery(it) => TSType::TSTypeQuery(CloneIn::clone_in(it, allocator)),
5939 Self::TSTypeReference(it) => TSType::TSTypeReference(CloneIn::clone_in(it, allocator)),
5940 Self::TSUnionType(it) => TSType::TSUnionType(CloneIn::clone_in(it, allocator)),
5941 Self::TSParenthesizedType(it) => {
5942 TSType::TSParenthesizedType(CloneIn::clone_in(it, allocator))
5943 }
5944 Self::JSDocNullableType(it) => {
5945 TSType::JSDocNullableType(CloneIn::clone_in(it, allocator))
5946 }
5947 Self::JSDocNonNullableType(it) => {
5948 TSType::JSDocNonNullableType(CloneIn::clone_in(it, allocator))
5949 }
5950 Self::JSDocUnknownType(it) => {
5951 TSType::JSDocUnknownType(CloneIn::clone_in(it, allocator))
5952 }
5953 }
5954 }
5955
5956 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
5957 match self {
5958 Self::TSAnyKeyword(it) => {
5959 TSType::TSAnyKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
5960 }
5961 Self::TSBigIntKeyword(it) => {
5962 TSType::TSBigIntKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
5963 }
5964 Self::TSBooleanKeyword(it) => {
5965 TSType::TSBooleanKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
5966 }
5967 Self::TSIntrinsicKeyword(it) => {
5968 TSType::TSIntrinsicKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
5969 }
5970 Self::TSNeverKeyword(it) => {
5971 TSType::TSNeverKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
5972 }
5973 Self::TSNullKeyword(it) => {
5974 TSType::TSNullKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
5975 }
5976 Self::TSNumberKeyword(it) => {
5977 TSType::TSNumberKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
5978 }
5979 Self::TSObjectKeyword(it) => {
5980 TSType::TSObjectKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
5981 }
5982 Self::TSStringKeyword(it) => {
5983 TSType::TSStringKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
5984 }
5985 Self::TSSymbolKeyword(it) => {
5986 TSType::TSSymbolKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
5987 }
5988 Self::TSUndefinedKeyword(it) => {
5989 TSType::TSUndefinedKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
5990 }
5991 Self::TSUnknownKeyword(it) => {
5992 TSType::TSUnknownKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
5993 }
5994 Self::TSVoidKeyword(it) => {
5995 TSType::TSVoidKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
5996 }
5997 Self::TSArrayType(it) => {
5998 TSType::TSArrayType(CloneIn::clone_in_with_semantic_ids(it, allocator))
5999 }
6000 Self::TSConditionalType(it) => {
6001 TSType::TSConditionalType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6002 }
6003 Self::TSConstructorType(it) => {
6004 TSType::TSConstructorType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6005 }
6006 Self::TSFunctionType(it) => {
6007 TSType::TSFunctionType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6008 }
6009 Self::TSImportType(it) => {
6010 TSType::TSImportType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6011 }
6012 Self::TSIndexedAccessType(it) => {
6013 TSType::TSIndexedAccessType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6014 }
6015 Self::TSInferType(it) => {
6016 TSType::TSInferType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6017 }
6018 Self::TSIntersectionType(it) => {
6019 TSType::TSIntersectionType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6020 }
6021 Self::TSLiteralType(it) => {
6022 TSType::TSLiteralType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6023 }
6024 Self::TSMappedType(it) => {
6025 TSType::TSMappedType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6026 }
6027 Self::TSNamedTupleMember(it) => {
6028 TSType::TSNamedTupleMember(CloneIn::clone_in_with_semantic_ids(it, allocator))
6029 }
6030 Self::TSTemplateLiteralType(it) => {
6031 TSType::TSTemplateLiteralType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6032 }
6033 Self::TSThisType(it) => {
6034 TSType::TSThisType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6035 }
6036 Self::TSTupleType(it) => {
6037 TSType::TSTupleType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6038 }
6039 Self::TSTypeLiteral(it) => {
6040 TSType::TSTypeLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
6041 }
6042 Self::TSTypeOperatorType(it) => {
6043 TSType::TSTypeOperatorType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6044 }
6045 Self::TSTypePredicate(it) => {
6046 TSType::TSTypePredicate(CloneIn::clone_in_with_semantic_ids(it, allocator))
6047 }
6048 Self::TSTypeQuery(it) => {
6049 TSType::TSTypeQuery(CloneIn::clone_in_with_semantic_ids(it, allocator))
6050 }
6051 Self::TSTypeReference(it) => {
6052 TSType::TSTypeReference(CloneIn::clone_in_with_semantic_ids(it, allocator))
6053 }
6054 Self::TSUnionType(it) => {
6055 TSType::TSUnionType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6056 }
6057 Self::TSParenthesizedType(it) => {
6058 TSType::TSParenthesizedType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6059 }
6060 Self::JSDocNullableType(it) => {
6061 TSType::JSDocNullableType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6062 }
6063 Self::JSDocNonNullableType(it) => {
6064 TSType::JSDocNonNullableType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6065 }
6066 Self::JSDocUnknownType(it) => {
6067 TSType::JSDocUnknownType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6068 }
6069 }
6070 }
6071}
6072
6073impl<'new_alloc> CloneIn<'new_alloc> for TSConditionalType<'_> {
6074 type Cloned = TSConditionalType<'new_alloc>;
6075
6076 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6077 TSConditionalType {
6078 span: CloneIn::clone_in(&self.span, allocator),
6079 check_type: CloneIn::clone_in(&self.check_type, allocator),
6080 extends_type: CloneIn::clone_in(&self.extends_type, allocator),
6081 true_type: CloneIn::clone_in(&self.true_type, allocator),
6082 false_type: CloneIn::clone_in(&self.false_type, allocator),
6083 scope_id: Default::default(),
6084 }
6085 }
6086
6087 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6088 TSConditionalType {
6089 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6090 check_type: CloneIn::clone_in_with_semantic_ids(&self.check_type, allocator),
6091 extends_type: CloneIn::clone_in_with_semantic_ids(&self.extends_type, allocator),
6092 true_type: CloneIn::clone_in_with_semantic_ids(&self.true_type, allocator),
6093 false_type: CloneIn::clone_in_with_semantic_ids(&self.false_type, allocator),
6094 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
6095 }
6096 }
6097}
6098
6099impl<'new_alloc> CloneIn<'new_alloc> for TSUnionType<'_> {
6100 type Cloned = TSUnionType<'new_alloc>;
6101
6102 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6103 TSUnionType {
6104 span: CloneIn::clone_in(&self.span, allocator),
6105 types: CloneIn::clone_in(&self.types, allocator),
6106 }
6107 }
6108
6109 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6110 TSUnionType {
6111 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6112 types: CloneIn::clone_in_with_semantic_ids(&self.types, allocator),
6113 }
6114 }
6115}
6116
6117impl<'new_alloc> CloneIn<'new_alloc> for TSIntersectionType<'_> {
6118 type Cloned = TSIntersectionType<'new_alloc>;
6119
6120 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6121 TSIntersectionType {
6122 span: CloneIn::clone_in(&self.span, allocator),
6123 types: CloneIn::clone_in(&self.types, allocator),
6124 }
6125 }
6126
6127 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6128 TSIntersectionType {
6129 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6130 types: CloneIn::clone_in_with_semantic_ids(&self.types, allocator),
6131 }
6132 }
6133}
6134
6135impl<'new_alloc> CloneIn<'new_alloc> for TSParenthesizedType<'_> {
6136 type Cloned = TSParenthesizedType<'new_alloc>;
6137
6138 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6139 TSParenthesizedType {
6140 span: CloneIn::clone_in(&self.span, allocator),
6141 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
6142 }
6143 }
6144
6145 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6146 TSParenthesizedType {
6147 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6148 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
6149 }
6150 }
6151}
6152
6153impl<'new_alloc> CloneIn<'new_alloc> for TSTypeOperator<'_> {
6154 type Cloned = TSTypeOperator<'new_alloc>;
6155
6156 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6157 TSTypeOperator {
6158 span: CloneIn::clone_in(&self.span, allocator),
6159 operator: CloneIn::clone_in(&self.operator, allocator),
6160 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
6161 }
6162 }
6163
6164 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6165 TSTypeOperator {
6166 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6167 operator: CloneIn::clone_in_with_semantic_ids(&self.operator, allocator),
6168 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
6169 }
6170 }
6171}
6172
6173impl<'new_alloc> CloneIn<'new_alloc> for TSTypeOperatorOperator {
6174 type Cloned = TSTypeOperatorOperator;
6175
6176 #[inline(always)]
6177 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6178 *self
6179 }
6180
6181 #[inline(always)]
6182 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6183 *self
6184 }
6185}
6186
6187impl<'new_alloc> CloneIn<'new_alloc> for TSArrayType<'_> {
6188 type Cloned = TSArrayType<'new_alloc>;
6189
6190 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6191 TSArrayType {
6192 span: CloneIn::clone_in(&self.span, allocator),
6193 element_type: CloneIn::clone_in(&self.element_type, allocator),
6194 }
6195 }
6196
6197 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6198 TSArrayType {
6199 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6200 element_type: CloneIn::clone_in_with_semantic_ids(&self.element_type, allocator),
6201 }
6202 }
6203}
6204
6205impl<'new_alloc> CloneIn<'new_alloc> for TSIndexedAccessType<'_> {
6206 type Cloned = TSIndexedAccessType<'new_alloc>;
6207
6208 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6209 TSIndexedAccessType {
6210 span: CloneIn::clone_in(&self.span, allocator),
6211 object_type: CloneIn::clone_in(&self.object_type, allocator),
6212 index_type: CloneIn::clone_in(&self.index_type, allocator),
6213 }
6214 }
6215
6216 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6217 TSIndexedAccessType {
6218 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6219 object_type: CloneIn::clone_in_with_semantic_ids(&self.object_type, allocator),
6220 index_type: CloneIn::clone_in_with_semantic_ids(&self.index_type, allocator),
6221 }
6222 }
6223}
6224
6225impl<'new_alloc> CloneIn<'new_alloc> for TSTupleType<'_> {
6226 type Cloned = TSTupleType<'new_alloc>;
6227
6228 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6229 TSTupleType {
6230 span: CloneIn::clone_in(&self.span, allocator),
6231 element_types: CloneIn::clone_in(&self.element_types, allocator),
6232 }
6233 }
6234
6235 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6236 TSTupleType {
6237 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6238 element_types: CloneIn::clone_in_with_semantic_ids(&self.element_types, allocator),
6239 }
6240 }
6241}
6242
6243impl<'new_alloc> CloneIn<'new_alloc> for TSNamedTupleMember<'_> {
6244 type Cloned = TSNamedTupleMember<'new_alloc>;
6245
6246 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6247 TSNamedTupleMember {
6248 span: CloneIn::clone_in(&self.span, allocator),
6249 label: CloneIn::clone_in(&self.label, allocator),
6250 element_type: CloneIn::clone_in(&self.element_type, allocator),
6251 optional: CloneIn::clone_in(&self.optional, allocator),
6252 }
6253 }
6254
6255 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6256 TSNamedTupleMember {
6257 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6258 label: CloneIn::clone_in_with_semantic_ids(&self.label, allocator),
6259 element_type: CloneIn::clone_in_with_semantic_ids(&self.element_type, allocator),
6260 optional: CloneIn::clone_in_with_semantic_ids(&self.optional, allocator),
6261 }
6262 }
6263}
6264
6265impl<'new_alloc> CloneIn<'new_alloc> for TSOptionalType<'_> {
6266 type Cloned = TSOptionalType<'new_alloc>;
6267
6268 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6269 TSOptionalType {
6270 span: CloneIn::clone_in(&self.span, allocator),
6271 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
6272 }
6273 }
6274
6275 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6276 TSOptionalType {
6277 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6278 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
6279 }
6280 }
6281}
6282
6283impl<'new_alloc> CloneIn<'new_alloc> for TSRestType<'_> {
6284 type Cloned = TSRestType<'new_alloc>;
6285
6286 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6287 TSRestType {
6288 span: CloneIn::clone_in(&self.span, allocator),
6289 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
6290 }
6291 }
6292
6293 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6294 TSRestType {
6295 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6296 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
6297 }
6298 }
6299}
6300
6301impl<'new_alloc> CloneIn<'new_alloc> for TSTupleElement<'_> {
6302 type Cloned = TSTupleElement<'new_alloc>;
6303
6304 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6305 match self {
6306 Self::TSOptionalType(it) => {
6307 TSTupleElement::TSOptionalType(CloneIn::clone_in(it, allocator))
6308 }
6309 Self::TSRestType(it) => TSTupleElement::TSRestType(CloneIn::clone_in(it, allocator)),
6310 Self::TSAnyKeyword(it) => {
6311 TSTupleElement::TSAnyKeyword(CloneIn::clone_in(it, allocator))
6312 }
6313 Self::TSBigIntKeyword(it) => {
6314 TSTupleElement::TSBigIntKeyword(CloneIn::clone_in(it, allocator))
6315 }
6316 Self::TSBooleanKeyword(it) => {
6317 TSTupleElement::TSBooleanKeyword(CloneIn::clone_in(it, allocator))
6318 }
6319 Self::TSIntrinsicKeyword(it) => {
6320 TSTupleElement::TSIntrinsicKeyword(CloneIn::clone_in(it, allocator))
6321 }
6322 Self::TSNeverKeyword(it) => {
6323 TSTupleElement::TSNeverKeyword(CloneIn::clone_in(it, allocator))
6324 }
6325 Self::TSNullKeyword(it) => {
6326 TSTupleElement::TSNullKeyword(CloneIn::clone_in(it, allocator))
6327 }
6328 Self::TSNumberKeyword(it) => {
6329 TSTupleElement::TSNumberKeyword(CloneIn::clone_in(it, allocator))
6330 }
6331 Self::TSObjectKeyword(it) => {
6332 TSTupleElement::TSObjectKeyword(CloneIn::clone_in(it, allocator))
6333 }
6334 Self::TSStringKeyword(it) => {
6335 TSTupleElement::TSStringKeyword(CloneIn::clone_in(it, allocator))
6336 }
6337 Self::TSSymbolKeyword(it) => {
6338 TSTupleElement::TSSymbolKeyword(CloneIn::clone_in(it, allocator))
6339 }
6340 Self::TSUndefinedKeyword(it) => {
6341 TSTupleElement::TSUndefinedKeyword(CloneIn::clone_in(it, allocator))
6342 }
6343 Self::TSUnknownKeyword(it) => {
6344 TSTupleElement::TSUnknownKeyword(CloneIn::clone_in(it, allocator))
6345 }
6346 Self::TSVoidKeyword(it) => {
6347 TSTupleElement::TSVoidKeyword(CloneIn::clone_in(it, allocator))
6348 }
6349 Self::TSArrayType(it) => TSTupleElement::TSArrayType(CloneIn::clone_in(it, allocator)),
6350 Self::TSConditionalType(it) => {
6351 TSTupleElement::TSConditionalType(CloneIn::clone_in(it, allocator))
6352 }
6353 Self::TSConstructorType(it) => {
6354 TSTupleElement::TSConstructorType(CloneIn::clone_in(it, allocator))
6355 }
6356 Self::TSFunctionType(it) => {
6357 TSTupleElement::TSFunctionType(CloneIn::clone_in(it, allocator))
6358 }
6359 Self::TSImportType(it) => {
6360 TSTupleElement::TSImportType(CloneIn::clone_in(it, allocator))
6361 }
6362 Self::TSIndexedAccessType(it) => {
6363 TSTupleElement::TSIndexedAccessType(CloneIn::clone_in(it, allocator))
6364 }
6365 Self::TSInferType(it) => TSTupleElement::TSInferType(CloneIn::clone_in(it, allocator)),
6366 Self::TSIntersectionType(it) => {
6367 TSTupleElement::TSIntersectionType(CloneIn::clone_in(it, allocator))
6368 }
6369 Self::TSLiteralType(it) => {
6370 TSTupleElement::TSLiteralType(CloneIn::clone_in(it, allocator))
6371 }
6372 Self::TSMappedType(it) => {
6373 TSTupleElement::TSMappedType(CloneIn::clone_in(it, allocator))
6374 }
6375 Self::TSNamedTupleMember(it) => {
6376 TSTupleElement::TSNamedTupleMember(CloneIn::clone_in(it, allocator))
6377 }
6378 Self::TSTemplateLiteralType(it) => {
6379 TSTupleElement::TSTemplateLiteralType(CloneIn::clone_in(it, allocator))
6380 }
6381 Self::TSThisType(it) => TSTupleElement::TSThisType(CloneIn::clone_in(it, allocator)),
6382 Self::TSTupleType(it) => TSTupleElement::TSTupleType(CloneIn::clone_in(it, allocator)),
6383 Self::TSTypeLiteral(it) => {
6384 TSTupleElement::TSTypeLiteral(CloneIn::clone_in(it, allocator))
6385 }
6386 Self::TSTypeOperatorType(it) => {
6387 TSTupleElement::TSTypeOperatorType(CloneIn::clone_in(it, allocator))
6388 }
6389 Self::TSTypePredicate(it) => {
6390 TSTupleElement::TSTypePredicate(CloneIn::clone_in(it, allocator))
6391 }
6392 Self::TSTypeQuery(it) => TSTupleElement::TSTypeQuery(CloneIn::clone_in(it, allocator)),
6393 Self::TSTypeReference(it) => {
6394 TSTupleElement::TSTypeReference(CloneIn::clone_in(it, allocator))
6395 }
6396 Self::TSUnionType(it) => TSTupleElement::TSUnionType(CloneIn::clone_in(it, allocator)),
6397 Self::TSParenthesizedType(it) => {
6398 TSTupleElement::TSParenthesizedType(CloneIn::clone_in(it, allocator))
6399 }
6400 Self::JSDocNullableType(it) => {
6401 TSTupleElement::JSDocNullableType(CloneIn::clone_in(it, allocator))
6402 }
6403 Self::JSDocNonNullableType(it) => {
6404 TSTupleElement::JSDocNonNullableType(CloneIn::clone_in(it, allocator))
6405 }
6406 Self::JSDocUnknownType(it) => {
6407 TSTupleElement::JSDocUnknownType(CloneIn::clone_in(it, allocator))
6408 }
6409 }
6410 }
6411
6412 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6413 match self {
6414 Self::TSOptionalType(it) => {
6415 TSTupleElement::TSOptionalType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6416 }
6417 Self::TSRestType(it) => {
6418 TSTupleElement::TSRestType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6419 }
6420 Self::TSAnyKeyword(it) => {
6421 TSTupleElement::TSAnyKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
6422 }
6423 Self::TSBigIntKeyword(it) => {
6424 TSTupleElement::TSBigIntKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
6425 }
6426 Self::TSBooleanKeyword(it) => {
6427 TSTupleElement::TSBooleanKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
6428 }
6429 Self::TSIntrinsicKeyword(it) => TSTupleElement::TSIntrinsicKeyword(
6430 CloneIn::clone_in_with_semantic_ids(it, allocator),
6431 ),
6432 Self::TSNeverKeyword(it) => {
6433 TSTupleElement::TSNeverKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
6434 }
6435 Self::TSNullKeyword(it) => {
6436 TSTupleElement::TSNullKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
6437 }
6438 Self::TSNumberKeyword(it) => {
6439 TSTupleElement::TSNumberKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
6440 }
6441 Self::TSObjectKeyword(it) => {
6442 TSTupleElement::TSObjectKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
6443 }
6444 Self::TSStringKeyword(it) => {
6445 TSTupleElement::TSStringKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
6446 }
6447 Self::TSSymbolKeyword(it) => {
6448 TSTupleElement::TSSymbolKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
6449 }
6450 Self::TSUndefinedKeyword(it) => TSTupleElement::TSUndefinedKeyword(
6451 CloneIn::clone_in_with_semantic_ids(it, allocator),
6452 ),
6453 Self::TSUnknownKeyword(it) => {
6454 TSTupleElement::TSUnknownKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
6455 }
6456 Self::TSVoidKeyword(it) => {
6457 TSTupleElement::TSVoidKeyword(CloneIn::clone_in_with_semantic_ids(it, allocator))
6458 }
6459 Self::TSArrayType(it) => {
6460 TSTupleElement::TSArrayType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6461 }
6462 Self::TSConditionalType(it) => TSTupleElement::TSConditionalType(
6463 CloneIn::clone_in_with_semantic_ids(it, allocator),
6464 ),
6465 Self::TSConstructorType(it) => TSTupleElement::TSConstructorType(
6466 CloneIn::clone_in_with_semantic_ids(it, allocator),
6467 ),
6468 Self::TSFunctionType(it) => {
6469 TSTupleElement::TSFunctionType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6470 }
6471 Self::TSImportType(it) => {
6472 TSTupleElement::TSImportType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6473 }
6474 Self::TSIndexedAccessType(it) => TSTupleElement::TSIndexedAccessType(
6475 CloneIn::clone_in_with_semantic_ids(it, allocator),
6476 ),
6477 Self::TSInferType(it) => {
6478 TSTupleElement::TSInferType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6479 }
6480 Self::TSIntersectionType(it) => TSTupleElement::TSIntersectionType(
6481 CloneIn::clone_in_with_semantic_ids(it, allocator),
6482 ),
6483 Self::TSLiteralType(it) => {
6484 TSTupleElement::TSLiteralType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6485 }
6486 Self::TSMappedType(it) => {
6487 TSTupleElement::TSMappedType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6488 }
6489 Self::TSNamedTupleMember(it) => TSTupleElement::TSNamedTupleMember(
6490 CloneIn::clone_in_with_semantic_ids(it, allocator),
6491 ),
6492 Self::TSTemplateLiteralType(it) => TSTupleElement::TSTemplateLiteralType(
6493 CloneIn::clone_in_with_semantic_ids(it, allocator),
6494 ),
6495 Self::TSThisType(it) => {
6496 TSTupleElement::TSThisType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6497 }
6498 Self::TSTupleType(it) => {
6499 TSTupleElement::TSTupleType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6500 }
6501 Self::TSTypeLiteral(it) => {
6502 TSTupleElement::TSTypeLiteral(CloneIn::clone_in_with_semantic_ids(it, allocator))
6503 }
6504 Self::TSTypeOperatorType(it) => TSTupleElement::TSTypeOperatorType(
6505 CloneIn::clone_in_with_semantic_ids(it, allocator),
6506 ),
6507 Self::TSTypePredicate(it) => {
6508 TSTupleElement::TSTypePredicate(CloneIn::clone_in_with_semantic_ids(it, allocator))
6509 }
6510 Self::TSTypeQuery(it) => {
6511 TSTupleElement::TSTypeQuery(CloneIn::clone_in_with_semantic_ids(it, allocator))
6512 }
6513 Self::TSTypeReference(it) => {
6514 TSTupleElement::TSTypeReference(CloneIn::clone_in_with_semantic_ids(it, allocator))
6515 }
6516 Self::TSUnionType(it) => {
6517 TSTupleElement::TSUnionType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6518 }
6519 Self::TSParenthesizedType(it) => TSTupleElement::TSParenthesizedType(
6520 CloneIn::clone_in_with_semantic_ids(it, allocator),
6521 ),
6522 Self::JSDocNullableType(it) => TSTupleElement::JSDocNullableType(
6523 CloneIn::clone_in_with_semantic_ids(it, allocator),
6524 ),
6525 Self::JSDocNonNullableType(it) => TSTupleElement::JSDocNonNullableType(
6526 CloneIn::clone_in_with_semantic_ids(it, allocator),
6527 ),
6528 Self::JSDocUnknownType(it) => {
6529 TSTupleElement::JSDocUnknownType(CloneIn::clone_in_with_semantic_ids(it, allocator))
6530 }
6531 }
6532 }
6533}
6534
6535impl<'new_alloc> CloneIn<'new_alloc> for TSAnyKeyword {
6536 type Cloned = TSAnyKeyword;
6537
6538 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6539 TSAnyKeyword { span: CloneIn::clone_in(&self.span, allocator) }
6540 }
6541
6542 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6543 TSAnyKeyword { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6544 }
6545}
6546
6547impl<'new_alloc> CloneIn<'new_alloc> for TSStringKeyword {
6548 type Cloned = TSStringKeyword;
6549
6550 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6551 TSStringKeyword { span: CloneIn::clone_in(&self.span, allocator) }
6552 }
6553
6554 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6555 TSStringKeyword { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6556 }
6557}
6558
6559impl<'new_alloc> CloneIn<'new_alloc> for TSBooleanKeyword {
6560 type Cloned = TSBooleanKeyword;
6561
6562 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6563 TSBooleanKeyword { span: CloneIn::clone_in(&self.span, allocator) }
6564 }
6565
6566 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6567 TSBooleanKeyword { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6568 }
6569}
6570
6571impl<'new_alloc> CloneIn<'new_alloc> for TSNumberKeyword {
6572 type Cloned = TSNumberKeyword;
6573
6574 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6575 TSNumberKeyword { span: CloneIn::clone_in(&self.span, allocator) }
6576 }
6577
6578 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6579 TSNumberKeyword { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6580 }
6581}
6582
6583impl<'new_alloc> CloneIn<'new_alloc> for TSNeverKeyword {
6584 type Cloned = TSNeverKeyword;
6585
6586 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6587 TSNeverKeyword { span: CloneIn::clone_in(&self.span, allocator) }
6588 }
6589
6590 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6591 TSNeverKeyword { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6592 }
6593}
6594
6595impl<'new_alloc> CloneIn<'new_alloc> for TSIntrinsicKeyword {
6596 type Cloned = TSIntrinsicKeyword;
6597
6598 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6599 TSIntrinsicKeyword { span: CloneIn::clone_in(&self.span, allocator) }
6600 }
6601
6602 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6603 TSIntrinsicKeyword { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6604 }
6605}
6606
6607impl<'new_alloc> CloneIn<'new_alloc> for TSUnknownKeyword {
6608 type Cloned = TSUnknownKeyword;
6609
6610 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6611 TSUnknownKeyword { span: CloneIn::clone_in(&self.span, allocator) }
6612 }
6613
6614 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6615 TSUnknownKeyword { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6616 }
6617}
6618
6619impl<'new_alloc> CloneIn<'new_alloc> for TSNullKeyword {
6620 type Cloned = TSNullKeyword;
6621
6622 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6623 TSNullKeyword { span: CloneIn::clone_in(&self.span, allocator) }
6624 }
6625
6626 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6627 TSNullKeyword { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6628 }
6629}
6630
6631impl<'new_alloc> CloneIn<'new_alloc> for TSUndefinedKeyword {
6632 type Cloned = TSUndefinedKeyword;
6633
6634 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6635 TSUndefinedKeyword { span: CloneIn::clone_in(&self.span, allocator) }
6636 }
6637
6638 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6639 TSUndefinedKeyword { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6640 }
6641}
6642
6643impl<'new_alloc> CloneIn<'new_alloc> for TSVoidKeyword {
6644 type Cloned = TSVoidKeyword;
6645
6646 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6647 TSVoidKeyword { span: CloneIn::clone_in(&self.span, allocator) }
6648 }
6649
6650 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6651 TSVoidKeyword { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6652 }
6653}
6654
6655impl<'new_alloc> CloneIn<'new_alloc> for TSSymbolKeyword {
6656 type Cloned = TSSymbolKeyword;
6657
6658 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6659 TSSymbolKeyword { span: CloneIn::clone_in(&self.span, allocator) }
6660 }
6661
6662 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6663 TSSymbolKeyword { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6664 }
6665}
6666
6667impl<'new_alloc> CloneIn<'new_alloc> for TSThisType {
6668 type Cloned = TSThisType;
6669
6670 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6671 TSThisType { span: CloneIn::clone_in(&self.span, allocator) }
6672 }
6673
6674 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6675 TSThisType { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6676 }
6677}
6678
6679impl<'new_alloc> CloneIn<'new_alloc> for TSObjectKeyword {
6680 type Cloned = TSObjectKeyword;
6681
6682 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6683 TSObjectKeyword { span: CloneIn::clone_in(&self.span, allocator) }
6684 }
6685
6686 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6687 TSObjectKeyword { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6688 }
6689}
6690
6691impl<'new_alloc> CloneIn<'new_alloc> for TSBigIntKeyword {
6692 type Cloned = TSBigIntKeyword;
6693
6694 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6695 TSBigIntKeyword { span: CloneIn::clone_in(&self.span, allocator) }
6696 }
6697
6698 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6699 TSBigIntKeyword { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
6700 }
6701}
6702
6703impl<'new_alloc> CloneIn<'new_alloc> for TSTypeReference<'_> {
6704 type Cloned = TSTypeReference<'new_alloc>;
6705
6706 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6707 TSTypeReference {
6708 span: CloneIn::clone_in(&self.span, allocator),
6709 type_name: CloneIn::clone_in(&self.type_name, allocator),
6710 type_arguments: CloneIn::clone_in(&self.type_arguments, allocator),
6711 }
6712 }
6713
6714 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6715 TSTypeReference {
6716 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6717 type_name: CloneIn::clone_in_with_semantic_ids(&self.type_name, allocator),
6718 type_arguments: CloneIn::clone_in_with_semantic_ids(&self.type_arguments, allocator),
6719 }
6720 }
6721}
6722
6723impl<'new_alloc> CloneIn<'new_alloc> for TSTypeName<'_> {
6724 type Cloned = TSTypeName<'new_alloc>;
6725
6726 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6727 match self {
6728 Self::IdentifierReference(it) => {
6729 TSTypeName::IdentifierReference(CloneIn::clone_in(it, allocator))
6730 }
6731 Self::QualifiedName(it) => TSTypeName::QualifiedName(CloneIn::clone_in(it, allocator)),
6732 Self::ThisExpression(it) => {
6733 TSTypeName::ThisExpression(CloneIn::clone_in(it, allocator))
6734 }
6735 }
6736 }
6737
6738 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6739 match self {
6740 Self::IdentifierReference(it) => {
6741 TSTypeName::IdentifierReference(CloneIn::clone_in_with_semantic_ids(it, allocator))
6742 }
6743 Self::QualifiedName(it) => {
6744 TSTypeName::QualifiedName(CloneIn::clone_in_with_semantic_ids(it, allocator))
6745 }
6746 Self::ThisExpression(it) => {
6747 TSTypeName::ThisExpression(CloneIn::clone_in_with_semantic_ids(it, allocator))
6748 }
6749 }
6750 }
6751}
6752
6753impl<'new_alloc> CloneIn<'new_alloc> for TSQualifiedName<'_> {
6754 type Cloned = TSQualifiedName<'new_alloc>;
6755
6756 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6757 TSQualifiedName {
6758 span: CloneIn::clone_in(&self.span, allocator),
6759 left: CloneIn::clone_in(&self.left, allocator),
6760 right: CloneIn::clone_in(&self.right, allocator),
6761 }
6762 }
6763
6764 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6765 TSQualifiedName {
6766 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6767 left: CloneIn::clone_in_with_semantic_ids(&self.left, allocator),
6768 right: CloneIn::clone_in_with_semantic_ids(&self.right, allocator),
6769 }
6770 }
6771}
6772
6773impl<'new_alloc> CloneIn<'new_alloc> for TSTypeParameterInstantiation<'_> {
6774 type Cloned = TSTypeParameterInstantiation<'new_alloc>;
6775
6776 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6777 TSTypeParameterInstantiation {
6778 span: CloneIn::clone_in(&self.span, allocator),
6779 params: CloneIn::clone_in(&self.params, allocator),
6780 }
6781 }
6782
6783 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6784 TSTypeParameterInstantiation {
6785 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6786 params: CloneIn::clone_in_with_semantic_ids(&self.params, allocator),
6787 }
6788 }
6789}
6790
6791impl<'new_alloc> CloneIn<'new_alloc> for TSTypeParameter<'_> {
6792 type Cloned = TSTypeParameter<'new_alloc>;
6793
6794 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6795 TSTypeParameter {
6796 span: CloneIn::clone_in(&self.span, allocator),
6797 name: CloneIn::clone_in(&self.name, allocator),
6798 constraint: CloneIn::clone_in(&self.constraint, allocator),
6799 default: CloneIn::clone_in(&self.default, allocator),
6800 r#in: CloneIn::clone_in(&self.r#in, allocator),
6801 out: CloneIn::clone_in(&self.out, allocator),
6802 r#const: CloneIn::clone_in(&self.r#const, allocator),
6803 }
6804 }
6805
6806 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6807 TSTypeParameter {
6808 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6809 name: CloneIn::clone_in_with_semantic_ids(&self.name, allocator),
6810 constraint: CloneIn::clone_in_with_semantic_ids(&self.constraint, allocator),
6811 default: CloneIn::clone_in_with_semantic_ids(&self.default, allocator),
6812 r#in: CloneIn::clone_in_with_semantic_ids(&self.r#in, allocator),
6813 out: CloneIn::clone_in_with_semantic_ids(&self.out, allocator),
6814 r#const: CloneIn::clone_in_with_semantic_ids(&self.r#const, allocator),
6815 }
6816 }
6817}
6818
6819impl<'new_alloc> CloneIn<'new_alloc> for TSTypeParameterDeclaration<'_> {
6820 type Cloned = TSTypeParameterDeclaration<'new_alloc>;
6821
6822 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6823 TSTypeParameterDeclaration {
6824 span: CloneIn::clone_in(&self.span, allocator),
6825 params: CloneIn::clone_in(&self.params, allocator),
6826 }
6827 }
6828
6829 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6830 TSTypeParameterDeclaration {
6831 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6832 params: CloneIn::clone_in_with_semantic_ids(&self.params, allocator),
6833 }
6834 }
6835}
6836
6837impl<'new_alloc> CloneIn<'new_alloc> for TSTypeAliasDeclaration<'_> {
6838 type Cloned = TSTypeAliasDeclaration<'new_alloc>;
6839
6840 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6841 TSTypeAliasDeclaration {
6842 span: CloneIn::clone_in(&self.span, allocator),
6843 id: CloneIn::clone_in(&self.id, allocator),
6844 type_parameters: CloneIn::clone_in(&self.type_parameters, allocator),
6845 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
6846 declare: CloneIn::clone_in(&self.declare, allocator),
6847 scope_id: Default::default(),
6848 }
6849 }
6850
6851 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6852 TSTypeAliasDeclaration {
6853 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6854 id: CloneIn::clone_in_with_semantic_ids(&self.id, allocator),
6855 type_parameters: CloneIn::clone_in_with_semantic_ids(&self.type_parameters, allocator),
6856 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
6857 declare: CloneIn::clone_in_with_semantic_ids(&self.declare, allocator),
6858 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
6859 }
6860 }
6861}
6862
6863impl<'new_alloc> CloneIn<'new_alloc> for TSAccessibility {
6864 type Cloned = TSAccessibility;
6865
6866 #[inline(always)]
6867 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6868 *self
6869 }
6870
6871 #[inline(always)]
6872 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6873 *self
6874 }
6875}
6876
6877impl<'new_alloc> CloneIn<'new_alloc> for TSClassImplements<'_> {
6878 type Cloned = TSClassImplements<'new_alloc>;
6879
6880 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6881 TSClassImplements {
6882 span: CloneIn::clone_in(&self.span, allocator),
6883 expression: CloneIn::clone_in(&self.expression, allocator),
6884 type_arguments: CloneIn::clone_in(&self.type_arguments, allocator),
6885 }
6886 }
6887
6888 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6889 TSClassImplements {
6890 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6891 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
6892 type_arguments: CloneIn::clone_in_with_semantic_ids(&self.type_arguments, allocator),
6893 }
6894 }
6895}
6896
6897impl<'new_alloc> CloneIn<'new_alloc> for TSInterfaceDeclaration<'_> {
6898 type Cloned = TSInterfaceDeclaration<'new_alloc>;
6899
6900 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6901 TSInterfaceDeclaration {
6902 span: CloneIn::clone_in(&self.span, allocator),
6903 id: CloneIn::clone_in(&self.id, allocator),
6904 type_parameters: CloneIn::clone_in(&self.type_parameters, allocator),
6905 extends: CloneIn::clone_in(&self.extends, allocator),
6906 body: CloneIn::clone_in(&self.body, allocator),
6907 declare: CloneIn::clone_in(&self.declare, allocator),
6908 scope_id: Default::default(),
6909 }
6910 }
6911
6912 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6913 TSInterfaceDeclaration {
6914 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6915 id: CloneIn::clone_in_with_semantic_ids(&self.id, allocator),
6916 type_parameters: CloneIn::clone_in_with_semantic_ids(&self.type_parameters, allocator),
6917 extends: CloneIn::clone_in_with_semantic_ids(&self.extends, allocator),
6918 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
6919 declare: CloneIn::clone_in_with_semantic_ids(&self.declare, allocator),
6920 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
6921 }
6922 }
6923}
6924
6925impl<'new_alloc> CloneIn<'new_alloc> for TSInterfaceBody<'_> {
6926 type Cloned = TSInterfaceBody<'new_alloc>;
6927
6928 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6929 TSInterfaceBody {
6930 span: CloneIn::clone_in(&self.span, allocator),
6931 body: CloneIn::clone_in(&self.body, allocator),
6932 }
6933 }
6934
6935 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6936 TSInterfaceBody {
6937 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6938 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
6939 }
6940 }
6941}
6942
6943impl<'new_alloc> CloneIn<'new_alloc> for TSPropertySignature<'_> {
6944 type Cloned = TSPropertySignature<'new_alloc>;
6945
6946 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6947 TSPropertySignature {
6948 span: CloneIn::clone_in(&self.span, allocator),
6949 computed: CloneIn::clone_in(&self.computed, allocator),
6950 optional: CloneIn::clone_in(&self.optional, allocator),
6951 readonly: CloneIn::clone_in(&self.readonly, allocator),
6952 key: CloneIn::clone_in(&self.key, allocator),
6953 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
6954 }
6955 }
6956
6957 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6958 TSPropertySignature {
6959 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
6960 computed: CloneIn::clone_in_with_semantic_ids(&self.computed, allocator),
6961 optional: CloneIn::clone_in_with_semantic_ids(&self.optional, allocator),
6962 readonly: CloneIn::clone_in_with_semantic_ids(&self.readonly, allocator),
6963 key: CloneIn::clone_in_with_semantic_ids(&self.key, allocator),
6964 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
6965 }
6966 }
6967}
6968
6969impl<'new_alloc> CloneIn<'new_alloc> for TSSignature<'_> {
6970 type Cloned = TSSignature<'new_alloc>;
6971
6972 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6973 match self {
6974 Self::TSIndexSignature(it) => {
6975 TSSignature::TSIndexSignature(CloneIn::clone_in(it, allocator))
6976 }
6977 Self::TSPropertySignature(it) => {
6978 TSSignature::TSPropertySignature(CloneIn::clone_in(it, allocator))
6979 }
6980 Self::TSCallSignatureDeclaration(it) => {
6981 TSSignature::TSCallSignatureDeclaration(CloneIn::clone_in(it, allocator))
6982 }
6983 Self::TSConstructSignatureDeclaration(it) => {
6984 TSSignature::TSConstructSignatureDeclaration(CloneIn::clone_in(it, allocator))
6985 }
6986 Self::TSMethodSignature(it) => {
6987 TSSignature::TSMethodSignature(CloneIn::clone_in(it, allocator))
6988 }
6989 }
6990 }
6991
6992 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
6993 match self {
6994 Self::TSIndexSignature(it) => {
6995 TSSignature::TSIndexSignature(CloneIn::clone_in_with_semantic_ids(it, allocator))
6996 }
6997 Self::TSPropertySignature(it) => {
6998 TSSignature::TSPropertySignature(CloneIn::clone_in_with_semantic_ids(it, allocator))
6999 }
7000 Self::TSCallSignatureDeclaration(it) => TSSignature::TSCallSignatureDeclaration(
7001 CloneIn::clone_in_with_semantic_ids(it, allocator),
7002 ),
7003 Self::TSConstructSignatureDeclaration(it) => {
7004 TSSignature::TSConstructSignatureDeclaration(CloneIn::clone_in_with_semantic_ids(
7005 it, allocator,
7006 ))
7007 }
7008 Self::TSMethodSignature(it) => {
7009 TSSignature::TSMethodSignature(CloneIn::clone_in_with_semantic_ids(it, allocator))
7010 }
7011 }
7012 }
7013}
7014
7015impl<'new_alloc> CloneIn<'new_alloc> for TSIndexSignature<'_> {
7016 type Cloned = TSIndexSignature<'new_alloc>;
7017
7018 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7019 TSIndexSignature {
7020 span: CloneIn::clone_in(&self.span, allocator),
7021 parameters: CloneIn::clone_in(&self.parameters, allocator),
7022 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
7023 readonly: CloneIn::clone_in(&self.readonly, allocator),
7024 r#static: CloneIn::clone_in(&self.r#static, allocator),
7025 }
7026 }
7027
7028 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7029 TSIndexSignature {
7030 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7031 parameters: CloneIn::clone_in_with_semantic_ids(&self.parameters, allocator),
7032 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
7033 readonly: CloneIn::clone_in_with_semantic_ids(&self.readonly, allocator),
7034 r#static: CloneIn::clone_in_with_semantic_ids(&self.r#static, allocator),
7035 }
7036 }
7037}
7038
7039impl<'new_alloc> CloneIn<'new_alloc> for TSCallSignatureDeclaration<'_> {
7040 type Cloned = TSCallSignatureDeclaration<'new_alloc>;
7041
7042 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7043 TSCallSignatureDeclaration {
7044 span: CloneIn::clone_in(&self.span, allocator),
7045 type_parameters: CloneIn::clone_in(&self.type_parameters, allocator),
7046 this_param: CloneIn::clone_in(&self.this_param, allocator),
7047 params: CloneIn::clone_in(&self.params, allocator),
7048 return_type: CloneIn::clone_in(&self.return_type, allocator),
7049 scope_id: Default::default(),
7050 }
7051 }
7052
7053 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7054 TSCallSignatureDeclaration {
7055 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7056 type_parameters: CloneIn::clone_in_with_semantic_ids(&self.type_parameters, allocator),
7057 this_param: CloneIn::clone_in_with_semantic_ids(&self.this_param, allocator),
7058 params: CloneIn::clone_in_with_semantic_ids(&self.params, allocator),
7059 return_type: CloneIn::clone_in_with_semantic_ids(&self.return_type, allocator),
7060 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
7061 }
7062 }
7063}
7064
7065impl<'new_alloc> CloneIn<'new_alloc> for TSMethodSignatureKind {
7066 type Cloned = TSMethodSignatureKind;
7067
7068 #[inline(always)]
7069 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7070 *self
7071 }
7072
7073 #[inline(always)]
7074 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7075 *self
7076 }
7077}
7078
7079impl<'new_alloc> CloneIn<'new_alloc> for TSMethodSignature<'_> {
7080 type Cloned = TSMethodSignature<'new_alloc>;
7081
7082 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7083 TSMethodSignature {
7084 span: CloneIn::clone_in(&self.span, allocator),
7085 key: CloneIn::clone_in(&self.key, allocator),
7086 computed: CloneIn::clone_in(&self.computed, allocator),
7087 optional: CloneIn::clone_in(&self.optional, allocator),
7088 kind: CloneIn::clone_in(&self.kind, allocator),
7089 type_parameters: CloneIn::clone_in(&self.type_parameters, allocator),
7090 this_param: CloneIn::clone_in(&self.this_param, allocator),
7091 params: CloneIn::clone_in(&self.params, allocator),
7092 return_type: CloneIn::clone_in(&self.return_type, allocator),
7093 scope_id: Default::default(),
7094 }
7095 }
7096
7097 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7098 TSMethodSignature {
7099 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7100 key: CloneIn::clone_in_with_semantic_ids(&self.key, allocator),
7101 computed: CloneIn::clone_in_with_semantic_ids(&self.computed, allocator),
7102 optional: CloneIn::clone_in_with_semantic_ids(&self.optional, allocator),
7103 kind: CloneIn::clone_in_with_semantic_ids(&self.kind, allocator),
7104 type_parameters: CloneIn::clone_in_with_semantic_ids(&self.type_parameters, allocator),
7105 this_param: CloneIn::clone_in_with_semantic_ids(&self.this_param, allocator),
7106 params: CloneIn::clone_in_with_semantic_ids(&self.params, allocator),
7107 return_type: CloneIn::clone_in_with_semantic_ids(&self.return_type, allocator),
7108 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
7109 }
7110 }
7111}
7112
7113impl<'new_alloc> CloneIn<'new_alloc> for TSConstructSignatureDeclaration<'_> {
7114 type Cloned = TSConstructSignatureDeclaration<'new_alloc>;
7115
7116 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7117 TSConstructSignatureDeclaration {
7118 span: CloneIn::clone_in(&self.span, allocator),
7119 type_parameters: CloneIn::clone_in(&self.type_parameters, allocator),
7120 params: CloneIn::clone_in(&self.params, allocator),
7121 return_type: CloneIn::clone_in(&self.return_type, allocator),
7122 scope_id: Default::default(),
7123 }
7124 }
7125
7126 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7127 TSConstructSignatureDeclaration {
7128 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7129 type_parameters: CloneIn::clone_in_with_semantic_ids(&self.type_parameters, allocator),
7130 params: CloneIn::clone_in_with_semantic_ids(&self.params, allocator),
7131 return_type: CloneIn::clone_in_with_semantic_ids(&self.return_type, allocator),
7132 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
7133 }
7134 }
7135}
7136
7137impl<'new_alloc> CloneIn<'new_alloc> for TSIndexSignatureName<'_> {
7138 type Cloned = TSIndexSignatureName<'new_alloc>;
7139
7140 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7141 TSIndexSignatureName {
7142 span: CloneIn::clone_in(&self.span, allocator),
7143 name: CloneIn::clone_in(&self.name, allocator),
7144 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
7145 }
7146 }
7147
7148 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7149 TSIndexSignatureName {
7150 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7151 name: CloneIn::clone_in_with_semantic_ids(&self.name, allocator),
7152 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
7153 }
7154 }
7155}
7156
7157impl<'new_alloc> CloneIn<'new_alloc> for TSInterfaceHeritage<'_> {
7158 type Cloned = TSInterfaceHeritage<'new_alloc>;
7159
7160 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7161 TSInterfaceHeritage {
7162 span: CloneIn::clone_in(&self.span, allocator),
7163 expression: CloneIn::clone_in(&self.expression, allocator),
7164 type_arguments: CloneIn::clone_in(&self.type_arguments, allocator),
7165 }
7166 }
7167
7168 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7169 TSInterfaceHeritage {
7170 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7171 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
7172 type_arguments: CloneIn::clone_in_with_semantic_ids(&self.type_arguments, allocator),
7173 }
7174 }
7175}
7176
7177impl<'new_alloc> CloneIn<'new_alloc> for TSTypePredicate<'_> {
7178 type Cloned = TSTypePredicate<'new_alloc>;
7179
7180 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7181 TSTypePredicate {
7182 span: CloneIn::clone_in(&self.span, allocator),
7183 parameter_name: CloneIn::clone_in(&self.parameter_name, allocator),
7184 asserts: CloneIn::clone_in(&self.asserts, allocator),
7185 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
7186 }
7187 }
7188
7189 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7190 TSTypePredicate {
7191 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7192 parameter_name: CloneIn::clone_in_with_semantic_ids(&self.parameter_name, allocator),
7193 asserts: CloneIn::clone_in_with_semantic_ids(&self.asserts, allocator),
7194 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
7195 }
7196 }
7197}
7198
7199impl<'new_alloc> CloneIn<'new_alloc> for TSTypePredicateName<'_> {
7200 type Cloned = TSTypePredicateName<'new_alloc>;
7201
7202 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7203 match self {
7204 Self::Identifier(it) => {
7205 TSTypePredicateName::Identifier(CloneIn::clone_in(it, allocator))
7206 }
7207 Self::This(it) => TSTypePredicateName::This(CloneIn::clone_in(it, allocator)),
7208 }
7209 }
7210
7211 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7212 match self {
7213 Self::Identifier(it) => {
7214 TSTypePredicateName::Identifier(CloneIn::clone_in_with_semantic_ids(it, allocator))
7215 }
7216 Self::This(it) => {
7217 TSTypePredicateName::This(CloneIn::clone_in_with_semantic_ids(it, allocator))
7218 }
7219 }
7220 }
7221}
7222
7223impl<'new_alloc> CloneIn<'new_alloc> for TSModuleDeclaration<'_> {
7224 type Cloned = TSModuleDeclaration<'new_alloc>;
7225
7226 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7227 TSModuleDeclaration {
7228 span: CloneIn::clone_in(&self.span, allocator),
7229 id: CloneIn::clone_in(&self.id, allocator),
7230 body: CloneIn::clone_in(&self.body, allocator),
7231 kind: CloneIn::clone_in(&self.kind, allocator),
7232 declare: CloneIn::clone_in(&self.declare, allocator),
7233 scope_id: Default::default(),
7234 }
7235 }
7236
7237 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7238 TSModuleDeclaration {
7239 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7240 id: CloneIn::clone_in_with_semantic_ids(&self.id, allocator),
7241 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
7242 kind: CloneIn::clone_in_with_semantic_ids(&self.kind, allocator),
7243 declare: CloneIn::clone_in_with_semantic_ids(&self.declare, allocator),
7244 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
7245 }
7246 }
7247}
7248
7249impl<'new_alloc> CloneIn<'new_alloc> for TSModuleDeclarationKind {
7250 type Cloned = TSModuleDeclarationKind;
7251
7252 #[inline(always)]
7253 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7254 *self
7255 }
7256
7257 #[inline(always)]
7258 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7259 *self
7260 }
7261}
7262
7263impl<'new_alloc> CloneIn<'new_alloc> for TSModuleDeclarationName<'_> {
7264 type Cloned = TSModuleDeclarationName<'new_alloc>;
7265
7266 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7267 match self {
7268 Self::Identifier(it) => {
7269 TSModuleDeclarationName::Identifier(CloneIn::clone_in(it, allocator))
7270 }
7271 Self::StringLiteral(it) => {
7272 TSModuleDeclarationName::StringLiteral(CloneIn::clone_in(it, allocator))
7273 }
7274 }
7275 }
7276
7277 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7278 match self {
7279 Self::Identifier(it) => TSModuleDeclarationName::Identifier(
7280 CloneIn::clone_in_with_semantic_ids(it, allocator),
7281 ),
7282 Self::StringLiteral(it) => TSModuleDeclarationName::StringLiteral(
7283 CloneIn::clone_in_with_semantic_ids(it, allocator),
7284 ),
7285 }
7286 }
7287}
7288
7289impl<'new_alloc> CloneIn<'new_alloc> for TSModuleDeclarationBody<'_> {
7290 type Cloned = TSModuleDeclarationBody<'new_alloc>;
7291
7292 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7293 match self {
7294 Self::TSModuleDeclaration(it) => {
7295 TSModuleDeclarationBody::TSModuleDeclaration(CloneIn::clone_in(it, allocator))
7296 }
7297 Self::TSModuleBlock(it) => {
7298 TSModuleDeclarationBody::TSModuleBlock(CloneIn::clone_in(it, allocator))
7299 }
7300 }
7301 }
7302
7303 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7304 match self {
7305 Self::TSModuleDeclaration(it) => TSModuleDeclarationBody::TSModuleDeclaration(
7306 CloneIn::clone_in_with_semantic_ids(it, allocator),
7307 ),
7308 Self::TSModuleBlock(it) => TSModuleDeclarationBody::TSModuleBlock(
7309 CloneIn::clone_in_with_semantic_ids(it, allocator),
7310 ),
7311 }
7312 }
7313}
7314
7315impl<'new_alloc> CloneIn<'new_alloc> for TSModuleBlock<'_> {
7316 type Cloned = TSModuleBlock<'new_alloc>;
7317
7318 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7319 TSModuleBlock {
7320 span: CloneIn::clone_in(&self.span, allocator),
7321 directives: CloneIn::clone_in(&self.directives, allocator),
7322 body: CloneIn::clone_in(&self.body, allocator),
7323 }
7324 }
7325
7326 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7327 TSModuleBlock {
7328 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7329 directives: CloneIn::clone_in_with_semantic_ids(&self.directives, allocator),
7330 body: CloneIn::clone_in_with_semantic_ids(&self.body, allocator),
7331 }
7332 }
7333}
7334
7335impl<'new_alloc> CloneIn<'new_alloc> for TSTypeLiteral<'_> {
7336 type Cloned = TSTypeLiteral<'new_alloc>;
7337
7338 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7339 TSTypeLiteral {
7340 span: CloneIn::clone_in(&self.span, allocator),
7341 members: CloneIn::clone_in(&self.members, allocator),
7342 }
7343 }
7344
7345 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7346 TSTypeLiteral {
7347 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7348 members: CloneIn::clone_in_with_semantic_ids(&self.members, allocator),
7349 }
7350 }
7351}
7352
7353impl<'new_alloc> CloneIn<'new_alloc> for TSInferType<'_> {
7354 type Cloned = TSInferType<'new_alloc>;
7355
7356 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7357 TSInferType {
7358 span: CloneIn::clone_in(&self.span, allocator),
7359 type_parameter: CloneIn::clone_in(&self.type_parameter, allocator),
7360 }
7361 }
7362
7363 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7364 TSInferType {
7365 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7366 type_parameter: CloneIn::clone_in_with_semantic_ids(&self.type_parameter, allocator),
7367 }
7368 }
7369}
7370
7371impl<'new_alloc> CloneIn<'new_alloc> for TSTypeQuery<'_> {
7372 type Cloned = TSTypeQuery<'new_alloc>;
7373
7374 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7375 TSTypeQuery {
7376 span: CloneIn::clone_in(&self.span, allocator),
7377 expr_name: CloneIn::clone_in(&self.expr_name, allocator),
7378 type_arguments: CloneIn::clone_in(&self.type_arguments, allocator),
7379 }
7380 }
7381
7382 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7383 TSTypeQuery {
7384 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7385 expr_name: CloneIn::clone_in_with_semantic_ids(&self.expr_name, allocator),
7386 type_arguments: CloneIn::clone_in_with_semantic_ids(&self.type_arguments, allocator),
7387 }
7388 }
7389}
7390
7391impl<'new_alloc> CloneIn<'new_alloc> for TSTypeQueryExprName<'_> {
7392 type Cloned = TSTypeQueryExprName<'new_alloc>;
7393
7394 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7395 match self {
7396 Self::TSImportType(it) => {
7397 TSTypeQueryExprName::TSImportType(CloneIn::clone_in(it, allocator))
7398 }
7399 Self::IdentifierReference(it) => {
7400 TSTypeQueryExprName::IdentifierReference(CloneIn::clone_in(it, allocator))
7401 }
7402 Self::QualifiedName(it) => {
7403 TSTypeQueryExprName::QualifiedName(CloneIn::clone_in(it, allocator))
7404 }
7405 Self::ThisExpression(it) => {
7406 TSTypeQueryExprName::ThisExpression(CloneIn::clone_in(it, allocator))
7407 }
7408 }
7409 }
7410
7411 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7412 match self {
7413 Self::TSImportType(it) => TSTypeQueryExprName::TSImportType(
7414 CloneIn::clone_in_with_semantic_ids(it, allocator),
7415 ),
7416 Self::IdentifierReference(it) => TSTypeQueryExprName::IdentifierReference(
7417 CloneIn::clone_in_with_semantic_ids(it, allocator),
7418 ),
7419 Self::QualifiedName(it) => TSTypeQueryExprName::QualifiedName(
7420 CloneIn::clone_in_with_semantic_ids(it, allocator),
7421 ),
7422 Self::ThisExpression(it) => TSTypeQueryExprName::ThisExpression(
7423 CloneIn::clone_in_with_semantic_ids(it, allocator),
7424 ),
7425 }
7426 }
7427}
7428
7429impl<'new_alloc> CloneIn<'new_alloc> for TSImportType<'_> {
7430 type Cloned = TSImportType<'new_alloc>;
7431
7432 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7433 TSImportType {
7434 span: CloneIn::clone_in(&self.span, allocator),
7435 argument: CloneIn::clone_in(&self.argument, allocator),
7436 options: CloneIn::clone_in(&self.options, allocator),
7437 qualifier: CloneIn::clone_in(&self.qualifier, allocator),
7438 type_arguments: CloneIn::clone_in(&self.type_arguments, allocator),
7439 }
7440 }
7441
7442 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7443 TSImportType {
7444 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7445 argument: CloneIn::clone_in_with_semantic_ids(&self.argument, allocator),
7446 options: CloneIn::clone_in_with_semantic_ids(&self.options, allocator),
7447 qualifier: CloneIn::clone_in_with_semantic_ids(&self.qualifier, allocator),
7448 type_arguments: CloneIn::clone_in_with_semantic_ids(&self.type_arguments, allocator),
7449 }
7450 }
7451}
7452
7453impl<'new_alloc> CloneIn<'new_alloc> for TSImportTypeQualifier<'_> {
7454 type Cloned = TSImportTypeQualifier<'new_alloc>;
7455
7456 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7457 match self {
7458 Self::Identifier(it) => {
7459 TSImportTypeQualifier::Identifier(CloneIn::clone_in(it, allocator))
7460 }
7461 Self::QualifiedName(it) => {
7462 TSImportTypeQualifier::QualifiedName(CloneIn::clone_in(it, allocator))
7463 }
7464 }
7465 }
7466
7467 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7468 match self {
7469 Self::Identifier(it) => TSImportTypeQualifier::Identifier(
7470 CloneIn::clone_in_with_semantic_ids(it, allocator),
7471 ),
7472 Self::QualifiedName(it) => TSImportTypeQualifier::QualifiedName(
7473 CloneIn::clone_in_with_semantic_ids(it, allocator),
7474 ),
7475 }
7476 }
7477}
7478
7479impl<'new_alloc> CloneIn<'new_alloc> for TSImportTypeQualifiedName<'_> {
7480 type Cloned = TSImportTypeQualifiedName<'new_alloc>;
7481
7482 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7483 TSImportTypeQualifiedName {
7484 span: CloneIn::clone_in(&self.span, allocator),
7485 left: CloneIn::clone_in(&self.left, allocator),
7486 right: CloneIn::clone_in(&self.right, allocator),
7487 }
7488 }
7489
7490 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7491 TSImportTypeQualifiedName {
7492 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7493 left: CloneIn::clone_in_with_semantic_ids(&self.left, allocator),
7494 right: CloneIn::clone_in_with_semantic_ids(&self.right, allocator),
7495 }
7496 }
7497}
7498
7499impl<'new_alloc> CloneIn<'new_alloc> for TSFunctionType<'_> {
7500 type Cloned = TSFunctionType<'new_alloc>;
7501
7502 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7503 TSFunctionType {
7504 span: CloneIn::clone_in(&self.span, allocator),
7505 type_parameters: CloneIn::clone_in(&self.type_parameters, allocator),
7506 this_param: CloneIn::clone_in(&self.this_param, allocator),
7507 params: CloneIn::clone_in(&self.params, allocator),
7508 return_type: CloneIn::clone_in(&self.return_type, allocator),
7509 scope_id: Default::default(),
7510 }
7511 }
7512
7513 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7514 TSFunctionType {
7515 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7516 type_parameters: CloneIn::clone_in_with_semantic_ids(&self.type_parameters, allocator),
7517 this_param: CloneIn::clone_in_with_semantic_ids(&self.this_param, allocator),
7518 params: CloneIn::clone_in_with_semantic_ids(&self.params, allocator),
7519 return_type: CloneIn::clone_in_with_semantic_ids(&self.return_type, allocator),
7520 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
7521 }
7522 }
7523}
7524
7525impl<'new_alloc> CloneIn<'new_alloc> for TSConstructorType<'_> {
7526 type Cloned = TSConstructorType<'new_alloc>;
7527
7528 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7529 TSConstructorType {
7530 span: CloneIn::clone_in(&self.span, allocator),
7531 r#abstract: CloneIn::clone_in(&self.r#abstract, allocator),
7532 type_parameters: CloneIn::clone_in(&self.type_parameters, allocator),
7533 params: CloneIn::clone_in(&self.params, allocator),
7534 return_type: CloneIn::clone_in(&self.return_type, allocator),
7535 scope_id: Default::default(),
7536 }
7537 }
7538
7539 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7540 TSConstructorType {
7541 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7542 r#abstract: CloneIn::clone_in_with_semantic_ids(&self.r#abstract, allocator),
7543 type_parameters: CloneIn::clone_in_with_semantic_ids(&self.type_parameters, allocator),
7544 params: CloneIn::clone_in_with_semantic_ids(&self.params, allocator),
7545 return_type: CloneIn::clone_in_with_semantic_ids(&self.return_type, allocator),
7546 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
7547 }
7548 }
7549}
7550
7551impl<'new_alloc> CloneIn<'new_alloc> for TSMappedType<'_> {
7552 type Cloned = TSMappedType<'new_alloc>;
7553
7554 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7555 TSMappedType {
7556 span: CloneIn::clone_in(&self.span, allocator),
7557 type_parameter: CloneIn::clone_in(&self.type_parameter, allocator),
7558 name_type: CloneIn::clone_in(&self.name_type, allocator),
7559 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
7560 optional: CloneIn::clone_in(&self.optional, allocator),
7561 readonly: CloneIn::clone_in(&self.readonly, allocator),
7562 scope_id: Default::default(),
7563 }
7564 }
7565
7566 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7567 TSMappedType {
7568 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7569 type_parameter: CloneIn::clone_in_with_semantic_ids(&self.type_parameter, allocator),
7570 name_type: CloneIn::clone_in_with_semantic_ids(&self.name_type, allocator),
7571 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
7572 optional: CloneIn::clone_in_with_semantic_ids(&self.optional, allocator),
7573 readonly: CloneIn::clone_in_with_semantic_ids(&self.readonly, allocator),
7574 scope_id: CloneIn::clone_in_with_semantic_ids(&self.scope_id, allocator),
7575 }
7576 }
7577}
7578
7579impl<'new_alloc> CloneIn<'new_alloc> for TSMappedTypeModifierOperator {
7580 type Cloned = TSMappedTypeModifierOperator;
7581
7582 #[inline(always)]
7583 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7584 *self
7585 }
7586
7587 #[inline(always)]
7588 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7589 *self
7590 }
7591}
7592
7593impl<'new_alloc> CloneIn<'new_alloc> for TSTemplateLiteralType<'_> {
7594 type Cloned = TSTemplateLiteralType<'new_alloc>;
7595
7596 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7597 TSTemplateLiteralType {
7598 span: CloneIn::clone_in(&self.span, allocator),
7599 quasis: CloneIn::clone_in(&self.quasis, allocator),
7600 types: CloneIn::clone_in(&self.types, allocator),
7601 }
7602 }
7603
7604 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7605 TSTemplateLiteralType {
7606 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7607 quasis: CloneIn::clone_in_with_semantic_ids(&self.quasis, allocator),
7608 types: CloneIn::clone_in_with_semantic_ids(&self.types, allocator),
7609 }
7610 }
7611}
7612
7613impl<'new_alloc> CloneIn<'new_alloc> for TSAsExpression<'_> {
7614 type Cloned = TSAsExpression<'new_alloc>;
7615
7616 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7617 TSAsExpression {
7618 span: CloneIn::clone_in(&self.span, allocator),
7619 expression: CloneIn::clone_in(&self.expression, allocator),
7620 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
7621 }
7622 }
7623
7624 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7625 TSAsExpression {
7626 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7627 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
7628 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
7629 }
7630 }
7631}
7632
7633impl<'new_alloc> CloneIn<'new_alloc> for TSSatisfiesExpression<'_> {
7634 type Cloned = TSSatisfiesExpression<'new_alloc>;
7635
7636 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7637 TSSatisfiesExpression {
7638 span: CloneIn::clone_in(&self.span, allocator),
7639 expression: CloneIn::clone_in(&self.expression, allocator),
7640 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
7641 }
7642 }
7643
7644 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7645 TSSatisfiesExpression {
7646 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7647 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
7648 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
7649 }
7650 }
7651}
7652
7653impl<'new_alloc> CloneIn<'new_alloc> for TSTypeAssertion<'_> {
7654 type Cloned = TSTypeAssertion<'new_alloc>;
7655
7656 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7657 TSTypeAssertion {
7658 span: CloneIn::clone_in(&self.span, allocator),
7659 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
7660 expression: CloneIn::clone_in(&self.expression, allocator),
7661 }
7662 }
7663
7664 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7665 TSTypeAssertion {
7666 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7667 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
7668 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
7669 }
7670 }
7671}
7672
7673impl<'new_alloc> CloneIn<'new_alloc> for TSImportEqualsDeclaration<'_> {
7674 type Cloned = TSImportEqualsDeclaration<'new_alloc>;
7675
7676 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7677 TSImportEqualsDeclaration {
7678 span: CloneIn::clone_in(&self.span, allocator),
7679 id: CloneIn::clone_in(&self.id, allocator),
7680 module_reference: CloneIn::clone_in(&self.module_reference, allocator),
7681 import_kind: CloneIn::clone_in(&self.import_kind, allocator),
7682 }
7683 }
7684
7685 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7686 TSImportEqualsDeclaration {
7687 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7688 id: CloneIn::clone_in_with_semantic_ids(&self.id, allocator),
7689 module_reference: CloneIn::clone_in_with_semantic_ids(
7690 &self.module_reference,
7691 allocator,
7692 ),
7693 import_kind: CloneIn::clone_in_with_semantic_ids(&self.import_kind, allocator),
7694 }
7695 }
7696}
7697
7698impl<'new_alloc> CloneIn<'new_alloc> for TSModuleReference<'_> {
7699 type Cloned = TSModuleReference<'new_alloc>;
7700
7701 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7702 match self {
7703 Self::ExternalModuleReference(it) => {
7704 TSModuleReference::ExternalModuleReference(CloneIn::clone_in(it, allocator))
7705 }
7706 Self::IdentifierReference(it) => {
7707 TSModuleReference::IdentifierReference(CloneIn::clone_in(it, allocator))
7708 }
7709 Self::QualifiedName(it) => {
7710 TSModuleReference::QualifiedName(CloneIn::clone_in(it, allocator))
7711 }
7712 Self::ThisExpression(it) => {
7713 TSModuleReference::ThisExpression(CloneIn::clone_in(it, allocator))
7714 }
7715 }
7716 }
7717
7718 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7719 match self {
7720 Self::ExternalModuleReference(it) => TSModuleReference::ExternalModuleReference(
7721 CloneIn::clone_in_with_semantic_ids(it, allocator),
7722 ),
7723 Self::IdentifierReference(it) => TSModuleReference::IdentifierReference(
7724 CloneIn::clone_in_with_semantic_ids(it, allocator),
7725 ),
7726 Self::QualifiedName(it) => {
7727 TSModuleReference::QualifiedName(CloneIn::clone_in_with_semantic_ids(it, allocator))
7728 }
7729 Self::ThisExpression(it) => TSModuleReference::ThisExpression(
7730 CloneIn::clone_in_with_semantic_ids(it, allocator),
7731 ),
7732 }
7733 }
7734}
7735
7736impl<'new_alloc> CloneIn<'new_alloc> for TSExternalModuleReference<'_> {
7737 type Cloned = TSExternalModuleReference<'new_alloc>;
7738
7739 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7740 TSExternalModuleReference {
7741 span: CloneIn::clone_in(&self.span, allocator),
7742 expression: CloneIn::clone_in(&self.expression, allocator),
7743 }
7744 }
7745
7746 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7747 TSExternalModuleReference {
7748 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7749 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
7750 }
7751 }
7752}
7753
7754impl<'new_alloc> CloneIn<'new_alloc> for TSNonNullExpression<'_> {
7755 type Cloned = TSNonNullExpression<'new_alloc>;
7756
7757 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7758 TSNonNullExpression {
7759 span: CloneIn::clone_in(&self.span, allocator),
7760 expression: CloneIn::clone_in(&self.expression, allocator),
7761 }
7762 }
7763
7764 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7765 TSNonNullExpression {
7766 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7767 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
7768 }
7769 }
7770}
7771
7772impl<'new_alloc> CloneIn<'new_alloc> for Decorator<'_> {
7773 type Cloned = Decorator<'new_alloc>;
7774
7775 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7776 Decorator {
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 Decorator {
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 TSExportAssignment<'_> {
7791 type Cloned = TSExportAssignment<'new_alloc>;
7792
7793 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7794 TSExportAssignment {
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 TSExportAssignment {
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 TSNamespaceExportDeclaration<'_> {
7809 type Cloned = TSNamespaceExportDeclaration<'new_alloc>;
7810
7811 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7812 TSNamespaceExportDeclaration {
7813 span: CloneIn::clone_in(&self.span, allocator),
7814 id: CloneIn::clone_in(&self.id, allocator),
7815 }
7816 }
7817
7818 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7819 TSNamespaceExportDeclaration {
7820 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7821 id: CloneIn::clone_in_with_semantic_ids(&self.id, allocator),
7822 }
7823 }
7824}
7825
7826impl<'new_alloc> CloneIn<'new_alloc> for TSInstantiationExpression<'_> {
7827 type Cloned = TSInstantiationExpression<'new_alloc>;
7828
7829 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7830 TSInstantiationExpression {
7831 span: CloneIn::clone_in(&self.span, allocator),
7832 expression: CloneIn::clone_in(&self.expression, allocator),
7833 type_arguments: CloneIn::clone_in(&self.type_arguments, allocator),
7834 }
7835 }
7836
7837 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7838 TSInstantiationExpression {
7839 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7840 expression: CloneIn::clone_in_with_semantic_ids(&self.expression, allocator),
7841 type_arguments: CloneIn::clone_in_with_semantic_ids(&self.type_arguments, allocator),
7842 }
7843 }
7844}
7845
7846impl<'new_alloc> CloneIn<'new_alloc> for ImportOrExportKind {
7847 type Cloned = ImportOrExportKind;
7848
7849 #[inline(always)]
7850 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7851 *self
7852 }
7853
7854 #[inline(always)]
7855 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7856 *self
7857 }
7858}
7859
7860impl<'new_alloc> CloneIn<'new_alloc> for JSDocNullableType<'_> {
7861 type Cloned = JSDocNullableType<'new_alloc>;
7862
7863 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7864 JSDocNullableType {
7865 span: CloneIn::clone_in(&self.span, allocator),
7866 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
7867 postfix: CloneIn::clone_in(&self.postfix, allocator),
7868 }
7869 }
7870
7871 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7872 JSDocNullableType {
7873 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7874 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
7875 postfix: CloneIn::clone_in_with_semantic_ids(&self.postfix, allocator),
7876 }
7877 }
7878}
7879
7880impl<'new_alloc> CloneIn<'new_alloc> for JSDocNonNullableType<'_> {
7881 type Cloned = JSDocNonNullableType<'new_alloc>;
7882
7883 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7884 JSDocNonNullableType {
7885 span: CloneIn::clone_in(&self.span, allocator),
7886 type_annotation: CloneIn::clone_in(&self.type_annotation, allocator),
7887 postfix: CloneIn::clone_in(&self.postfix, allocator),
7888 }
7889 }
7890
7891 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7892 JSDocNonNullableType {
7893 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7894 type_annotation: CloneIn::clone_in_with_semantic_ids(&self.type_annotation, allocator),
7895 postfix: CloneIn::clone_in_with_semantic_ids(&self.postfix, allocator),
7896 }
7897 }
7898}
7899
7900impl<'new_alloc> CloneIn<'new_alloc> for JSDocUnknownType {
7901 type Cloned = JSDocUnknownType;
7902
7903 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7904 JSDocUnknownType { span: CloneIn::clone_in(&self.span, allocator) }
7905 }
7906
7907 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7908 JSDocUnknownType { span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator) }
7909 }
7910}
7911
7912impl<'new_alloc> CloneIn<'new_alloc> for CommentKind {
7913 type Cloned = CommentKind;
7914
7915 #[inline(always)]
7916 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7917 *self
7918 }
7919
7920 #[inline(always)]
7921 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7922 *self
7923 }
7924}
7925
7926impl<'new_alloc> CloneIn<'new_alloc> for CommentPosition {
7927 type Cloned = CommentPosition;
7928
7929 #[inline(always)]
7930 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7931 *self
7932 }
7933
7934 #[inline(always)]
7935 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7936 *self
7937 }
7938}
7939
7940impl<'new_alloc> CloneIn<'new_alloc> for CommentContent {
7941 type Cloned = CommentContent;
7942
7943 #[inline(always)]
7944 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7945 *self
7946 }
7947
7948 #[inline(always)]
7949 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7950 *self
7951 }
7952}
7953
7954impl<'new_alloc> CloneIn<'new_alloc> for Comment {
7955 type Cloned = Comment;
7956
7957 fn clone_in(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7958 Comment {
7959 span: CloneIn::clone_in(&self.span, allocator),
7960 attached_to: CloneIn::clone_in(&self.attached_to, allocator),
7961 kind: CloneIn::clone_in(&self.kind, allocator),
7962 position: CloneIn::clone_in(&self.position, allocator),
7963 newlines: CloneIn::clone_in(&self.newlines, allocator),
7964 content: CloneIn::clone_in(&self.content, allocator),
7965 }
7966 }
7967
7968 fn clone_in_with_semantic_ids(&self, allocator: &'new_alloc Allocator) -> Self::Cloned {
7969 Comment {
7970 span: CloneIn::clone_in_with_semantic_ids(&self.span, allocator),
7971 attached_to: CloneIn::clone_in_with_semantic_ids(&self.attached_to, allocator),
7972 kind: CloneIn::clone_in_with_semantic_ids(&self.kind, allocator),
7973 position: CloneIn::clone_in_with_semantic_ids(&self.position, allocator),
7974 newlines: CloneIn::clone_in_with_semantic_ids(&self.newlines, allocator),
7975 content: CloneIn::clone_in_with_semantic_ids(&self.content, allocator),
7976 }
7977 }
7978}