tc39 / proposal-extractors

Extractors for ECMAScript
http://tc39.es/proposal-extractors/
MIT License
200 stars 3 forks source link

ExtractorAssignmentPattern elisions #23

Open waldemarhorwat opened 4 months ago

waldemarhorwat commented 4 months ago

The ExtractorAssignmentPattern grammar includes elisions inside parameter lists, but it's a cover grammar for which the original grammar doesn't allow elisions, so one can't actually use elisions here. What is the intent here?

rbuckton commented 3 months ago

Essentially, there are two options to consider:

  1. Remove Elision from ExtractorAssignmentPattern and instead depend on discards from the Discard (void) Bindings proposal.
  2. Introduce Elision into a cover grammar for Arguments.

Ultimately, the choice for Elision may depend on the direction of the Discard (void) Bindings proposal, and as such may change in Stage 2 to match. We could always choose to follow (2) here, since we will want to support (1) regardless.