mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 02:08:12 +03:00
Shell: Avoid position push/pop when checking for next_is()
This operation is not a rule and cannot produce nodes.
This commit is contained in:
parent
0d742557c6
commit
cf4935e806
Notes:
sideshowbarker
2024-07-18 18:54:49 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/cf4935e8060 Pull-request: https://github.com/SerenityOS/serenity/pull/6725 Issue: https://github.com/SerenityOS/serenity/issues/4283
@ -1867,9 +1867,9 @@ StringView Parser::consume_while(Function<bool(char)> condition)
|
||||
|
||||
bool Parser::next_is(const StringView& next)
|
||||
{
|
||||
auto start = push_start();
|
||||
auto start = current_position();
|
||||
auto res = expect(next);
|
||||
restore_to(*start);
|
||||
restore_to(start.offset, start.line);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user