1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 20:08:13 +00:00

LibRegex: Match the escaped part of escaped syntax characters

Previously, `\^` would've matched `\`, not `^`.
This commit is contained in:
AnotherTest 2021-02-26 23:21:08 +03:30 committed by Andreas Kling
parent f05e518cbc
commit 91bf3dc7fe
2 changed files with 2 additions and 1 deletions

View file

@ -1015,7 +1015,7 @@ bool ECMA262Parser::parse_atom(ByteCode& stack, size_t& match_length_minimum, bo
// Also part of AtomEscape.
auto token = consume();
match_length_minimum += 1;
stack.insert_bytecode_compare_values({ { CharacterCompareType::Char, (ByteCodeValueType)token.value()[0] } });
stack.insert_bytecode_compare_values({ { CharacterCompareType::Char, (ByteCodeValueType)token.value()[1] } });
return true;
}
if (try_skip("\\")) {