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

AK: Standardize the behaviour of GenericLexer::consume_until overloads

Before this commit all consume_until overloads aside from the Predicate
one would consume (and ignore) the stop char/string, while the
Predicate overload would not, in order to keep behaviour consistent,
the other overloads no longer consume the stop char/string as well.
This commit is contained in:
Idan Horowitz 2022-01-24 23:47:22 +02:00 committed by Ali Mohammad Pur
parent d49d2c7ec4
commit 67ce9e28a5
7 changed files with 18 additions and 14 deletions

View file

@ -506,6 +506,7 @@ extern "C" int vsscanf(const char* input, const char* format, va_list ap)
case '[':
format_lexer.consume();
scanlist = format_lexer.consume_until(']');
format_lexer.ignore();
if (scanlist.starts_with('^')) {
scanlist = scanlist.substring_view(1);
invert_scanlist = true;