[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:
3
test/fixtures/es2015/array-rest-spread/invalid-location/options.json
vendored
Normal file
3
test/fixtures/es2015/array-rest-spread/invalid-location/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"throws": "The rest element has to be the last element when destructuring (1:1)"
|
||||
}
|
||||
@@ -160,7 +160,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "RestProperty",
|
||||
"type": "RestElement",
|
||||
"start": 21,
|
||||
"end": 29,
|
||||
"loc": {
|
||||
@@ -218,4 +218,4 @@
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"throws": "Invalid left-hand side in assignment expression (1:1)"
|
||||
}
|
||||
@@ -73,7 +73,7 @@
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"type": "RestProperty",
|
||||
"type": "RestElement",
|
||||
"start": 5,
|
||||
"end": 9,
|
||||
"loc": {
|
||||
@@ -128,4 +128,4 @@
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,4 +208,4 @@
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"type": "RestProperty",
|
||||
"type": "RestElement",
|
||||
"start": 5,
|
||||
"end": 11,
|
||||
"loc": {
|
||||
@@ -240,4 +240,4 @@
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"type": "RestProperty",
|
||||
"type": "RestElement",
|
||||
"start": 6,
|
||||
"end": 18,
|
||||
"loc": {
|
||||
@@ -275,4 +275,4 @@
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "RestProperty",
|
||||
"type": "RestElement",
|
||||
"start": 8,
|
||||
"end": 12,
|
||||
"loc": {
|
||||
@@ -178,4 +178,4 @@
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "RestProperty",
|
||||
"type": "RestElement",
|
||||
"start": 14,
|
||||
"end": 18,
|
||||
"loc": {
|
||||
@@ -184,4 +184,4 @@
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"type": "SpreadProperty",
|
||||
"type": "SpreadElement",
|
||||
"start": 9,
|
||||
"end": 13,
|
||||
"loc": {
|
||||
@@ -127,4 +127,4 @@
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "SpreadProperty",
|
||||
"type": "SpreadElement",
|
||||
"start": 8,
|
||||
"end": 12,
|
||||
"loc": {
|
||||
@@ -176,4 +176,4 @@
|
||||
],
|
||||
"directives": []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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": []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user