@@ -28,24 +28,35 @@ defmodule ESTree.Tools.Builder do
2828 ESTree.SourceLocation . t | nil
2929 ) :: ESTree.ArrowFunctionExpression . t
3030 def arrow_function_expression ( params , defaults , body , generator \\ false , expression \\ false , loc \\ nil ) do
31- % ESTree.ArrowFunctionExpression {
32- params: params , defaults: defaults ,
33- body: body , generator: generator , expression: expression , loc: loc
31+ % ESTree.ArrowFunctionExpression {
32+ params: params , defaults: defaults ,
33+ body: body , generator: generator , expression: expression , loc: loc
3434 }
3535 end
3636
3737 @ spec assignment_expression (
38- ESTree . assignment_operator ,
39- ESTree.Pattern . t | ESTree.Expression . t ,
38+ ESTree . assignment_operator ,
39+ ESTree.Pattern . t ,
4040 ESTree.Expression . t ,
4141 ESTree.SourceLocation . t | nil
4242 ) :: ESTree.AssignmentExpression . t
4343 def assignment_expression ( operator , left , right , loc \\ nil ) do
44- % ESTree.AssignmentExpression {
44+ % ESTree.AssignmentExpression {
4545 operator: operator , left: left , right: right , loc: loc
4646 }
4747 end
4848
49+ @ spec assignment_property (
50+ ESTree.Pattern . t ,
51+ ESTree.SourceLocation . t | nil
52+ ) :: ESTree.AssignmentProperty . t
53+ def assignment_property ( value , loc \\ nil ) do
54+ % ESTree.AssignmentProperty {
55+ value: value , loc: loc
56+ }
57+ end
58+
59+
4960 @ spec await_expression (
5061 ESTree.Expression . t | nil ,
5162 boolean ,
@@ -259,19 +270,19 @@ defmodule ESTree.Tools.Builder do
259270 end
260271
261272 @ spec for_in_statement (
262- ESTree.VariableDeclaration . t | ESTree.Expression . t ,
273+ ESTree.VariableDeclaration . t | ESTree.Pattern . t ,
263274 ESTree.Expression . t ,
264275 ESTree.Statement . t ,
265276 ESTree.SourceLocation . t | nil
266277 ) :: ESTree.ForInStatement . t
267278 def for_in_statement ( left , right , body , loc \\ nil ) do
268- % ESTree.ForInStatement {
279+ % ESTree.ForInStatement {
269280 left: left , right: right , body: body , loc: loc
270281 }
271282 end
272283
273284 @ spec for_of_statement (
274- ESTree.VariableDeclaration . t | ESTree.Expression . t ,
285+ ESTree.VariableDeclaration . t | ESTree.Pattern . t ,
275286 ESTree.Expression . t ,
276287 ESTree.Statement . t ,
277288 ESTree.SourceLocation . t | nil
0 commit comments