@@ -28,24 +28,35 @@ defmodule ESTree.Tools.Builder do
28
28
ESTree.SourceLocation . t | nil
29
29
) :: ESTree.ArrowFunctionExpression . t
30
30
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
34
34
}
35
35
end
36
36
37
37
@ spec assignment_expression (
38
- ESTree . assignment_operator ,
39
- ESTree.Pattern . t | ESTree.Expression . t ,
38
+ ESTree . assignment_operator ,
39
+ ESTree.Pattern . t ,
40
40
ESTree.Expression . t ,
41
41
ESTree.SourceLocation . t | nil
42
42
) :: ESTree.AssignmentExpression . t
43
43
def assignment_expression ( operator , left , right , loc \\ nil ) do
44
- % ESTree.AssignmentExpression {
44
+ % ESTree.AssignmentExpression {
45
45
operator: operator , left: left , right: right , loc: loc
46
46
}
47
47
end
48
48
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
+
49
60
@ spec await_expression (
50
61
ESTree.Expression . t | nil ,
51
62
boolean ,
@@ -259,19 +270,19 @@ defmodule ESTree.Tools.Builder do
259
270
end
260
271
261
272
@ spec for_in_statement (
262
- ESTree.VariableDeclaration . t | ESTree.Expression . t ,
273
+ ESTree.VariableDeclaration . t | ESTree.Pattern . t ,
263
274
ESTree.Expression . t ,
264
275
ESTree.Statement . t ,
265
276
ESTree.SourceLocation . t | nil
266
277
) :: ESTree.ForInStatement . t
267
278
def for_in_statement ( left , right , body , loc \\ nil ) do
268
- % ESTree.ForInStatement {
279
+ % ESTree.ForInStatement {
269
280
left: left , right: right , body: body , loc: loc
270
281
}
271
282
end
272
283
273
284
@ spec for_of_statement (
274
- ESTree.VariableDeclaration . t | ESTree.Expression . t ,
285
+ ESTree.VariableDeclaration . t | ESTree.Pattern . t ,
275
286
ESTree.Expression . t ,
276
287
ESTree.Statement . t ,
277
288
ESTree.SourceLocation . t | nil
0 commit comments