Skip to content

Commit

Permalink
Supports cover grammar related destructuring
Browse files Browse the repository at this point in the history
Closes jquery#1045.
Related to jquery#1060.

Closes jquerygh-1128
  • Loading branch information
ikarienator authored and ariya committed Mar 20, 2015
1 parent 70143d0 commit 9ec077c
Show file tree
Hide file tree
Showing 67 changed files with 5,090 additions and 88 deletions.
362 changes: 282 additions & 80 deletions esprima.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
([a]) => [0];
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
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
([a,b])=>0;
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
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
([a,...b])=>0;
Loading

0 comments on commit 9ec077c

Please sign in to comment.