From bb48543c298e014ada4c02760c4172a798ba86c8 Mon Sep 17 00:00:00 2001 From: Michael Dyck Date: Wed, 21 Feb 2024 16:25:21 -0800 Subject: [PATCH] Editorial: Consistify early error rules (#3266) Specifically, eliminate 6 `

` elements that give a condition under which early error rules are applied. --- spec.html | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/spec.html b/spec.html index 2b3f0694f1..2f3f62700c 100644 --- a/spec.html +++ b/spec.html @@ -20452,16 +20452,12 @@

Syntax

Static Semantics: Early Errors

AssignmentExpression : LeftHandSideExpression `=` AssignmentExpression -

If |LeftHandSideExpression| is either an |ObjectLiteral| or an |ArrayLiteral|, the following Early Error rules are applied:

-

If |LeftHandSideExpression| is neither an |ObjectLiteral| nor an |ArrayLiteral|, the following Early Error rule is applied:

- @@ -20725,16 +20721,12 @@

Static Semantics: Early Errors

DestructuringAssignmentTarget : LeftHandSideExpression -

If |LeftHandSideExpression| is either an |ObjectLiteral| or an |ArrayLiteral|, the following Early Error rules are applied:

  • - |LeftHandSideExpression| must cover an |AssignmentPattern|. + If |LeftHandSideExpression| is either an |ObjectLiteral| or an |ArrayLiteral|, |LeftHandSideExpression| must cover an |AssignmentPattern|.
  • -
-

If |LeftHandSideExpression| is neither an |ObjectLiteral| nor an |ArrayLiteral|, the following Early Error rule is applied:

-
  • - 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~.
@@ -21921,16 +21913,12 @@

Static Semantics: Early Errors

`for` `(` LeftHandSideExpression `of` AssignmentExpression `)` Statement `for` `await` `(` LeftHandSideExpression `of` AssignmentExpression `)` Statement -

If |LeftHandSideExpression| is either an |ObjectLiteral| or an |ArrayLiteral|, the following Early Error rules are applied:

-

If |LeftHandSideExpression| is neither an |ObjectLiteral| nor an |ArrayLiteral|, the following Early Error rule is applied:

-