diff --git a/spec.html b/spec.html
index 43f39fe00a..c02bcd844f 100644
--- a/spec.html
+++ b/spec.html
@@ -16163,8 +16163,6 @@
Names and Keywords
This standard specifies specific code point additions: U+0024 (DOLLAR SIGN) and U+005F (LOW LINE) are permitted anywhere in an |IdentifierName|, and the code points U+200C (ZERO WIDTH NON-JOINER) and U+200D (ZERO WIDTH JOINER) are permitted anywhere after the first code point of an |IdentifierName|.
- Unicode escape sequences are permitted in an |IdentifierName|, where they contribute a single Unicode code point to the |IdentifierName|. The code point is expressed by the |CodePoint| of the |UnicodeEscapeSequence| (see ). The `\\` preceding the |UnicodeEscapeSequence| and the `u` and `{ }` code units, if they appear, do not contribute code points to the |IdentifierName|. A |UnicodeEscapeSequence| cannot be used to put a code point into an |IdentifierName| that would otherwise be illegal. In other words, if a `\\` |UnicodeEscapeSequence| sequence were replaced by the |SourceCharacter| it contributes, the result must still be a valid |IdentifierName| that has the exact same sequence of |SourceCharacter| elements as the original |IdentifierName|. All interpretations of |IdentifierName| within this specification are based upon their actual code points regardless of whether or not an escape sequence was used to contribute any particular code point.
- Two |IdentifierName|s that are canonically equivalent according to the Unicode standard are not equal unless, after replacement of each |UnicodeEscapeSequence|, they are represented by the exact same sequence of code points.
Syntax
PrivateIdentifier ::
@@ -16175,15 +16173,21 @@ Syntax
IdentifierName IdentifierPart
IdentifierStart ::
+ IdentifierStartChar
+ `\` UnicodeEscapeSequence
+
+ IdentifierPart ::
+ IdentifierPartChar
+ `\` UnicodeEscapeSequence
+
+ IdentifierStartChar ::
UnicodeIDStart
`$`
`_`
- `\` UnicodeEscapeSequence
- IdentifierPart ::
+ IdentifierPartChar ::
UnicodeIDContinue
`$`
- `\` UnicodeEscapeSequence
<ZWNJ>
<ZWJ>
@@ -16203,22 +16207,63 @@ Syntax
Identifier Names
+ Unicode escape sequences are permitted in an |IdentifierName|, where they contribute a single Unicode code point to the |IdentifierName|. The code point is expressed by the |CodePoint| of the |UnicodeEscapeSequence| (see ). The `\\` preceding the |UnicodeEscapeSequence| and the `u` and `{ }` code units, if they appear, do not contribute code points to the |IdentifierName|. A |UnicodeEscapeSequence| cannot be used to put a code point into an |IdentifierName| that would otherwise be illegal. In other words, if a `\\` |UnicodeEscapeSequence| sequence were replaced by the |SourceCharacter| it contributes, the result must still be a valid |IdentifierName| that has the exact same sequence of |SourceCharacter| elements as the original |IdentifierName|. All interpretations of |IdentifierName| within this specification are based upon their actual code points regardless of whether or not an escape sequence was used to contribute any particular code point.
+ Two |IdentifierName|s that are canonically equivalent according to the Unicode standard are not equal unless, after replacement of each |UnicodeEscapeSequence|, they are represented by the exact same sequence of code points.
Static Semantics: Early Errors
IdentifierStart :: `\` UnicodeEscapeSequence
-
- It is a Syntax Error if the SV of |UnicodeEscapeSequence| is none of *"$"*, or *"_"*, or ! UTF16EncodeCodePoint(_cp_) for some Unicode code point _cp_ matched by the |UnicodeIDStart| lexical grammar production.
+ It is a Syntax Error if IdentifierCodePoint of |UnicodeEscapeSequence| is not some Unicode code point matched by the |IdentifierStartChar| lexical grammar production.
IdentifierPart :: `\` UnicodeEscapeSequence
-
- It is a Syntax Error if the SV of |UnicodeEscapeSequence| is none of *"$"*, *"_"*, ! UTF16EncodeCodePoint(<ZWNJ>), ! UTF16EncodeCodePoint(<ZWJ>), or ! UTF16EncodeCodePoint(_cp_) for some Unicode code point _cp_ that would be matched by the |UnicodeIDContinue| lexical grammar production.
+ It is a Syntax Error if IdentifierCodePoint of |UnicodeEscapeSequence| is not some Unicode code point matched by the |IdentifierPartChar| lexical grammar production.
+
+
+ Static Semantics: IdentifierCodePoints
+
+ IdentifierName :: IdentifierStart
+
+ 1. Let _cp_ be IdentifierCodePoint of |IdentifierStart|.
+ 1. Return « _cp_ ».
+
+ IdentifierName :: IdentifierName IdentifierPart
+
+ 1. Let _cps_ be IdentifierCodePoints of the derived |IdentifierName|.
+ 1. Let _cp_ be IdentifierCodePoint of |IdentifierPart|.
+ 1. Return the list-concatenation of _cps_ and « _cp_ ».
+
+
+
+
+ Static Semantics: IdentifierCodePoint
+
+ IdentifierStart :: IdentifierStartChar
+
+ 1. Return the code point matched by |IdentifierStartChar|.
+
+ IdentifierPart :: IdentifierPartChar
+
+ 1. Return the code point matched by |IdentifierPartChar|.
+
+ UnicodeEscapeSequence :: `u` Hex4Digits
+
+ 1. Return the code point whose numeric value is the MV of |Hex4Digits|.
+
+ UnicodeEscapeSequence :: `u{` CodePoint `}`
+
+ 1. Return the code point whose numeric value is the MV of |CodePoint|.
+
+
@@ -17057,22 +17102,12 @@ Syntax
RegularExpressionFlags ::
[empty]
- RegularExpressionFlags IdentifierPart
+ RegularExpressionFlags IdentifierPartChar
Regular expression literals may not be empty; instead of representing an empty regular expression literal, the code unit sequence `//` starts a single-line comment. To specify an empty regular expression, use: `/(?:)/`.
-
- Static Semantics: Early Errors
- RegularExpressionFlags :: RegularExpressionFlags IdentifierPart
-
- -
- It is a Syntax Error if |IdentifierPart| contains a Unicode escape sequence.
-
-
-
-
Static Semantics: BodyText
+
+
+ Static Semantics: RegExpIdentifierCodePoints
+
+ RegExpIdentifierName :: RegExpIdentifierStart
+
+ 1. Let _cp_ be RegExpIdentifierCodePoint of |RegExpIdentifierStart|.
+ 1. Return « _cp_ ».
+
+ RegExpIdentifierName :: RegExpIdentifierName RegExpIdentifierPart
+
+ 1. Let _cps_ be RegExpIdentifierCodePoints of the derived |RegExpIdentifierName|.
+ 1. Let _cp_ be RegExpIdentifierCodePoint of |RegExpIdentifierPart|.
+ 1. Return the list-concatenation of _cps_ and « _cp_ ».
+
+
+
+
+ Static Semantics: RegExpIdentifierCodePoint
+
+ RegExpIdentifierStart :: IdentifierStartChar
+
+ 1. Return the code point matched by |IdentifierStartChar|.
+
+ RegExpIdentifierPart :: IdentifierPartChar
+
+ 1. Return the code point matched by |IdentifierPartChar|.
+
+
+ RegExpIdentifierStart :: `\` RegExpUnicodeEscapeSequence
+
+ RegExpIdentifierPart :: `\` RegExpUnicodeEscapeSequence
+
+
+ 1. Return the code point whose numeric value is the CharacterValue of |RegExpUnicodeEscapeSequence|.
+
+
+ RegExpIdentifierStart :: UnicodeLeadSurrogate UnicodeTrailSurrogate
+
+ RegExpIdentifierPart :: UnicodeLeadSurrogate UnicodeTrailSurrogate
+
+
+ 1. Let _lead_ be the code unit whose numeric value is that of the code point matched by |UnicodeLeadSurrogate|.
+ 1. Let _trail_ be the code unit whose numeric value is that of the code point matched by |UnicodeTrailSurrogate|.
+ 1. Return UTF16SurrogatePairToCodePoint(_lead_, _trail_).
+
+
@@ -46020,6 +46097,8 @@ Lexical Grammar
+
+