mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:27:43 +00:00
LibRegex: Allow quantifiers after quantifiable assertions
While quantifying assertions is very much meaningless, the specification allows them with annex B's extended grammar for browsers, so read and apply the quantifiers. Fixes #12373.
This commit is contained in:
parent
6a1ae4c185
commit
627bbee055
2 changed files with 4 additions and 0 deletions
|
@ -1083,6 +1083,9 @@ bool ECMA262Parser::parse_assertion(ByteCode& stack, [[maybe_unused]] size_t& ma
|
|||
if (m_should_use_browser_extended_grammar) {
|
||||
if (!unicode) {
|
||||
if (parse_quantifiable_assertion(assertion_stack, match_length_minimum, named)) {
|
||||
if (!parse_quantifier(assertion_stack, match_length_minimum, unicode, named))
|
||||
return false;
|
||||
|
||||
stack.extend(move(assertion_stack));
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue