Skip to content

Commit

Permalink
Merge pull request #99 from Marsup/no-argument-setter
Browse files Browse the repository at this point in the history
Fix: bad error in parsing invalid class setter (fixes #98)
  • Loading branch information
nzakas committed Mar 21, 2015
2 parents 969aecf + 03b1fa4 commit 12ebb32
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion espree.js
Original file line number Diff line number Diff line change
Expand Up @@ -2435,7 +2435,7 @@ function tryParseMethodDefinition(token, key, computed, marker) {
rest: null
};
if (match(")")) {
throwErrorTolerant(lookahead, Messages.UnexpectedToken);
throwErrorTolerant(lookahead, Messages.UnexpectedToken, lookahead.value);
} else {
parseParam(options);
if (options.defaultCount === 0) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
"index": 18,
"lineNumber": 1,
"column": 19,
"message": "Line 1: Unexpected token )",
"description": "Unexpected token )"
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
class A { set foo() {}};

0 comments on commit 12ebb32

Please sign in to comment.