From 9c55324fb093c6f426e1a515e04c2bf9788847d1 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Wed, 11 Oct 2023 23:18:46 -0700 Subject: [PATCH] [spec] make `\` escapes legal in u/v mode Fixes #52. Fixes #55. --- spec.emu | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/spec.emu b/spec.emu index 100535b..30e8812 100644 --- a/spec.emu +++ b/spec.emu @@ -15,6 +15,25 @@ 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] SourceCharacter but not UnicodeIDContinue + + DecimalEscape :: + NonZeroDigit DecimalDigits[~Sep]? [lookahead ∉ DecimalDigit] + +
+

Properties of the RegExp Constructor