-
-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For a while, the code 'for (async of []);' is ambiguous in the JS standard. It's going to be made unambiguously a SyntaxError. Make quick-lint-js report an error for this code, treating 'async' as a variable name, and gracefully continue. Many other forms, such as 'for (async.prop of []);' and 'for (async of => {}; cond; update);' are unambiguous, and shouldn't result in any errors. This commit adds tests for these similar cases. Discussion on the ambiguity and its resolution: tc39/ecma262#2034
- Loading branch information
Showing
3 changed files
with
170 additions
and
14 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
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