From 4ba3456df4e391091a69d0953a3d8db384096faf Mon Sep 17 00:00:00 2001 From: mingodad Date: Thu, 22 Jun 2023 16:33:58 +0200 Subject: [PATCH] Reuse result of already called function. --- src/lalr/Lexer.ipp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lalr/Lexer.ipp b/src/lalr/Lexer.ipp index 8b1a951..30233b4 100644 --- a/src/lalr/Lexer.ipp +++ b/src/lalr/Lexer.ipp @@ -282,7 +282,7 @@ void Lexer::advance() full_ = position_.ended(); matched_lexeme_.clear(); matched_symbol_ = nullptr; - symbol_ = !position_.ended() ? run() : end_symbol_; + symbol_ = !full_ ? run() : end_symbol_; } /**