Skip to content
This repository has been archived by the owner on May 19, 2018. It is now read-only.

Commit

Permalink
Revert "Temporary rollback for erroring on trailing comma with spread (
Browse files Browse the repository at this point in the history
…#154)"

This reverts commit 5bac6e8.
  • Loading branch information
danez committed Jan 12, 2017
1 parent 0037351 commit 954b7f5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 246 deletions.
4 changes: 1 addition & 3 deletions src/parser/expression.js
Original file line number Diff line number Diff line change
Expand Up @@ -749,9 +749,7 @@ pp.parseObj = function (isPattern, refShorthandDefaultPos) {
} else if (this.eat(tt.braceR)) {
break;
} else if (this.match(tt.comma) && this.lookahead().type === tt.braceR) {
// TODO: temporary rollback
// this.unexpected(position, "A trailing comma is not permitted after the rest element");
continue;
this.unexpected(position, "A trailing comma is not permitted after the rest element");
} else {
firstRestLocation = position;
continue;
Expand Down
243 changes: 0 additions & 243 deletions test/fixtures/experimental/object-rest-spread/8/expected.json

This file was deleted.

3 changes: 3 additions & 0 deletions test/fixtures/experimental/object-rest-spread/8/options.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"throws": "A trailing comma is not permitted after the rest element (1:16)"
}

0 comments on commit 954b7f5

Please sign in to comment.