Add a bit better error raporting to failed parse
This commit is contained in:
parent
3a2c97fb13
commit
927ed01fac
@ -59,6 +59,10 @@ int main() {
|
||||
statements.push_back(std::move(statement.unwrap()));
|
||||
statement = parsing::parse_top_level_statement(stream);
|
||||
}
|
||||
if (stream.peek().type != token::Type::Eof) {
|
||||
std::cerr << statement.unwrap_err() << std::endl;
|
||||
return 1;
|
||||
}
|
||||
stream.expect(token::Type::Eof);
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user