1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-24 21:57:35 +00:00

LibRegex: Allow unknown escapes in non-unicode mode (for ECMA262)

This makes regexps like `/\x/` to work as normal.
Partially deals with #4189.
This commit is contained in:
AnotherTest 2020-11-28 12:27:59 +03:30 committed by Andreas Kling
parent 801750b95a
commit e2fa1b40c4
4 changed files with 64 additions and 4 deletions

View file

@ -99,6 +99,13 @@ bool Lexer::try_skip(char c)
return true;
}
char Lexer::skip()
{
auto c = peek();
consume();
return c;
}
Token Lexer::next()
{
size_t token_start_position;