From 3846b66aebfc70d5bd2dfdc6a4ce8fabf7c926f9 Mon Sep 17 00:00:00 2001 From: Michael Dyck Date: Mon, 22 Jan 2024 21:13:55 -0500 Subject: [PATCH] Editorial: Consistify early error rules 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 a391ee17d15..40d5a4e5d3b 100644 --- a/spec.html +++ b/spec.html @@ -20530,16 +20530,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:

- @@ -20803,16 +20799,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~.
@@ -22012,16 +22004,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:

-