\b escapes inside character classes should be valid in Unicode patterns
authorshvaikalesh@gmail.com <shvaikalesh@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Mar 2020 11:11:47 +0000 (11:11 +0000)
committershvaikalesh@gmail.com <shvaikalesh@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Mar 2020 11:11:47 +0000 (11:11 +0000)
commitfc5864f47b71e7d215df22e70694839f3cc977f7
tree47e063cf8e97c4e3102b958d3fe222c7a6fbb273
parent49241d79635d7c3c1ad3766ca1949860ad80afea
\b escapes inside character classes should be valid in Unicode patterns
https://bugs.webkit.org/show_bug.cgi?id=209528

Reviewed by Darin Adler.

JSTests:

* test262/expectations.yaml: Mark 2 test cases as passing.

Source/JavaScriptCore:

This change removes isIdentityEscapeAnError('b') check, allowing \b escapes
inside character classes in Unicode patterns match U+0008 (BACKSPACE) characters,
aligning JSC with V8 and SpiderMonkey.

Grammar: https://tc39.es/ecma262/#prod-ClassEscape
('b' comes before CharacterEscape :: IdentityEscape)

* yarr/YarrParser.h:
(JSC::Yarr::Parser::parseEscape):

LayoutTests:

* js/regexp-unicode-expected.txt:
* js/script-tests/regexp-unicode.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258976 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/test262/expectations.yaml
LayoutTests/ChangeLog
LayoutTests/js/regexp-unicode-expected.txt
LayoutTests/js/script-tests/regexp-unicode.js
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/yarr/YarrParser.h