@@ -114,72 +114,74 @@ pub enum AstType {
114114 JSXOpeningElement = 98 ,
115115 JSXClosingElement = 99 ,
116116 JSXFragment = 100 ,
117- JSXElementName = 101 ,
118- JSXNamespacedName = 102 ,
119- JSXMemberExpression = 103 ,
120- JSXMemberExpressionObject = 104 ,
117+ JSXOpeningFragment = 101 ,
118+ JSXClosingFragment = 102 ,
119+ JSXNamespacedName = 103 ,
120+ JSXMemberExpression = 104 ,
121121 JSXExpressionContainer = 105 ,
122- JSXAttributeItem = 106 ,
123- JSXSpreadAttribute = 107 ,
124- JSXIdentifier = 108 ,
125- JSXText = 109 ,
126- TSThisParameter = 110 ,
127- TSEnumDeclaration = 111 ,
128- TSEnumBody = 112 ,
129- TSEnumMember = 113 ,
130- TSTypeAnnotation = 114 ,
131- TSLiteralType = 115 ,
132- TSConditionalType = 116 ,
133- TSUnionType = 117 ,
134- TSIntersectionType = 118 ,
135- TSParenthesizedType = 119 ,
136- TSIndexedAccessType = 120 ,
137- TSNamedTupleMember = 121 ,
138- TSAnyKeyword = 122 ,
139- TSStringKeyword = 123 ,
140- TSBooleanKeyword = 124 ,
141- TSNumberKeyword = 125 ,
142- TSNeverKeyword = 126 ,
143- TSIntrinsicKeyword = 127 ,
144- TSUnknownKeyword = 128 ,
145- TSNullKeyword = 129 ,
146- TSUndefinedKeyword = 130 ,
147- TSVoidKeyword = 131 ,
148- TSSymbolKeyword = 132 ,
149- TSThisType = 133 ,
150- TSObjectKeyword = 134 ,
151- TSBigIntKeyword = 135 ,
152- TSTypeReference = 136 ,
153- TSTypeName = 137 ,
154- TSQualifiedName = 138 ,
155- TSTypeParameterInstantiation = 139 ,
156- TSTypeParameter = 140 ,
157- TSTypeParameterDeclaration = 141 ,
158- TSTypeAliasDeclaration = 142 ,
159- TSClassImplements = 143 ,
160- TSInterfaceDeclaration = 144 ,
161- TSPropertySignature = 145 ,
162- TSMethodSignature = 146 ,
163- TSConstructSignatureDeclaration = 147 ,
164- TSInterfaceHeritage = 148 ,
165- TSModuleDeclaration = 149 ,
166- TSModuleBlock = 150 ,
167- TSTypeLiteral = 151 ,
168- TSInferType = 152 ,
169- TSTypeQuery = 153 ,
170- TSImportType = 154 ,
171- TSMappedType = 155 ,
172- TSTemplateLiteralType = 156 ,
173- TSAsExpression = 157 ,
174- TSSatisfiesExpression = 158 ,
175- TSTypeAssertion = 159 ,
176- TSImportEqualsDeclaration = 160 ,
177- TSModuleReference = 161 ,
178- TSExternalModuleReference = 162 ,
179- TSNonNullExpression = 163 ,
180- Decorator = 164 ,
181- TSExportAssignment = 165 ,
182- TSInstantiationExpression = 166 ,
122+ JSXEmptyExpression = 106 ,
123+ JSXAttribute = 107 ,
124+ JSXSpreadAttribute = 108 ,
125+ JSXIdentifier = 109 ,
126+ JSXSpreadChild = 110 ,
127+ JSXText = 111 ,
128+ TSThisParameter = 112 ,
129+ TSEnumDeclaration = 113 ,
130+ TSEnumBody = 114 ,
131+ TSEnumMember = 115 ,
132+ TSTypeAnnotation = 116 ,
133+ TSLiteralType = 117 ,
134+ TSConditionalType = 118 ,
135+ TSUnionType = 119 ,
136+ TSIntersectionType = 120 ,
137+ TSParenthesizedType = 121 ,
138+ TSIndexedAccessType = 122 ,
139+ TSNamedTupleMember = 123 ,
140+ TSAnyKeyword = 124 ,
141+ TSStringKeyword = 125 ,
142+ TSBooleanKeyword = 126 ,
143+ TSNumberKeyword = 127 ,
144+ TSNeverKeyword = 128 ,
145+ TSIntrinsicKeyword = 129 ,
146+ TSUnknownKeyword = 130 ,
147+ TSNullKeyword = 131 ,
148+ TSUndefinedKeyword = 132 ,
149+ TSVoidKeyword = 133 ,
150+ TSSymbolKeyword = 134 ,
151+ TSThisType = 135 ,
152+ TSObjectKeyword = 136 ,
153+ TSBigIntKeyword = 137 ,
154+ TSTypeReference = 138 ,
155+ TSTypeName = 139 ,
156+ TSQualifiedName = 140 ,
157+ TSTypeParameterInstantiation = 141 ,
158+ TSTypeParameter = 142 ,
159+ TSTypeParameterDeclaration = 143 ,
160+ TSTypeAliasDeclaration = 144 ,
161+ TSClassImplements = 145 ,
162+ TSInterfaceDeclaration = 146 ,
163+ TSPropertySignature = 147 ,
164+ TSMethodSignature = 148 ,
165+ TSConstructSignatureDeclaration = 149 ,
166+ TSInterfaceHeritage = 150 ,
167+ TSModuleDeclaration = 151 ,
168+ TSModuleBlock = 152 ,
169+ TSTypeLiteral = 153 ,
170+ TSInferType = 154 ,
171+ TSTypeQuery = 155 ,
172+ TSImportType = 156 ,
173+ TSMappedType = 157 ,
174+ TSTemplateLiteralType = 158 ,
175+ TSAsExpression = 159 ,
176+ TSSatisfiesExpression = 160 ,
177+ TSTypeAssertion = 161 ,
178+ TSImportEqualsDeclaration = 162 ,
179+ TSModuleReference = 163 ,
180+ TSExternalModuleReference = 164 ,
181+ TSNonNullExpression = 165 ,
182+ Decorator = 166 ,
183+ TSExportAssignment = 167 ,
184+ TSInstantiationExpression = 168 ,
183185}
184186
185187/// Untyped AST Node Kind
@@ -294,15 +296,16 @@ pub enum AstKind<'a> {
294296 JSXOpeningElement ( & ' a JSXOpeningElement < ' a > ) = AstType :: JSXOpeningElement as u8 ,
295297 JSXClosingElement ( & ' a JSXClosingElement < ' a > ) = AstType :: JSXClosingElement as u8 ,
296298 JSXFragment ( & ' a JSXFragment < ' a > ) = AstType :: JSXFragment as u8 ,
297- JSXElementName ( & ' a JSXElementName < ' a > ) = AstType :: JSXElementName as u8 ,
299+ JSXOpeningFragment ( & ' a JSXOpeningFragment ) = AstType :: JSXOpeningFragment as u8 ,
300+ JSXClosingFragment ( & ' a JSXClosingFragment ) = AstType :: JSXClosingFragment as u8 ,
298301 JSXNamespacedName ( & ' a JSXNamespacedName < ' a > ) = AstType :: JSXNamespacedName as u8 ,
299302 JSXMemberExpression ( & ' a JSXMemberExpression < ' a > ) = AstType :: JSXMemberExpression as u8 ,
300- JSXMemberExpressionObject ( & ' a JSXMemberExpressionObject < ' a > ) =
301- AstType :: JSXMemberExpressionObject as u8 ,
302303 JSXExpressionContainer ( & ' a JSXExpressionContainer < ' a > ) = AstType :: JSXExpressionContainer as u8 ,
303- JSXAttributeItem ( & ' a JSXAttributeItem < ' a > ) = AstType :: JSXAttributeItem as u8 ,
304+ JSXEmptyExpression ( & ' a JSXEmptyExpression ) = AstType :: JSXEmptyExpression as u8 ,
305+ JSXAttribute ( & ' a JSXAttribute < ' a > ) = AstType :: JSXAttribute as u8 ,
304306 JSXSpreadAttribute ( & ' a JSXSpreadAttribute < ' a > ) = AstType :: JSXSpreadAttribute as u8 ,
305307 JSXIdentifier ( & ' a JSXIdentifier < ' a > ) = AstType :: JSXIdentifier as u8 ,
308+ JSXSpreadChild ( & ' a JSXSpreadChild < ' a > ) = AstType :: JSXSpreadChild as u8 ,
306309 JSXText ( & ' a JSXText < ' a > ) = AstType :: JSXText as u8 ,
307310 TSThisParameter ( & ' a TSThisParameter < ' a > ) = AstType :: TSThisParameter as u8 ,
308311 TSEnumDeclaration ( & ' a TSEnumDeclaration < ' a > ) = AstType :: TSEnumDeclaration as u8 ,
@@ -485,14 +488,16 @@ impl GetSpan for AstKind<'_> {
485488 Self :: JSXOpeningElement ( it) => it. span ( ) ,
486489 Self :: JSXClosingElement ( it) => it. span ( ) ,
487490 Self :: JSXFragment ( it) => it. span ( ) ,
488- Self :: JSXElementName ( it) => it. span ( ) ,
491+ Self :: JSXOpeningFragment ( it) => it. span ( ) ,
492+ Self :: JSXClosingFragment ( it) => it. span ( ) ,
489493 Self :: JSXNamespacedName ( it) => it. span ( ) ,
490494 Self :: JSXMemberExpression ( it) => it. span ( ) ,
491- Self :: JSXMemberExpressionObject ( it) => it. span ( ) ,
492495 Self :: JSXExpressionContainer ( it) => it. span ( ) ,
493- Self :: JSXAttributeItem ( it) => it. span ( ) ,
496+ Self :: JSXEmptyExpression ( it) => it. span ( ) ,
497+ Self :: JSXAttribute ( it) => it. span ( ) ,
494498 Self :: JSXSpreadAttribute ( it) => it. span ( ) ,
495499 Self :: JSXIdentifier ( it) => it. span ( ) ,
500+ Self :: JSXSpreadChild ( it) => it. span ( ) ,
496501 Self :: JSXText ( it) => it. span ( ) ,
497502 Self :: TSThisParameter ( it) => it. span ( ) ,
498503 Self :: TSEnumDeclaration ( it) => it. span ( ) ,
@@ -1062,8 +1067,13 @@ impl<'a> AstKind<'a> {
10621067 }
10631068
10641069 #[ inline]
1065- pub fn as_jsx_element_name ( self ) -> Option < & ' a JSXElementName < ' a > > {
1066- if let Self :: JSXElementName ( v) = self { Some ( v) } else { None }
1070+ pub fn as_jsx_opening_fragment ( self ) -> Option < & ' a JSXOpeningFragment > {
1071+ if let Self :: JSXOpeningFragment ( v) = self { Some ( v) } else { None }
1072+ }
1073+
1074+ #[ inline]
1075+ pub fn as_jsx_closing_fragment ( self ) -> Option < & ' a JSXClosingFragment > {
1076+ if let Self :: JSXClosingFragment ( v) = self { Some ( v) } else { None }
10671077 }
10681078
10691079 #[ inline]
@@ -1077,18 +1087,18 @@ impl<'a> AstKind<'a> {
10771087 }
10781088
10791089 #[ inline]
1080- pub fn as_jsx_member_expression_object ( self ) -> Option < & ' a JSXMemberExpressionObject < ' a > > {
1081- if let Self :: JSXMemberExpressionObject ( v) = self { Some ( v) } else { None }
1090+ pub fn as_jsx_expression_container ( self ) -> Option < & ' a JSXExpressionContainer < ' a > > {
1091+ if let Self :: JSXExpressionContainer ( v) = self { Some ( v) } else { None }
10821092 }
10831093
10841094 #[ inline]
1085- pub fn as_jsx_expression_container ( self ) -> Option < & ' a JSXExpressionContainer < ' a > > {
1086- if let Self :: JSXExpressionContainer ( v) = self { Some ( v) } else { None }
1095+ pub fn as_jsx_empty_expression ( self ) -> Option < & ' a JSXEmptyExpression > {
1096+ if let Self :: JSXEmptyExpression ( v) = self { Some ( v) } else { None }
10871097 }
10881098
10891099 #[ inline]
1090- pub fn as_jsx_attribute_item ( self ) -> Option < & ' a JSXAttributeItem < ' a > > {
1091- if let Self :: JSXAttributeItem ( v) = self { Some ( v) } else { None }
1100+ pub fn as_jsx_attribute ( self ) -> Option < & ' a JSXAttribute < ' a > > {
1101+ if let Self :: JSXAttribute ( v) = self { Some ( v) } else { None }
10921102 }
10931103
10941104 #[ inline]
@@ -1101,6 +1111,11 @@ impl<'a> AstKind<'a> {
11011111 if let Self :: JSXIdentifier ( v) = self { Some ( v) } else { None }
11021112 }
11031113
1114+ #[ inline]
1115+ pub fn as_jsx_spread_child ( self ) -> Option < & ' a JSXSpreadChild < ' a > > {
1116+ if let Self :: JSXSpreadChild ( v) = self { Some ( v) } else { None }
1117+ }
1118+
11041119 #[ inline]
11051120 pub fn as_jsx_text ( self ) -> Option < & ' a JSXText < ' a > > {
11061121 if let Self :: JSXText ( v) = self { Some ( v) } else { None }
0 commit comments