Implement support for \u escapes

This commit is contained in:
Petri Lehtinen
2009-07-14 20:47:57 +03:00
parent a0435e3061
commit 9240146c10
5 changed files with 152 additions and 13 deletions

20
test/testdata/invalid vendored
View File

@@ -136,3 +136,23 @@ invalid token near '-0'
====
1
control character 0x9 near '"'
========
["\u0000 (null byte not allowed)"]
====
1
\u0000 is not allowed
========
["\uDADA (first surrogate without the second)"]
====
1
invalid Unicode '\uDADA'
========
["\uD888\u3210 (first surrogate and invalid second surrogate)"]
====
1
invalid Unicode '\uD888\u3210'
========
["\uDFAA (second surrogate on it's own)"]
====
1
invalid Unicode '\uDFAA'