-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-implement yield
parsing improvements
#3427
Conversation
56bb871
to
b66fc14
Compare
I've rebased this against the |
@rwaldron I'm thinking that since no one is actively working on the |
@jugglinmike I trust your intuition 👍 |
JSHint's parsing of `yield` expressions is derived from code first contributed by GitHub user "usrbincc." That user could not be reached to sign JSHint's Contributor License Agreement. Revert the user's contribution to the application logic (preserving the corresponding MIT-licensed test code) so that it may be re-written under the terms of the Contributor License Agreement. Revert the changes introduced by 88c862d
Re-implement the improvements reverted by the previous commit. Use distinct logic to differentiate this new implementation, including the following substantive improvements: - Correct the reported location of warning W093 ("Did you mean to return a conditional instead of an assignment?") - Permit the use of `yield` as an identifier outside of strict mode and generator function bodies - Remove inaccurate restriction on `yield` within Mozilla generator functions - Forward the context when parsing computed property names This patch introduces a new expected failure for the Test262 test suite. That case has been corrected in JSHint's `master` branch [1] and will be resolved when this branch is merged. [1] 38285cd
b66fc14
to
bb26490
Compare
That's much appreciated, Rick. This is rebased and ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!!
@caitp @rwaldron This is the latest in the series of rewrites (the prior patches along these lines were 6759ac9 and gh-3419).
Since the first commit intentionally regresses functionality, we should definitely use a merge commit to land this branch.
Commit messages: