Actually parse statements with a loop
This commit is contained in:
parent
8520404fb1
commit
e19349beb6
@ -71,7 +71,13 @@ namespace parsing {
|
||||
inner.expect(token::Type::Symbol, "{");
|
||||
|
||||
std::vector<std::unique_ptr<AST::Statement>> statements{};
|
||||
statements.push_back(parse_statement(inner).unwrap());
|
||||
|
||||
auto statement = parse_statement(inner);
|
||||
while (statement.ok()) {
|
||||
statements.push_back(statement.unwrap());
|
||||
statement = parse_statement(inner);
|
||||
}
|
||||
|
||||
|
||||
inner.expect(token::Type::Symbol, "}");
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user