-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[[FIX]] Interpret "object rest" ident as a binding
Previously, JSHint interpreted token sequences following the "object rest" operator as expressions. As noted in the in-line comment, this was done to improve the chance of recovery in response to a common programming error. Unfortunately, it also caused valid syntax to be misinterpreted--the expected identifier was treated as a IdentifierReference instead of a BindingIdentifier. Update the parsing strategy to use the expression parsing fallback only when the input is known to be invalid.
- Loading branch information
1 parent
143bce8
commit c0e9a5b
Showing
2 changed files
with
11 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters