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

Editorial: Eliminate 6 <p> elements that say when to apply early error rules #3266

Merged
merged 1 commit into from
Feb 22, 2024

Conversation

jmdyck
Copy link
Collaborator

@jmdyck jmdyck commented Jan 23, 2024

Normally, an early error rule consists of:

  • an <emu-grammar> (with 1 or more productions), and
  • a <ul> (with 1 or more "it is a Syntax Error" or "must cover" statements).

However, in a few cases, there is also a <p> that says when the rule is applied.

One such case is in 13.2.5.1, which PR #3227 will eliminate. This PR eliminates the remaining cases. These occur in 13.15.1, 13.15.5.1, and 14.7.5.1, and are all of the form:

<emu-grammar>
  (1 or more productions involving LeftHandSideExpression)
</emu-grammar>
<p>If |LeftHandSideExpression| is either an |ObjectLiteral| or
   an |ArrayLiteral|, the following Early Error rules are applied:</p>
<ul>
  <li>
    |LeftHandSideExpression| must cover an |AssignmentPattern|.
  </li>
</ul>
<p>If |LeftHandSideExpression| is neither an |ObjectLiteral| nor
     an |ArrayLiteral|, the following Early Error rule is applied:</p>
<ul>
  <li>
    It is a Syntax Error if AssignmentTargetType of
      |LeftHandSideExpression| is not ~simple~.
  </li>
</ul>

This PR takes each <p> and 'inlines' it into the subsequent <li>. (And then fuses the two <ul>.)

@michaelficarra michaelficarra added the ready to merge Editors believe this PR needs no further reviews, and is ready to land. label Feb 21, 2024
Specifically, eliminate 6 `<p>` elements that give a condition under which early error rules are applied.
@ljharb ljharb merged commit bb48543 into tc39:main Feb 22, 2024
7 checks passed
@jmdyck jmdyck deleted the kludgey_p branch February 25, 2024 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editorial change establishes editorial conventions ready to merge Editors believe this PR needs no further reviews, and is ready to land.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants