Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 93db8886b0d38f019b6504805d078e07662f93f1
https://github.com/WebKit/WebKit/commit/93db8886b0d38f019b6504805d078e07662f93f1
Author: Michael Saboff <[email protected]>
Date: 2024-04-24 (Wed, 24 Apr 2024)
Changed paths:
M JSTests/stress/regexp-duplicate-named-captures.js
M Source/JavaScriptCore/yarr/YarrParser.h
Log Message:
-----------
Nested duplicate named capturing groups in regex is not syntax error
https://bugs.webkit.org/show_bug.cgi?id=272659
rdar://126863735
Reviewed by Alexey Shvayka.
Updated the record keeping of capture names in nested parenthesis and
disjunctions. Now we agregate all
group names seen in nested parenthesis and bubble them up to the cantaining
disjunction.
Added new test cases.
Also updated the syntax error testing code to make sure that an expected error
is actually thrown.
This change uncovered an unrelated test case that needed updating with the
addition of a flag.
* JSTests/stress/regexp-duplicate-named-captures.js:
(testRegExpSyntaxError):
* Source/JavaScriptCore/yarr/YarrParser.h:
(JSC::Yarr::Parser::NamedCaptureGroups::NamedCaptureGroups):
(JSC::Yarr::Parser::NamedCaptureGroups::reset):
(JSC::Yarr::Parser::NamedCaptureGroups::nextAlternative):
(JSC::Yarr::Parser::NamedCaptureGroups::pushParenthesis):
(JSC::Yarr::Parser::NamedCaptureGroups::popParenthesis):
(JSC::Yarr::Parser::NamedCaptureGroups::add):
Canonical link: https://commits.webkit.org/277928@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes