diff --git a/spec.emu b/spec.emu index fc1e600..4ab577a 100644 --- a/spec.emu +++ b/spec.emu @@ -15,26 +15,6 @@ contributors: Jordan Harband

RegExp (Regular Expression) Objects

- -

Patterns

- -

Syntax

-

Each `\\u` |HexTrailSurrogate| for which the choice of associated `u` |HexLeadSurrogate| is ambiguous shall be associated with the nearest possible `u` |HexLeadSurrogate| that would otherwise have no corresponding `\\u` |HexTrailSurrogate|.

- - HexNonSurrogate :: - Hex4Digits [> but only if the MV of |Hex4Digits| is not in the inclusive interval from 0xD800 to 0xDFFF] - - IdentityEscape[UnicodeMode] :: - [+UnicodeMode] SyntaxCharacter - [+UnicodeMode] `/` `,` `-` `=` `<` `>` `#` `&` `!` `%` `:` `;` `@` `~` `'` `"` `\`` - [+UnicodeMode] WhiteSpace - [~UnicodeMode] SourceCharacter but not UnicodeIDContinue - - DecimalEscape :: - NonZeroDigit DecimalDigits[~Sep]? [lookahead ∉ DecimalDigit] - -
-

Properties of the RegExp Constructor

@@ -55,9 +35,14 @@ contributors: Jordan Harband 1. Append code unit U+005C (REVERSE SOLIDUS) to _escapedList_. 1. Append code unit U+0078 (LATIN SMALL LETTER X) to _escapedList_. 1. Append code unit U+0033 (DIGIT THREE) to _escapedList_. + 1. Append _c_ to _escapedList_. 1. Else if _toEscape_ contains _c_ or _c_ is matched by |WhiteSpace|, then 1. Append code unit U+005C (REVERSE SOLIDUS) to _escapedList_. - 1. Append _c_ to _escapedList_. + 1. Append code unit U+0078 (LATIN SMALL LETTER X) to _escapedList_. + 1. Let _code_ be ℝ(! Call(%parseInt%, CodePointsToString(« _c_ »), « *16*𝔽 »)) - 36. + 1. Append the code unit whose numeric value is _code_ to _escapedList_. + 1. Else, + 1. Append _c_ to _escapedList_. 1. Return CodePointsToString(_escapedList_).