Fixed syntax errors at the end of the file to not be caught

This commit is contained in:
WerWolv 2020-11-19 22:06:38 +01:00
parent 89afbd1aef
commit bfb079cb4f
1 changed files with 1 additions and 1 deletions

View File

@ -257,7 +257,7 @@ namespace hex::lang {
auto program = parseTillToken(currentToken, Token::Type::EndOfProgram); auto program = parseTillToken(currentToken, Token::Type::EndOfProgram);
if (program.empty()) if (program.empty() || currentToken != tokens.end())
return { ResultParseError, { } }; return { ResultParseError, { } };
return { ResultSuccess, program }; return { ResultSuccess, program };