mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:47:35 +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
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)
|
||||
{
|
||||
auto start = push_start();
|
||||
auto start = current_position();
|
||||
auto res = expect(next);
|
||||
restore_to(*start);
|
||||
restore_to(start.offset, start.line);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue