From bfb079cb4f41e5148aa54644d8da98a14fdebf01 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Thu, 19 Nov 2020 22:06:38 +0100 Subject: [PATCH] Fixed syntax errors at the end of the file to not be caught --- source/lang/parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lang/parser.cpp b/source/lang/parser.cpp index ca78c6f38..14912e818 100644 --- a/source/lang/parser.cpp +++ b/source/lang/parser.cpp @@ -257,7 +257,7 @@ namespace hex::lang { auto program = parseTillToken(currentToken, Token::Type::EndOfProgram); - if (program.empty()) + if (program.empty() || currentToken != tokens.end()) return { ResultParseError, { } }; return { ResultSuccess, program };