Skip to content

Commit

Permalink
Editorial: Consistify early error rules (#3266)
Browse files Browse the repository at this point in the history
Specifically, eliminate 6 `<p>` elements that give a condition under which early error rules are applied.
  • Loading branch information
jmdyck authored and ljharb committed Feb 22, 2024
1 parent 6e2a6b6 commit bb48543
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -20452,16 +20452,12 @@ <h2>Syntax</h2>
<emu-clause id="sec-assignment-operators-static-semantics-early-errors">
<h1>Static Semantics: Early Errors</h1>
<emu-grammar>AssignmentExpression : LeftHandSideExpression `=` AssignmentExpression</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|.
If |LeftHandSideExpression| is either an |ObjectLiteral| or an |ArrayLiteral|, |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~.
If |LeftHandSideExpression| is neither an |ObjectLiteral| nor an |ArrayLiteral|, it is a Syntax Error if AssignmentTargetType of |LeftHandSideExpression| is not ~simple~.
</li>
</ul>
<emu-grammar>
Expand Down Expand Up @@ -20725,16 +20721,12 @@ <h1>Static Semantics: Early Errors</h1>
</li>
</ul>
<emu-grammar>DestructuringAssignmentTarget : 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|.
If |LeftHandSideExpression| is either an |ObjectLiteral| or an |ArrayLiteral|, |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~.
If |LeftHandSideExpression| is neither an |ObjectLiteral| nor an |ArrayLiteral|, it is a Syntax Error if AssignmentTargetType of |LeftHandSideExpression| is not ~simple~.
</li>
</ul>
</emu-clause>
Expand Down Expand Up @@ -21921,16 +21913,12 @@ <h1>Static Semantics: Early Errors</h1>
`for` `(` LeftHandSideExpression `of` AssignmentExpression `)` Statement
`for` `await` `(` LeftHandSideExpression `of` AssignmentExpression `)` Statement
</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|.
If |LeftHandSideExpression| is either an |ObjectLiteral| or an |ArrayLiteral|, |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~.
If |LeftHandSideExpression| is neither an |ObjectLiteral| nor an |ArrayLiteral|, it is a Syntax Error if AssignmentTargetType of |LeftHandSideExpression| is not ~simple~.
</li>
</ul>
<emu-grammar>
Expand Down

0 comments on commit bb48543

Please sign in to comment.