mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-21 18:00:16 +00:00
parent
91bf3dc7fe
commit
e0ac85288e
Notes:
sideshowbarker
2024-07-18 21:53:35 +09:00
Author: https://github.com/alimpfard
Commit: e0ac85288e
Pull-request: https://github.com/SerenityOS/serenity/pull/5538
Issue: https://github.com/SerenityOS/serenity/issues/5517
Issue: https://github.com/SerenityOS/serenity/issues/5518
Reviewed-by: https://github.com/linusg
Reviewed-by: https://github.com/tomuta
2 changed files with 5 additions and 6 deletions
|
@ -954,12 +954,10 @@ bool ECMA262Parser::parse_quantifier(ByteCode& stack, size_t& match_length_minim
|
||||||
if (match(TokenType::Comma)) {
|
if (match(TokenType::Comma)) {
|
||||||
consume();
|
consume();
|
||||||
auto high_bound = read_digits();
|
auto high_bound = read_digits();
|
||||||
if (!high_bound.has_value()) {
|
if (high_bound.has_value())
|
||||||
set_error(Error::InvalidBraceContent);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
repeat_max = high_bound.value();
|
repeat_max = high_bound.value();
|
||||||
|
} else {
|
||||||
|
repeat_max = repeat_min;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!match(TokenType::RightCurly)) {
|
if (!match(TokenType::RightCurly)) {
|
||||||
|
|
|
@ -563,6 +563,7 @@ TEST_CASE(ECMA262_match)
|
||||||
{ "^(?:^^\\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|,|-=|->|\\/|\\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\\^=|\\^\\^|\\^\\^=|{|\\||\\|=|\\|\\||\\|\\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*(\\/(?=[^*/])(?:[^/[\\\\]|\\\\[\\S\\s]|\\[(?:[^\\\\\\]]|\\\\[\\S\\s])*(?:]|$))+\\/)",
|
{ "^(?:^^\\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|,|-=|->|\\/|\\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\\^=|\\^\\^|\\^\\^=|{|\\||\\|=|\\|\\||\\|\\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*(\\/(?=[^*/])(?:[^/[\\\\]|\\\\[\\S\\s]|\\[(?:[^\\\\\\]]|\\\\[\\S\\s])*(?:]|$))+\\/)",
|
||||||
"return /xx/", true, ECMAScriptFlags::BrowserExtended
|
"return /xx/", true, ECMAScriptFlags::BrowserExtended
|
||||||
}, // #5517, appears to be matching JS expressions that involve regular expressions...
|
}, // #5517, appears to be matching JS expressions that involve regular expressions...
|
||||||
|
{ "a{2,}", "aaaa" }, // #5518
|
||||||
};
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue