mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:27:45 +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:
parent
d49d2c7ec4
commit
67ce9e28a5
7 changed files with 18 additions and 14 deletions
|
@ -230,6 +230,7 @@ static NonnullOwnPtr<Interface> parse_interface(StringView filename, StringView
|
|||
|
||||
if (lexer.consume_specific("//")) {
|
||||
lexer.consume_until('\n');
|
||||
lexer.ignore();
|
||||
consumed = true;
|
||||
}
|
||||
}
|
||||
|
@ -276,7 +277,9 @@ static NonnullOwnPtr<Interface> parse_interface(StringView filename, StringView
|
|||
while (lexer.consume_specific("#import")) {
|
||||
consume_whitespace();
|
||||
assert_specific('<');
|
||||
imports.append(resolve_import(lexer.consume_until('>')));
|
||||
auto path = lexer.consume_until('>');
|
||||
lexer.ignore();
|
||||
imports.append(resolve_import(path));
|
||||
consume_whitespace();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue