From cf4935e80602ebe9335dc9223f276c56918e3218 Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Thu, 29 Apr 2021 07:00:52 +0430 Subject: [PATCH] Shell: Avoid position push/pop when checking for next_is() This operation is not a rule and cannot produce nodes. --- Userland/Shell/Parser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Shell/Parser.cpp b/Userland/Shell/Parser.cpp index d1e422f6d8..699de495ae 100644 --- a/Userland/Shell/Parser.cpp +++ b/Userland/Shell/Parser.cpp @@ -1867,9 +1867,9 @@ StringView Parser::consume_while(Function 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; }