LibRegex: Allow missing high bound in {x,y} quantifiers

Fixes #5518.
This commit is contained in:
AnotherTest
2021-02-26 23:23:58 +03:30
committed by Andreas Kling
parent 91bf3dc7fe
commit e0ac85288e
Notes: sideshowbarker 2024-07-18 21:53:35 +09:00
2 changed files with 5 additions and 6 deletions

View File

@@ -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])*(?:]|$))+\\/)",
"return /xx/", true, ECMAScriptFlags::BrowserExtended
}, // #5517, appears to be matching JS expressions that involve regular expressions...
{ "a{2,}", "aaaa" }, // #5518
};
// clang-format on