Skip to content

Commit

Permalink
Shell: Avoid position push/pop when checking for next_is()
Browse files Browse the repository at this point in the history
This operation is not a rule and cannot produce nodes.
  • Loading branch information
alimpfard authored and awesomekling committed Apr 29, 2021
1 parent 0d74255 commit cf4935e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Userland/Shell/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit cf4935e

Please sign in to comment.