forked from jquery/esprima
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Supports cover grammar related destructuring
Closes jquery#1045. Closes jquery#1060.
- Loading branch information
1 parent
0b3658b
commit 698e334
Showing
65 changed files
with
4,886 additions
and
86 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
test/fixtures/ES6/arrow-function/array-binding-pattern/array-binding-patter-empty.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
([])=>0; |
96 changes: 96 additions & 0 deletions
96
test/fixtures/ES6/arrow-function/array-binding-pattern/array-binding-patter-empty.tree.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
{ | ||
"range": [ | ||
0, | ||
8 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 8 | ||
} | ||
}, | ||
"type": "Program", | ||
"body": [ | ||
{ | ||
"range": [ | ||
0, | ||
8 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 8 | ||
} | ||
}, | ||
"type": "ExpressionStatement", | ||
"expression": { | ||
"range": [ | ||
0, | ||
7 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 7 | ||
} | ||
}, | ||
"type": "ArrowFunctionExpression", | ||
"id": null, | ||
"params": [ | ||
{ | ||
"range": [ | ||
1, | ||
3 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 1 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 3 | ||
} | ||
}, | ||
"type": "ArrayPattern", | ||
"elements": [] | ||
} | ||
], | ||
"defaults": [], | ||
"body": { | ||
"range": [ | ||
6, | ||
7 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 6 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 7 | ||
} | ||
}, | ||
"type": "Literal", | ||
"value": 0, | ||
"raw": "0" | ||
}, | ||
"generator": false, | ||
"expression": true | ||
} | ||
} | ||
] | ||
} |
1 change: 1 addition & 0 deletions
1
test/fixtures/ES6/arrow-function/array-binding-pattern/array-binding-pattern-01.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
([a]) => [0]; |
134 changes: 134 additions & 0 deletions
134
test/fixtures/ES6/arrow-function/array-binding-pattern/array-binding-pattern-01.tree.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
{ | ||
"range": [ | ||
0, | ||
13 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 13 | ||
} | ||
}, | ||
"type": "Program", | ||
"body": [ | ||
{ | ||
"range": [ | ||
0, | ||
13 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 13 | ||
} | ||
}, | ||
"type": "ExpressionStatement", | ||
"expression": { | ||
"range": [ | ||
0, | ||
12 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 12 | ||
} | ||
}, | ||
"type": "ArrowFunctionExpression", | ||
"id": null, | ||
"params": [ | ||
{ | ||
"range": [ | ||
1, | ||
4 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 1 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 4 | ||
} | ||
}, | ||
"type": "ArrayPattern", | ||
"elements": [ | ||
{ | ||
"range": [ | ||
2, | ||
3 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 3 | ||
} | ||
}, | ||
"type": "Identifier", | ||
"name": "a" | ||
} | ||
] | ||
} | ||
], | ||
"defaults": [], | ||
"body": { | ||
"range": [ | ||
9, | ||
12 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 9 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 12 | ||
} | ||
}, | ||
"type": "ArrayExpression", | ||
"elements": [ | ||
{ | ||
"range": [ | ||
10, | ||
11 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 10 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 11 | ||
} | ||
}, | ||
"type": "Literal", | ||
"value": 0, | ||
"raw": "0" | ||
} | ||
] | ||
}, | ||
"generator": false, | ||
"expression": true | ||
} | ||
} | ||
] | ||
} |
1 change: 1 addition & 0 deletions
1
test/fixtures/ES6/arrow-function/array-binding-pattern/array-binding-pattern-02.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
([a,b])=>0; |
133 changes: 133 additions & 0 deletions
133
test/fixtures/ES6/arrow-function/array-binding-pattern/array-binding-pattern-02.tree.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
{ | ||
"range": [ | ||
0, | ||
11 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 11 | ||
} | ||
}, | ||
"type": "Program", | ||
"body": [ | ||
{ | ||
"range": [ | ||
0, | ||
11 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 11 | ||
} | ||
}, | ||
"type": "ExpressionStatement", | ||
"expression": { | ||
"range": [ | ||
0, | ||
10 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 10 | ||
} | ||
}, | ||
"type": "ArrowFunctionExpression", | ||
"id": null, | ||
"params": [ | ||
{ | ||
"range": [ | ||
1, | ||
6 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 1 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 6 | ||
} | ||
}, | ||
"type": "ArrayPattern", | ||
"elements": [ | ||
{ | ||
"range": [ | ||
2, | ||
3 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 3 | ||
} | ||
}, | ||
"type": "Identifier", | ||
"name": "a" | ||
}, | ||
{ | ||
"range": [ | ||
4, | ||
5 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 4 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 5 | ||
} | ||
}, | ||
"type": "Identifier", | ||
"name": "b" | ||
} | ||
] | ||
} | ||
], | ||
"defaults": [], | ||
"body": { | ||
"range": [ | ||
9, | ||
10 | ||
], | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 9 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 10 | ||
} | ||
}, | ||
"type": "Literal", | ||
"value": 0, | ||
"raw": "0" | ||
}, | ||
"generator": false, | ||
"expression": true | ||
} | ||
} | ||
] | ||
} |
1 change: 1 addition & 0 deletions
1
test/fixtures/ES6/arrow-function/array-binding-pattern/array-binding-pattern-03.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
([a,...b])=>0; |
Oops, something went wrong.