@@ -81,126 +81,127 @@ pub enum AstType {
8181 DebuggerStatement = 64 ,
8282 AssignmentPattern = 65 ,
8383 ObjectPattern = 66 ,
84- ArrayPattern = 67 ,
85- BindingRestElement = 68 ,
86- Function = 69 ,
87- FormalParameters = 70 ,
88- FormalParameter = 71 ,
89- FunctionBody = 72 ,
90- ArrowFunctionExpression = 73 ,
91- YieldExpression = 74 ,
92- Class = 75 ,
93- ClassBody = 76 ,
94- MethodDefinition = 77 ,
95- PropertyDefinition = 78 ,
96- PrivateIdentifier = 79 ,
97- StaticBlock = 80 ,
98- ModuleDeclaration = 81 ,
99- AccessorProperty = 82 ,
100- ImportExpression = 83 ,
101- ImportDeclaration = 84 ,
102- ImportSpecifier = 85 ,
103- ImportDefaultSpecifier = 86 ,
104- ImportNamespaceSpecifier = 87 ,
105- WithClause = 88 ,
106- ImportAttribute = 89 ,
107- ExportNamedDeclaration = 90 ,
108- ExportDefaultDeclaration = 91 ,
109- ExportAllDeclaration = 92 ,
110- ExportSpecifier = 93 ,
111- V8IntrinsicExpression = 94 ,
112- BooleanLiteral = 95 ,
113- NullLiteral = 96 ,
114- NumericLiteral = 97 ,
115- StringLiteral = 98 ,
116- BigIntLiteral = 99 ,
117- RegExpLiteral = 100 ,
118- JSXElement = 101 ,
119- JSXOpeningElement = 102 ,
120- JSXClosingElement = 103 ,
121- JSXFragment = 104 ,
122- JSXOpeningFragment = 105 ,
123- JSXClosingFragment = 106 ,
124- JSXNamespacedName = 107 ,
125- JSXMemberExpression = 108 ,
126- JSXExpressionContainer = 109 ,
127- JSXEmptyExpression = 110 ,
128- JSXAttribute = 111 ,
129- JSXSpreadAttribute = 112 ,
130- JSXIdentifier = 113 ,
131- JSXSpreadChild = 114 ,
132- JSXText = 115 ,
133- TSThisParameter = 116 ,
134- TSEnumDeclaration = 117 ,
135- TSEnumBody = 118 ,
136- TSEnumMember = 119 ,
137- TSTypeAnnotation = 120 ,
138- TSLiteralType = 121 ,
139- TSConditionalType = 122 ,
140- TSUnionType = 123 ,
141- TSIntersectionType = 124 ,
142- TSParenthesizedType = 125 ,
143- TSTypeOperator = 126 ,
144- TSArrayType = 127 ,
145- TSIndexedAccessType = 128 ,
146- TSTupleType = 129 ,
147- TSNamedTupleMember = 130 ,
148- TSOptionalType = 131 ,
149- TSRestType = 132 ,
150- TSAnyKeyword = 133 ,
151- TSStringKeyword = 134 ,
152- TSBooleanKeyword = 135 ,
153- TSNumberKeyword = 136 ,
154- TSNeverKeyword = 137 ,
155- TSIntrinsicKeyword = 138 ,
156- TSUnknownKeyword = 139 ,
157- TSNullKeyword = 140 ,
158- TSUndefinedKeyword = 141 ,
159- TSVoidKeyword = 142 ,
160- TSSymbolKeyword = 143 ,
161- TSThisType = 144 ,
162- TSObjectKeyword = 145 ,
163- TSBigIntKeyword = 146 ,
164- TSTypeReference = 147 ,
165- TSTypeName = 148 ,
166- TSQualifiedName = 149 ,
167- TSTypeParameterInstantiation = 150 ,
168- TSTypeParameter = 151 ,
169- TSTypeParameterDeclaration = 152 ,
170- TSTypeAliasDeclaration = 153 ,
171- TSClassImplements = 154 ,
172- TSInterfaceDeclaration = 155 ,
173- TSInterfaceBody = 156 ,
174- TSPropertySignature = 157 ,
175- TSIndexSignature = 158 ,
176- TSCallSignatureDeclaration = 159 ,
177- TSMethodSignature = 160 ,
178- TSConstructSignatureDeclaration = 161 ,
179- TSIndexSignatureName = 162 ,
180- TSInterfaceHeritage = 163 ,
181- TSTypePredicate = 164 ,
182- TSModuleDeclaration = 165 ,
183- TSModuleBlock = 166 ,
184- TSTypeLiteral = 167 ,
185- TSInferType = 168 ,
186- TSTypeQuery = 169 ,
187- TSImportType = 170 ,
188- TSConstructorType = 171 ,
189- TSMappedType = 172 ,
190- TSTemplateLiteralType = 173 ,
191- TSAsExpression = 174 ,
192- TSSatisfiesExpression = 175 ,
193- TSTypeAssertion = 176 ,
194- TSImportEqualsDeclaration = 177 ,
195- TSExternalModuleReference = 178 ,
196- TSNonNullExpression = 179 ,
197- Decorator = 180 ,
198- TSExportAssignment = 181 ,
199- TSNamespaceExportDeclaration = 182 ,
200- TSInstantiationExpression = 183 ,
201- JSDocNullableType = 184 ,
202- JSDocNonNullableType = 185 ,
203- JSDocUnknownType = 186 ,
84+ BindingProperty = 67 ,
85+ ArrayPattern = 68 ,
86+ BindingRestElement = 69 ,
87+ Function = 70 ,
88+ FormalParameters = 71 ,
89+ FormalParameter = 72 ,
90+ FunctionBody = 73 ,
91+ ArrowFunctionExpression = 74 ,
92+ YieldExpression = 75 ,
93+ Class = 76 ,
94+ ClassBody = 77 ,
95+ MethodDefinition = 78 ,
96+ PropertyDefinition = 79 ,
97+ PrivateIdentifier = 80 ,
98+ StaticBlock = 81 ,
99+ ModuleDeclaration = 82 ,
100+ AccessorProperty = 83 ,
101+ ImportExpression = 84 ,
102+ ImportDeclaration = 85 ,
103+ ImportSpecifier = 86 ,
104+ ImportDefaultSpecifier = 87 ,
105+ ImportNamespaceSpecifier = 88 ,
106+ WithClause = 89 ,
107+ ImportAttribute = 90 ,
108+ ExportNamedDeclaration = 91 ,
109+ ExportDefaultDeclaration = 92 ,
110+ ExportAllDeclaration = 93 ,
111+ ExportSpecifier = 94 ,
112+ V8IntrinsicExpression = 95 ,
113+ BooleanLiteral = 96 ,
114+ NullLiteral = 97 ,
115+ NumericLiteral = 98 ,
116+ StringLiteral = 99 ,
117+ BigIntLiteral = 100 ,
118+ RegExpLiteral = 101 ,
119+ JSXElement = 102 ,
120+ JSXOpeningElement = 103 ,
121+ JSXClosingElement = 104 ,
122+ JSXFragment = 105 ,
123+ JSXOpeningFragment = 106 ,
124+ JSXClosingFragment = 107 ,
125+ JSXNamespacedName = 108 ,
126+ JSXMemberExpression = 109 ,
127+ JSXExpressionContainer = 110 ,
128+ JSXEmptyExpression = 111 ,
129+ JSXAttribute = 112 ,
130+ JSXSpreadAttribute = 113 ,
131+ JSXIdentifier = 114 ,
132+ JSXSpreadChild = 115 ,
133+ JSXText = 116 ,
134+ TSThisParameter = 117 ,
135+ TSEnumDeclaration = 118 ,
136+ TSEnumBody = 119 ,
137+ TSEnumMember = 120 ,
138+ TSTypeAnnotation = 121 ,
139+ TSLiteralType = 122 ,
140+ TSConditionalType = 123 ,
141+ TSUnionType = 124 ,
142+ TSIntersectionType = 125 ,
143+ TSParenthesizedType = 126 ,
144+ TSTypeOperator = 127 ,
145+ TSArrayType = 128 ,
146+ TSIndexedAccessType = 129 ,
147+ TSTupleType = 130 ,
148+ TSNamedTupleMember = 131 ,
149+ TSOptionalType = 132 ,
150+ TSRestType = 133 ,
151+ TSAnyKeyword = 134 ,
152+ TSStringKeyword = 135 ,
153+ TSBooleanKeyword = 136 ,
154+ TSNumberKeyword = 137 ,
155+ TSNeverKeyword = 138 ,
156+ TSIntrinsicKeyword = 139 ,
157+ TSUnknownKeyword = 140 ,
158+ TSNullKeyword = 141 ,
159+ TSUndefinedKeyword = 142 ,
160+ TSVoidKeyword = 143 ,
161+ TSSymbolKeyword = 144 ,
162+ TSThisType = 145 ,
163+ TSObjectKeyword = 146 ,
164+ TSBigIntKeyword = 147 ,
165+ TSTypeReference = 148 ,
166+ TSTypeName = 149 ,
167+ TSQualifiedName = 150 ,
168+ TSTypeParameterInstantiation = 151 ,
169+ TSTypeParameter = 152 ,
170+ TSTypeParameterDeclaration = 153 ,
171+ TSTypeAliasDeclaration = 154 ,
172+ TSClassImplements = 155 ,
173+ TSInterfaceDeclaration = 156 ,
174+ TSInterfaceBody = 157 ,
175+ TSPropertySignature = 158 ,
176+ TSIndexSignature = 159 ,
177+ TSCallSignatureDeclaration = 160 ,
178+ TSMethodSignature = 161 ,
179+ TSConstructSignatureDeclaration = 162 ,
180+ TSIndexSignatureName = 163 ,
181+ TSInterfaceHeritage = 164 ,
182+ TSTypePredicate = 165 ,
183+ TSModuleDeclaration = 166 ,
184+ TSModuleBlock = 167 ,
185+ TSTypeLiteral = 168 ,
186+ TSInferType = 169 ,
187+ TSTypeQuery = 170 ,
188+ TSImportType = 171 ,
189+ TSConstructorType = 172 ,
190+ TSMappedType = 173 ,
191+ TSTemplateLiteralType = 174 ,
192+ TSAsExpression = 175 ,
193+ TSSatisfiesExpression = 176 ,
194+ TSTypeAssertion = 177 ,
195+ TSImportEqualsDeclaration = 178 ,
196+ TSExternalModuleReference = 179 ,
197+ TSNonNullExpression = 180 ,
198+ Decorator = 181 ,
199+ TSExportAssignment = 182 ,
200+ TSNamespaceExportDeclaration = 183 ,
201+ TSInstantiationExpression = 184 ,
202+ JSDocNullableType = 185 ,
203+ JSDocNonNullableType = 186 ,
204+ JSDocUnknownType = 187 ,
204205}
205206
206207/// Untyped AST Node Kind
@@ -279,6 +280,7 @@ pub enum AstKind<'a> {
279280 DebuggerStatement ( & ' a DebuggerStatement ) = AstType :: DebuggerStatement as u8 ,
280281 AssignmentPattern ( & ' a AssignmentPattern < ' a > ) = AstType :: AssignmentPattern as u8 ,
281282 ObjectPattern ( & ' a ObjectPattern < ' a > ) = AstType :: ObjectPattern as u8 ,
283+ BindingProperty ( & ' a BindingProperty < ' a > ) = AstType :: BindingProperty as u8 ,
282284 ArrayPattern ( & ' a ArrayPattern < ' a > ) = AstType :: ArrayPattern as u8 ,
283285 BindingRestElement ( & ' a BindingRestElement < ' a > ) = AstType :: BindingRestElement as u8 ,
284286 Function ( & ' a Function < ' a > ) = AstType :: Function as u8 ,
@@ -494,6 +496,7 @@ impl GetSpan for AstKind<'_> {
494496 Self :: DebuggerStatement ( it) => it. span ( ) ,
495497 Self :: AssignmentPattern ( it) => it. span ( ) ,
496498 Self :: ObjectPattern ( it) => it. span ( ) ,
499+ Self :: BindingProperty ( it) => it. span ( ) ,
497500 Self :: ArrayPattern ( it) => it. span ( ) ,
498501 Self :: BindingRestElement ( it) => it. span ( ) ,
499502 Self :: Function ( it) => it. span ( ) ,
@@ -688,6 +691,7 @@ impl GetAddress for AstKind<'_> {
688691 Self :: DebuggerStatement ( it) => Address :: from_ptr ( it) ,
689692 Self :: AssignmentPattern ( it) => Address :: from_ptr ( it) ,
690693 Self :: ObjectPattern ( it) => Address :: from_ptr ( it) ,
694+ Self :: BindingProperty ( it) => Address :: from_ptr ( it) ,
691695 Self :: ArrayPattern ( it) => Address :: from_ptr ( it) ,
692696 Self :: BindingRestElement ( it) => Address :: from_ptr ( it) ,
693697 Self :: Function ( it) => Address :: from_ptr ( it) ,
@@ -1148,6 +1152,11 @@ impl<'a> AstKind<'a> {
11481152 if let Self :: ObjectPattern ( v) = self { Some ( v) } else { None }
11491153 }
11501154
1155+ #[ inline]
1156+ pub fn as_binding_property ( self ) -> Option < & ' a BindingProperty < ' a > > {
1157+ if let Self :: BindingProperty ( v) = self { Some ( v) } else { None }
1158+ }
1159+
11511160 #[ inline]
11521161 pub fn as_array_pattern ( self ) -> Option < & ' a ArrayPattern < ' a > > {
11531162 if let Self :: ArrayPattern ( v) = self { Some ( v) } else { None }
0 commit comments