@@ -285,39 +285,35 @@ pub(crate) enum AncestorType {
285
285
TSImportTypeOptions = 262 ,
286
286
TSImportTypeQualifier = 263 ,
287
287
TSImportTypeTypeArguments = 264 ,
288
- TSImportAttributesAttributesKeyword = 265,
289
- TSImportAttributesElements = 266,
290
- TSImportAttributeName = 267,
291
- TSImportAttributeValue = 268,
292
- TSFunctionTypeTypeParameters = 269,
293
- TSFunctionTypeThisParam = 270,
294
- TSFunctionTypeParams = 271,
295
- TSFunctionTypeReturnType = 272,
296
- TSConstructorTypeTypeParameters = 273,
297
- TSConstructorTypeParams = 274,
298
- TSConstructorTypeReturnType = 275,
299
- TSMappedTypeTypeParameter = 276,
300
- TSMappedTypeNameType = 277,
301
- TSMappedTypeTypeAnnotation = 278,
302
- TSTemplateLiteralTypeQuasis = 279,
303
- TSTemplateLiteralTypeTypes = 280,
304
- TSAsExpressionExpression = 281,
305
- TSAsExpressionTypeAnnotation = 282,
306
- TSSatisfiesExpressionExpression = 283,
307
- TSSatisfiesExpressionTypeAnnotation = 284,
308
- TSTypeAssertionExpression = 285,
309
- TSTypeAssertionTypeAnnotation = 286,
310
- TSImportEqualsDeclarationId = 287,
311
- TSImportEqualsDeclarationModuleReference = 288,
312
- TSExternalModuleReferenceExpression = 289,
313
- TSNonNullExpressionExpression = 290,
314
- DecoratorExpression = 291,
315
- TSExportAssignmentExpression = 292,
316
- TSNamespaceExportDeclarationId = 293,
317
- TSInstantiationExpressionExpression = 294,
318
- TSInstantiationExpressionTypeParameters = 295,
319
- JSDocNullableTypeTypeAnnotation = 296,
320
- JSDocNonNullableTypeTypeAnnotation = 297,
288
+ TSFunctionTypeTypeParameters = 265 ,
289
+ TSFunctionTypeThisParam = 266 ,
290
+ TSFunctionTypeParams = 267 ,
291
+ TSFunctionTypeReturnType = 268 ,
292
+ TSConstructorTypeTypeParameters = 269 ,
293
+ TSConstructorTypeParams = 270 ,
294
+ TSConstructorTypeReturnType = 271 ,
295
+ TSMappedTypeTypeParameter = 272 ,
296
+ TSMappedTypeNameType = 273 ,
297
+ TSMappedTypeTypeAnnotation = 274 ,
298
+ TSTemplateLiteralTypeQuasis = 275 ,
299
+ TSTemplateLiteralTypeTypes = 276 ,
300
+ TSAsExpressionExpression = 277 ,
301
+ TSAsExpressionTypeAnnotation = 278 ,
302
+ TSSatisfiesExpressionExpression = 279 ,
303
+ TSSatisfiesExpressionTypeAnnotation = 280 ,
304
+ TSTypeAssertionExpression = 281 ,
305
+ TSTypeAssertionTypeAnnotation = 282 ,
306
+ TSImportEqualsDeclarationId = 283 ,
307
+ TSImportEqualsDeclarationModuleReference = 284 ,
308
+ TSExternalModuleReferenceExpression = 285 ,
309
+ TSNonNullExpressionExpression = 286 ,
310
+ DecoratorExpression = 287 ,
311
+ TSExportAssignmentExpression = 288 ,
312
+ TSNamespaceExportDeclarationId = 289 ,
313
+ TSInstantiationExpressionExpression = 290 ,
314
+ TSInstantiationExpressionTypeParameters = 291 ,
315
+ JSDocNullableTypeTypeAnnotation = 292 ,
316
+ JSDocNonNullableTypeTypeAnnotation = 293 ,
321
317
}
322
318
323
319
/// Ancestor type used in AST traversal.
@@ -829,14 +825,6 @@ pub enum Ancestor<'a, 't> {
829
825
AncestorType :: TSImportTypeQualifier as u16 ,
830
826
TSImportTypeTypeArguments ( TSImportTypeWithoutTypeArguments < ' a , ' t > ) =
831
827
AncestorType :: TSImportTypeTypeArguments as u16 ,
832
- TSImportAttributesAttributesKeyword(TSImportAttributesWithoutAttributesKeyword<'a, 't>) =
833
- AncestorType::TSImportAttributesAttributesKeyword as u16,
834
- TSImportAttributesElements(TSImportAttributesWithoutElements<'a, 't>) =
835
- AncestorType::TSImportAttributesElements as u16,
836
- TSImportAttributeName(TSImportAttributeWithoutName<'a, 't>) =
837
- AncestorType::TSImportAttributeName as u16,
838
- TSImportAttributeValue(TSImportAttributeWithoutValue<'a, 't>) =
839
- AncestorType::TSImportAttributeValue as u16,
840
828
TSFunctionTypeTypeParameters ( TSFunctionTypeWithoutTypeParameters < ' a , ' t > ) =
841
829
AncestorType :: TSFunctionTypeTypeParameters as u16 ,
842
830
TSFunctionTypeThisParam ( TSFunctionTypeWithoutThisParam < ' a , ' t > ) =
@@ -1756,19 +1744,6 @@ impl<'a, 't> Ancestor<'a, 't> {
1756
1744
)
1757
1745
}
1758
1746
1759
- #[inline]
1760
- pub fn is_ts_import_attributes(self) -> bool {
1761
- matches!(
1762
- self,
1763
- Self::TSImportAttributesAttributesKeyword(_) | Self::TSImportAttributesElements(_)
1764
- )
1765
- }
1766
-
1767
- #[inline]
1768
- pub fn is_ts_import_attribute(self) -> bool {
1769
- matches!(self, Self::TSImportAttributeName(_) | Self::TSImportAttributeValue(_))
1770
- }
1771
-
1772
1747
#[ inline]
1773
1748
pub fn is_ts_function_type ( self ) -> bool {
1774
1749
matches ! (
@@ -1977,7 +1952,6 @@ impl<'a, 't> Ancestor<'a, 't> {
1977
1952
| Self :: JSXSpreadChildExpression ( _)
1978
1953
| Self :: TSEnumMemberInitializer ( _)
1979
1954
| Self :: TSInterfaceHeritageExpression ( _)
1980
- | Self::TSImportAttributeValue(_)
1981
1955
| Self :: TSAsExpressionExpression ( _)
1982
1956
| Self :: TSSatisfiesExpressionExpression ( _)
1983
1957
| Self :: TSTypeAssertionExpression ( _)
@@ -2204,11 +2178,6 @@ impl<'a, 't> Ancestor<'a, 't> {
2204
2178
matches ! ( self , Self :: TSTypeQueryExprName ( _) )
2205
2179
}
2206
2180
2207
- #[inline]
2208
- pub fn is_parent_of_ts_import_attribute_name(self) -> bool {
2209
- matches!(self, Self::TSImportAttributeName(_))
2210
- }
2211
-
2212
2181
#[ inline]
2213
2182
pub fn is_parent_of_ts_module_reference ( self ) -> bool {
2214
2183
matches ! ( self , Self :: TSImportEqualsDeclarationModuleReference ( _) )
@@ -2486,10 +2455,6 @@ impl<'a, 't> GetAddress for Ancestor<'a, 't> {
2486
2455
Self :: TSImportTypeOptions ( a) => a. address ( ) ,
2487
2456
Self :: TSImportTypeQualifier ( a) => a. address ( ) ,
2488
2457
Self :: TSImportTypeTypeArguments ( a) => a. address ( ) ,
2489
- Self::TSImportAttributesAttributesKeyword(a) => a.address(),
2490
- Self::TSImportAttributesElements(a) => a.address(),
2491
- Self::TSImportAttributeName(a) => a.address(),
2492
- Self::TSImportAttributeValue(a) => a.address(),
2493
2458
Self :: TSFunctionTypeTypeParameters ( a) => a. address ( ) ,
2494
2459
Self :: TSFunctionTypeThisParam ( a) => a. address ( ) ,
2495
2460
Self :: TSFunctionTypeParams ( a) => a. address ( ) ,
@@ -14266,10 +14231,10 @@ impl<'a, 't> TSImportTypeWithoutArgument<'a, 't> {
14266
14231
}
14267
14232
14268
14233
#[ inline]
14269
- pub fn options(self) -> &'t Option<Box<'a, TSImportAttributes <'a>>> {
14234
+ pub fn options ( self ) -> & ' t Option < Box < ' a , ObjectExpression < ' a > > > {
14270
14235
unsafe {
14271
14236
& * ( ( self . 0 as * const u8 ) . add ( OFFSET_TS_IMPORT_TYPE_OPTIONS )
14272
- as *const Option<Box<'a, TSImportAttributes <'a>>>)
14237
+ as * const Option < Box < ' a , ObjectExpression < ' a > > > )
14273
14238
}
14274
14239
}
14275
14240
@@ -14372,10 +14337,10 @@ impl<'a, 't> TSImportTypeWithoutQualifier<'a, 't> {
14372
14337
}
14373
14338
14374
14339
#[ inline]
14375
- pub fn options(self) -> &'t Option<Box<'a, TSImportAttributes <'a>>> {
14340
+ pub fn options ( self ) -> & ' t Option < Box < ' a , ObjectExpression < ' a > > > {
14376
14341
unsafe {
14377
14342
& * ( ( self . 0 as * const u8 ) . add ( OFFSET_TS_IMPORT_TYPE_OPTIONS )
14378
- as *const Option<Box<'a, TSImportAttributes <'a>>>)
14343
+ as * const Option < Box < ' a , ObjectExpression < ' a > > > )
14379
14344
}
14380
14345
}
14381
14346
@@ -14421,10 +14386,10 @@ impl<'a, 't> TSImportTypeWithoutTypeArguments<'a, 't> {
14421
14386
}
14422
14387
14423
14388
#[ inline]
14424
- pub fn options(self) -> &'t Option<Box<'a, TSImportAttributes <'a>>> {
14389
+ pub fn options ( self ) -> & ' t Option < Box < ' a , ObjectExpression < ' a > > > {
14425
14390
unsafe {
14426
14391
& * ( ( self . 0 as * const u8 ) . add ( OFFSET_TS_IMPORT_TYPE_OPTIONS )
14427
- as *const Option<Box<'a, TSImportAttributes <'a>>>)
14392
+ as * const Option < Box < ' a , ObjectExpression < ' a > > > )
14428
14393
}
14429
14394
}
14430
14395
@@ -14449,131 +14414,6 @@ impl<'a, 't> GetAddress for TSImportTypeWithoutTypeArguments<'a, 't> {
14449
14414
}
14450
14415
}
14451
14416
14452
- pub(crate) const OFFSET_TS_IMPORT_ATTRIBUTES_SPAN: usize = offset_of!(TSImportAttributes, span);
14453
- pub(crate) const OFFSET_TS_IMPORT_ATTRIBUTES_ATTRIBUTES_KEYWORD: usize =
14454
- offset_of!(TSImportAttributes, attributes_keyword);
14455
- pub(crate) const OFFSET_TS_IMPORT_ATTRIBUTES_ELEMENTS: usize =
14456
- offset_of!(TSImportAttributes, elements);
14457
-
14458
- #[repr(transparent)]
14459
- #[derive(Clone, Copy, Debug)]
14460
- pub struct TSImportAttributesWithoutAttributesKeyword<'a, 't>(
14461
- pub(crate) *const TSImportAttributes<'a>,
14462
- pub(crate) PhantomData<&'t ()>,
14463
- );
14464
-
14465
- impl<'a, 't> TSImportAttributesWithoutAttributesKeyword<'a, 't> {
14466
- #[inline]
14467
- pub fn span(self) -> &'t Span {
14468
- unsafe { &*((self.0 as *const u8).add(OFFSET_TS_IMPORT_ATTRIBUTES_SPAN) as *const Span) }
14469
- }
14470
-
14471
- #[inline]
14472
- pub fn elements(self) -> &'t Vec<'a, TSImportAttribute<'a>> {
14473
- unsafe {
14474
- &*((self.0 as *const u8).add(OFFSET_TS_IMPORT_ATTRIBUTES_ELEMENTS)
14475
- as *const Vec<'a, TSImportAttribute<'a>>)
14476
- }
14477
- }
14478
- }
14479
-
14480
- impl<'a, 't> GetAddress for TSImportAttributesWithoutAttributesKeyword<'a, 't> {
14481
- #[inline]
14482
- fn address(&self) -> Address {
14483
- Address::from_ptr(self.0)
14484
- }
14485
- }
14486
-
14487
- #[repr(transparent)]
14488
- #[derive(Clone, Copy, Debug)]
14489
- pub struct TSImportAttributesWithoutElements<'a, 't>(
14490
- pub(crate) *const TSImportAttributes<'a>,
14491
- pub(crate) PhantomData<&'t ()>,
14492
- );
14493
-
14494
- impl<'a, 't> TSImportAttributesWithoutElements<'a, 't> {
14495
- #[inline]
14496
- pub fn span(self) -> &'t Span {
14497
- unsafe { &*((self.0 as *const u8).add(OFFSET_TS_IMPORT_ATTRIBUTES_SPAN) as *const Span) }
14498
- }
14499
-
14500
- #[inline]
14501
- pub fn attributes_keyword(self) -> &'t IdentifierName<'a> {
14502
- unsafe {
14503
- &*((self.0 as *const u8).add(OFFSET_TS_IMPORT_ATTRIBUTES_ATTRIBUTES_KEYWORD)
14504
- as *const IdentifierName<'a>)
14505
- }
14506
- }
14507
- }
14508
-
14509
- impl<'a, 't> GetAddress for TSImportAttributesWithoutElements<'a, 't> {
14510
- #[inline]
14511
- fn address(&self) -> Address {
14512
- Address::from_ptr(self.0)
14513
- }
14514
- }
14515
-
14516
- pub(crate) const OFFSET_TS_IMPORT_ATTRIBUTE_SPAN: usize = offset_of!(TSImportAttribute, span);
14517
- pub(crate) const OFFSET_TS_IMPORT_ATTRIBUTE_NAME: usize = offset_of!(TSImportAttribute, name);
14518
- pub(crate) const OFFSET_TS_IMPORT_ATTRIBUTE_VALUE: usize = offset_of!(TSImportAttribute, value);
14519
-
14520
- #[repr(transparent)]
14521
- #[derive(Clone, Copy, Debug)]
14522
- pub struct TSImportAttributeWithoutName<'a, 't>(
14523
- pub(crate) *const TSImportAttribute<'a>,
14524
- pub(crate) PhantomData<&'t ()>,
14525
- );
14526
-
14527
- impl<'a, 't> TSImportAttributeWithoutName<'a, 't> {
14528
- #[inline]
14529
- pub fn span(self) -> &'t Span {
14530
- unsafe { &*((self.0 as *const u8).add(OFFSET_TS_IMPORT_ATTRIBUTE_SPAN) as *const Span) }
14531
- }
14532
-
14533
- #[inline]
14534
- pub fn value(self) -> &'t Expression<'a> {
14535
- unsafe {
14536
- &*((self.0 as *const u8).add(OFFSET_TS_IMPORT_ATTRIBUTE_VALUE) as *const Expression<'a>)
14537
- }
14538
- }
14539
- }
14540
-
14541
- impl<'a, 't> GetAddress for TSImportAttributeWithoutName<'a, 't> {
14542
- #[inline]
14543
- fn address(&self) -> Address {
14544
- Address::from_ptr(self.0)
14545
- }
14546
- }
14547
-
14548
- #[repr(transparent)]
14549
- #[derive(Clone, Copy, Debug)]
14550
- pub struct TSImportAttributeWithoutValue<'a, 't>(
14551
- pub(crate) *const TSImportAttribute<'a>,
14552
- pub(crate) PhantomData<&'t ()>,
14553
- );
14554
-
14555
- impl<'a, 't> TSImportAttributeWithoutValue<'a, 't> {
14556
- #[inline]
14557
- pub fn span(self) -> &'t Span {
14558
- unsafe { &*((self.0 as *const u8).add(OFFSET_TS_IMPORT_ATTRIBUTE_SPAN) as *const Span) }
14559
- }
14560
-
14561
- #[inline]
14562
- pub fn name(self) -> &'t TSImportAttributeName<'a> {
14563
- unsafe {
14564
- &*((self.0 as *const u8).add(OFFSET_TS_IMPORT_ATTRIBUTE_NAME)
14565
- as *const TSImportAttributeName<'a>)
14566
- }
14567
- }
14568
- }
14569
-
14570
- impl<'a, 't> GetAddress for TSImportAttributeWithoutValue<'a, 't> {
14571
- #[inline]
14572
- fn address(&self) -> Address {
14573
- Address::from_ptr(self.0)
14574
- }
14575
- }
14576
-
14577
14417
pub ( crate ) const OFFSET_TS_FUNCTION_TYPE_SPAN : usize = offset_of ! ( TSFunctionType , span) ;
14578
14418
pub ( crate ) const OFFSET_TS_FUNCTION_TYPE_TYPE_PARAMETERS : usize =
14579
14419
offset_of ! ( TSFunctionType , type_parameters) ;
0 commit comments