[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

@@ -941,7 +941,7 @@ pp.checkDeclaration = function(node) {
}
} else if (node.type === "ObjectProperty") {
this.checkDeclaration(node.value);
} else if (node.type === "RestElement" || node.type === "RestProperty") {
} else if (node.type === "RestElement") {
this.checkDeclaration(node.argument);
} else if (node.type === "Identifier") {
this.checkDuplicateExports(node, node.name);