mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 09:39:39 +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:
parent
801750b95a
commit
e2fa1b40c4
Notes:
sideshowbarker
2024-07-19 01:13:43 +09:00
Author: https://github.com/alimpfard
Commit: e2fa1b40c4
Pull-request: https://github.com/SerenityOS/serenity/pull/4194
Issue: https://github.com/SerenityOS/serenity/issues/4186
Issue: https://github.com/SerenityOS/serenity/issues/4189
4 changed files with 64 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue