diff --git a/src/parsing.cpp b/src/parsing.cpp index 79f6e13..773bd4d 100644 --- a/src/parsing.cpp +++ b/src/parsing.cpp @@ -71,7 +71,13 @@ namespace parsing { inner.expect(token::Type::Symbol, "{"); std::vector> 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, "}");