Skip to content

Commit

Permalink
Fix \u parsing in v sets
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed Dec 22, 2021
1 parent 359e160 commit b3456d7
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
2 changes: 1 addition & 1 deletion parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,7 @@
// NestedClass ::
// ...
// \ CharacterClassEscape[+U, +V]
if (res = parseCharacterClassEscape()) {
if (res = parseClassEscape()) {
start = res;
} else if (res = parseClassCharacterEscapedHelper()) {
return res;
Expand Down
40 changes: 40 additions & 0 deletions test/test-data-unicode-set.json
Original file line number Diff line number Diff line change
Expand Up @@ -1521,5 +1521,45 @@
11
],
"raw": "[\\u{14630}]"
},
"[\\u{14630}-\\u{14633}]": {
"type": "characterClass",
"kind": "union",
"body": [
{
"type": "characterClassRange",
"min": {
"type": "value",
"kind": "unicodeCodePointEscape",
"codePoint": 83504,
"range": [
1,
10
],
"raw": "\\u{14630}"
},
"max": {
"type": "value",
"kind": "unicodeCodePointEscape",
"codePoint": 83507,
"range": [
11,
20
],
"raw": "\\u{14633}"
},
"range": [
1,
20
],
"raw": "\\u{14630}-\\u{14633}"
}
],
"negative": false,
"range": [
0,
21
],
"raw": "[\\u{14630}-\\u{14633}]"
}
}

0 comments on commit b3456d7

Please sign in to comment.