mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 22:30:31 +00:00
LibRegex: Correctly use ClassSetReservedPunctuator in ClassSetCharacter
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
We had typo'd using ClassSetReservedDoublePunctuator which was resulting in a parse error for the regex: ([^\\:]+?) With the 'v' flag set. Co-Authored-By: Ali Mohammad Pur <mpfard@serenityos.org>
This commit is contained in:
parent
3a232880ed
commit
bd6581fe22
Notes:
github-actions[bot]
2025-07-10 09:42:19 +00:00
Author: https://github.com/shannonbooth
Commit: bd6581fe22
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5383
Reviewed-by: https://github.com/alimpfard ✅
2 changed files with 23 additions and 1 deletions
|
@ -2266,6 +2266,10 @@ Optional<u32> ECMA262Parser::parse_class_set_character()
|
|||
"&&"sv, "!!"sv, "##"sv, "$$"sv, "%%"sv, "**"sv, "++"sv, ",,"sv, ".."sv, "::"sv, ";;"sv, "<<"sv, "=="sv, ">>"sv, "??"sv, "@@"sv, "^^"sv, "``"sv, "~~"sv
|
||||
};
|
||||
|
||||
constexpr auto class_set_reserved_punctuator = Array {
|
||||
"&"sv, "-"sv, "!"sv, "#"sv, "%"sv, ","sv, ":"sv, ";"sv, "<"sv, "="sv, ">"sv, "@"sv, "`"sv, "~"sv
|
||||
};
|
||||
|
||||
if (done()) {
|
||||
set_error(Error::InvalidPattern);
|
||||
return {};
|
||||
|
@ -2281,7 +2285,7 @@ Optional<u32> ECMA262Parser::parse_class_set_character()
|
|||
}
|
||||
|
||||
// "\" ClassSetReservedPunctuator
|
||||
for (auto const& reserved : class_set_reserved_double_punctuator) {
|
||||
for (auto const& reserved : class_set_reserved_punctuator) {
|
||||
if (try_skip(reserved)) {
|
||||
// "\" ClassSetReservedPunctuator (ClassSetReservedPunctuator)
|
||||
back();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue