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:
Ali Mohammad Pur 2021-04-29 07:00:52 +04:30 committed by Andreas Kling
parent 0d742557c6
commit cf4935e806
Notes: sideshowbarker 2024-07-18 18:54:49 +09:00

View File

@ -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;
}