mirror of https://github.com/kdl-org/kdl.git
Add explicit regex-set rules to hex unicode
document {1,3} ranges
This commit is contained in:
parent
a84dc3b44f
commit
e0486db378
|
|
@ -983,8 +983,13 @@ string-character :=
|
||||||
[^\\"] - disallowed-literal-code-points
|
[^\\"] - disallowed-literal-code-points
|
||||||
ws-escape := '\\' (unicode-space | newline)+
|
ws-escape := '\\' (unicode-space | newline)+
|
||||||
hex-digit := [0-9a-fA-F]
|
hex-digit := [0-9a-fA-F]
|
||||||
hex-unicode := [\u{0}-\u{10FFFF}] - surrogate // Unicode Scalar Value₁₆, leading 0s allowed as long as length ≤ 6
|
hex-unicode := hex-digit{1, 6} - surrogate - above-max-scalar // Unicode Scalar Value in hex₁₆, leading 0s allowed within length ≤ 6
|
||||||
surrogate := [\u{D800}-\u{DFFF}]
|
surrogate := [0]{0,2}[dD][8-9a-fA-F]hex-digit{2}
|
||||||
|
// U+D800-DFFF: D 8 00
|
||||||
|
// D F FF
|
||||||
|
above-max-scalar = [2-9a-fA-F]hex-digit{5} | [1][1-9a-fA-F]hex-digit{4}
|
||||||
|
// >U+10FFFF: >1 _____ 1 >0 ____
|
||||||
|
|
||||||
|
|
||||||
raw-string := '#' raw-string-quotes '#' | '#' raw-string '#'
|
raw-string := '#' raw-string-quotes '#' | '#' raw-string '#'
|
||||||
raw-string-quotes :=
|
raw-string-quotes :=
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
no "Even with leading 0s Unicode Scalar Value escapes must ≤6: \u{0123456}"
|
||||||
Loading…
Reference in New Issue