1
0
mirror of synced 2024-11-28 17:40:51 +01:00

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

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 };