Fixed syntax errors at the end of the file to not be caught
This commit is contained in:
parent
89afbd1aef
commit
bfb079cb4f
@ -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 };
|
||||||
|
Loading…
Reference in New Issue
Block a user