mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 01:29:17 +00: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: cf4935e806
Pull-request: https://github.com/SerenityOS/serenity/pull/6725
Issue: https://github.com/SerenityOS/serenity/issues/4283
1 changed files with 2 additions and 2 deletions
|
@ -1867,9 +1867,9 @@ StringView Parser::consume_while(Function<bool(char)> condition)
|
||||||
|
|
||||||
bool Parser::next_is(const StringView& next)
|
bool Parser::next_is(const StringView& next)
|
||||||
{
|
{
|
||||||
auto start = push_start();
|
auto start = current_position();
|
||||||
auto res = expect(next);
|
auto res = expect(next);
|
||||||
restore_to(*start);
|
restore_to(start.offset, start.line);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue