[7.0] Change RestProperty/SpreadProperty to RestElement/SpreadElement (#384)

* [7.0] Change RestProperty/SpreadProperty to RestElement/SpreadElement

* Fix rest element in array pattern at invalid location
This commit is contained in:
Henry Zhu
2017-02-28 12:31:58 -05:00
committed by GitHub
parent fe2d2a99ea
commit 8d90dc0d10
17 changed files with 48 additions and 53 deletions

View File

@@ -0,0 +1,3 @@
{
"throws": "The rest element has to be the last element when destructuring (1:1)"
}

View File

@@ -160,7 +160,7 @@
}
},
{
"type": "RestProperty",
"type": "RestElement",
"start": 21,
"end": 29,
"loc": {
@@ -218,4 +218,4 @@
],
"directives": []
}
}
}

View File

@@ -1,3 +0,0 @@
{
"throws": "Invalid left-hand side in assignment expression (1:1)"
}

View File

@@ -73,7 +73,7 @@
},
"properties": [
{
"type": "RestProperty",
"type": "RestElement",
"start": 5,
"end": 9,
"loc": {
@@ -128,4 +128,4 @@
],
"directives": []
}
}
}

View File

@@ -208,4 +208,4 @@
],
"directives": []
}
}
}

View File

@@ -73,7 +73,7 @@
},
"properties": [
{
"type": "RestProperty",
"type": "RestElement",
"start": 5,
"end": 11,
"loc": {
@@ -240,4 +240,4 @@
],
"directives": []
}
}
}

View File

@@ -73,7 +73,7 @@
},
"properties": [
{
"type": "RestProperty",
"type": "RestElement",
"start": 6,
"end": 18,
"loc": {
@@ -275,4 +275,4 @@
],
"directives": []
}
}
}

View File

@@ -123,7 +123,7 @@
}
},
{
"type": "RestProperty",
"type": "RestElement",
"start": 8,
"end": 12,
"loc": {
@@ -178,4 +178,4 @@
],
"directives": []
}
}
}

View File

@@ -126,7 +126,7 @@
}
},
{
"type": "RestProperty",
"type": "RestElement",
"start": 14,
"end": 18,
"loc": {
@@ -184,4 +184,4 @@
],
"directives": []
}
}
}

View File

@@ -89,7 +89,7 @@
},
"properties": [
{
"type": "SpreadProperty",
"type": "SpreadElement",
"start": 9,
"end": 13,
"loc": {
@@ -127,4 +127,4 @@
}
]
}
}
}

View File

@@ -139,7 +139,7 @@
}
},
{
"type": "SpreadProperty",
"type": "SpreadElement",
"start": 8,
"end": 12,
"loc": {
@@ -176,4 +176,4 @@
],
"directives": []
}
}
}

View File

@@ -113,7 +113,7 @@
}
},
{
"type": "SpreadProperty",
"type": "SpreadElement",
"start": 5,
"end": 9,
"loc": {
@@ -200,7 +200,7 @@
}
},
{
"type": "SpreadProperty",
"type": "SpreadElement",
"start": 14,
"end": 18,
"loc": {
@@ -296,4 +296,4 @@
],
"directives": []
}
}
}