Skip to content

Commit

Permalink
End parsing of container body on EOF
Browse files Browse the repository at this point in the history
  • Loading branch information
N00byEdge committed Sep 1, 2023
1 parent a2db8be commit ae5d158
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion selfhost/parser.n
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ fn parse_container_body(context: *ParserContext) u32 {
stmt_payload[1].get(decl).* = parse_function_expression(context);
decl_builder.add(decl, stmt_next_sibling.ptr());
}
else if(p == .closing_curly) {
else if(p == .closing_curly || p == .end_of_file) {
return decl_builder.head;
}
else {
Expand Down

0 comments on commit ae5d158

Please sign in to comment.