Skip to content

Commit

Permalink
Supports cover grammar related destructuring
Browse files Browse the repository at this point in the history
Closes jquery#1045.
Closes jquery#1060.
  • Loading branch information
ikarienator committed Mar 18, 2015
1 parent 0b3658b commit 698e334
Show file tree
Hide file tree
Showing 65 changed files with 4,886 additions and 86 deletions.
360 changes: 282 additions & 78 deletions esprima.js

Large diffs are not rendered by default.

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

Please sign in to comment.