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

Move cover for void discards to more specific elements #9

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

rbuckton
Copy link
Collaborator

This moves the cover for void discards in destructuring out of UnaryExpression and into more specific elements where it can only be present:

  • Array Elements
  • Property Definitions
  • Extractor "arguments"

This approach aligns with how CoverInitializedName is handled in Object Literals.

This should hopefully address the cover grammar ambiguity with how await void is parsed in conjunction with the cover grammar for await using.

This also addresses an issue where we inadvertently parsed an Initializer after void in some destructuring contexts.

Fixes #5

Copy link

github-actions bot commented May 30, 2024

A preview of this PR can be found at https://tc39.es/proposal-discard-binding/pr/9.

@rbuckton
Copy link
Collaborator Author

rbuckton commented Jun 4, 2024

@waldemarhorwat, do you think you might have time to review this this week? I'd like to add Discards as a late agenda item, but only if this addresses your concerns.

@waldemarhorwat
Copy link

As far as I can tell, this seems to have fixed the void issue.

@rbuckton rbuckton merged commit 530b279 into main Jun 12, 2024
1 check passed
@rbuckton rbuckton deleted the cover-discard branch June 12, 2024 10:19
@rbuckton rbuckton mentioned this pull request Jun 15, 2024
rbuckton added a commit that referenced this pull request Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Grammar conflicts with explicit resource management
2 participants