mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
parent
92c073a9d1
commit
ee1d9217aa
Notes:
sideshowbarker
2024-07-19 00:30:09 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/ee1d9217aa8 Pull-request: https://github.com/SerenityOS/serenity/pull/4591 Issue: https://github.com/SerenityOS/serenity/issues/4583
2 changed files with 6 additions and 0 deletions
|
@ -741,6 +741,11 @@ bool ECMA262Parser::parse_assertion(ByteCode& stack, [[maybe_unused]] size_t& ma
|
|||
if (!try_skip("(?"))
|
||||
return false;
|
||||
|
||||
if (done()) {
|
||||
set_error(Error::InvalidCaptureGroup);
|
||||
return false;
|
||||
}
|
||||
|
||||
ByteCode assertion_stack;
|
||||
size_t length_dummy = 0;
|
||||
|
||||
|
|
|
@ -500,6 +500,7 @@ TEST_CASE(ECMA262_parse)
|
|||
{ "(?", regex::Error::InvalidCaptureGroup },
|
||||
{ "\\u1234", regex::Error::NoError, regex::ECMAScriptFlags::Unicode },
|
||||
{ "[\\u1234]", regex::Error::NoError, regex::ECMAScriptFlags::Unicode },
|
||||
{ ",(?", regex::Error::InvalidCaptureGroup }, // #4583
|
||||
};
|
||||
|
||||
for (auto& test : tests) {
|
||||
|
|
Loading…
Reference in a new issue