Skip to content
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

Fix parsing of async in for-of loops #3745

Merged
merged 1 commit into from
Mar 19, 2024
Merged

Fix parsing of async in for-of loops #3745

merged 1 commit into from
Mar 19, 2024

Conversation

raskad
Copy link
Member

@raskad raskad commented Mar 18, 2024

This PR fixes a syntax error in for-of loops.

Currently the lookahead for the pattern async of in a for-of loop errors also in normal for loops. In a normal for loop this pattern might also be an async arrow function. To fix this I also had to fix the parsing of async arrow functions to allow of as a binding identifier. I added a test for that, since there seems to be no 262 test.

@raskad raskad added bug Something isn't working parser Issues surrounding the parser labels Mar 18, 2024
@raskad raskad added this to the v0.18.1 milestone Mar 18, 2024
Copy link

github-actions bot commented Mar 18, 2024

Test262 conformance changes

Test result main count PR count difference
Total 50,268 50,268 0
Passed 42,774 42,775 +1
Ignored 1,391 1,391 0
Failed 6,103 6,102 -1
Panics 0 0 0
Conformance 85.09% 85.09% +0.00%
Fixed tests (1):
test/language/statements/for/head-init-async-of.js (previously Failed)

@raskad raskad requested a review from a team March 18, 2024 03:04
Copy link
Member

@HalidOdat HalidOdat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! :)

@HalidOdat HalidOdat requested a review from a team March 18, 2024 05:26
@jedel1043 jedel1043 added this pull request to the merge queue Mar 18, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Mar 18, 2024
@raskad raskad added this pull request to the merge queue Mar 18, 2024
Merged via the queue into main with commit 9e9d71f Mar 19, 2024
13 checks passed
@raskad raskad deleted the fix-for-of-async-var branch March 19, 2024 00:26
@raskad raskad modified the milestones: v0.18.1, v0.19.0 Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working parser Issues surrounding the parser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants