Exclude hex above max Unicode Scalar Value

simplify surrogate regex to use ranges
This commit is contained in:
eugenesvk 2025-01-21 13:51:02 +07:00
parent 7322f37800
commit aa9a4439a5
3 changed files with 4 additions and 4 deletions

View File

@ -983,10 +983,8 @@ string-character :=
[^\\"] - disallowed-literal-code-points
ws-escape := '\\' (unicode-space | newline)+
hex-digit := [0-9a-fA-F]
hex-unicode := hex-digit{1, 6} - surrogates
surrogates := [dD][8-9a-fA-F]hex-digit{2}
// U+D800-DFFF: D 8 00
// D F FF
hex-unicode := [\u{0}-\u{10FFFF}] - surrogate // Unicode Scalar Value₁₆
surrogate := [\u{D800}-\u{DFFF}]
raw-string := '#' raw-string-quotes '#' | '#' raw-string '#'
raw-string-quotes :=

View File

@ -0,0 +1 @@
no "Higher than max Unicode Scalar Value \u{10FFFF} \u{11FFFF}"

View File

@ -0,0 +1 @@
no "Non-canonical format for Unicode Scalar Value with extra 0s: \u{00FFFF} instead of \u{FFFF}"