From 7efaa50c81d0a43ead0b158697ed1b341f76e76a Mon Sep 17 00:00:00 2001 From: Ross Kirsling Date: Thu, 30 Jul 2020 11:13:30 -0700 Subject: [PATCH] Normative: Specify \8 and \9 in sloppy non-template strings (#2054) --- spec.html | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/spec.html b/spec.html index bcfd4efed5..9e99d7cc8c 100644 --- a/spec.html +++ b/spec.html @@ -11508,7 +11508,7 @@

Syntax

HexEscapeSequence UnicodeEscapeSequence -

A conforming implementation, when processing strict mode code, must not extend the syntax of |EscapeSequence| to include as described in .

+

A conforming implementation, when processing strict mode code, must not extend the syntax of |EscapeSequence| to include or as described in .

CharacterEscapeSequence :: SingleEscapeCharacter @@ -24943,7 +24943,7 @@

Forbidden Extensions

When processing strict mode code, the syntax of |NumericLiteral| must not be extended to include and the syntax of |DecimalIntegerLiteral| must not be extended to include as described in .
  • - |TemplateCharacter| must not be extended to include as defined in . + |TemplateCharacter| must not be extended to include or as defined in .
  • When processing strict mode code, the extensions defined in , , , and must not be supported. @@ -42477,6 +42477,7 @@

    Syntax

    EscapeSequence :: CharacterEscapeSequence LegacyOctalEscapeSequence + NonOctalDecimalEscapeSequence HexEscapeSequence UnicodeEscapeSequence @@ -42491,15 +42492,15 @@

    Syntax

    FourToSeven :: one of `4` `5` `6` `7` + + NonOctalDecimalEscapeSequence :: one of + `8` `9`

    This definition of |EscapeSequence| is not used in strict mode or when parsing |TemplateCharacter|.

    Static Semantics

      -
    • - The SV of EscapeSequence :: LegacyOctalEscapeSequence is the SV of |LegacyOctalEscapeSequence|. -
    • The SV of LegacyOctalEscapeSequence :: OctalDigit is the code unit whose value is the MV of |OctalDigit|.
    • @@ -42512,6 +42513,12 @@

      Static Semantics

    • The SV of LegacyOctalEscapeSequence :: ZeroToThree OctalDigit OctalDigit is the code unit whose value is (64 (that is, 82) times the MV of |ZeroToThree|) plus (8 times the MV of the first |OctalDigit|) plus the MV of the second |OctalDigit|.
    • +
    • + The SV of NonOctalDecimalEscapeSequence :: `8` is the code unit 0x0038 (DIGIT EIGHT). +
    • +
    • + The SV of NonOctalDecimalEscapeSequence :: `9` is the code unit 0x0039 (DIGIT NINE). +
    • The MV of ZeroToThree :: `0` is 0.
    • @@ -43706,7 +43713,7 @@

      The Strict Mode of ECMAScript

      A conforming implementation, when processing strict mode code, must not extend, as described in , the syntax of |NumericLiteral| to include |LegacyOctalIntegerLiteral|, nor extend the syntax of |DecimalIntegerLiteral| to include |NonOctalDecimalIntegerLiteral|.
    • - A conforming implementation, when processing strict mode code, may not extend the syntax of |EscapeSequence| to include |LegacyOctalEscapeSequence| as described in . + A conforming implementation, when processing strict mode code, may not extend the syntax of |EscapeSequence| to include or as described in .
    • Assignment to an undeclared identifier or otherwise unresolvable reference does not create a property in the global object. When a simple assignment occurs within strict mode code, its |LeftHandSideExpression| must not evaluate to an unresolvable Reference. If it does a *ReferenceError* exception is thrown (). The |LeftHandSideExpression| also may not be a reference to a data property with the attribute value { [[Writable]]: *false* }, to an accessor property with the attribute value { [[Set]]: *undefined* }, nor to a non-existent property of an object whose [[Extensible]] internal slot has the value *false*. In these cases a `TypeError` exception is thrown ().