@@ -320,7 +320,8 @@ abstract class RegExp extends Expr {
320320 * Matches named character properties. For example:
321321 * - `\p{Space}`
322322 * - `\P{Digit}` upper-case P means inverted
323- * - `\p{^Word}` caret also means inverted
323+ * - `\p{^Word}` caret also means inverted (not supported in Swift `Regex` but it may be in
324+ * other regex parsers or in future versions of Swift).
324325 *
325326 * These can occur both inside and outside of character classes.
326327 */
@@ -343,7 +344,8 @@ abstract class RegExp extends Expr {
343344 /**
344345 * Holds if the named character property is inverted. Examples for which it holds:
345346 * - `\P{Digit}` upper-case P means inverted
346- * - `\p{^Word}` caret also means inverted
347+ * - `\p{^Word}` caret also means inverted (not supported in Swift `Regex` but it may be in
348+ * other regex parsers or in future versions of Swift).
347349 * - `[[:^digit:]]`
348350 *
349351 * Examples for which it doesn't hold:
@@ -381,8 +383,11 @@ abstract class RegExp extends Expr {
381383 // wide hex char \uhhhh
382384 this .getChar ( start + 1 ) = "u" and end = start + 6
383385 or
386+ // wide hex char \Uhhhhhhhh
387+ this .getChar ( start + 1 ) = "U" and end = start + 10
388+ or
384389 // escape not handled above; update when adding a new case
385- not this .getChar ( start + 1 ) in [ "x" , "u" ] and
390+ not this .getChar ( start + 1 ) in [ "x" , "u" , "U" ] and
386391 not exists ( this .getChar ( start + 1 ) .toInt ( ) ) and
387392 end = start + 2
388393 )
0 commit comments