diff options
Diffstat (limited to 'boot/parser.yy')
| -rw-r--r-- | boot/parser.yy | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/boot/parser.yy b/boot/parser.yy index 7797dd1..42840ff 100644 --- a/boot/parser.yy +++ b/boot/parser.yy @@ -164,8 +164,8 @@ program: { if ($6) { - boot::program *tree = new boot::program(boot::make_position(@1)); - std::swap(tree->body, *$6.release()); + boot::unit *tree = new boot::unit(boot::make_position(@1)); + tree->body = std::make_optional<std::vector<boot::statement *>>(std::move(*$6.release())); driver.tree.reset(tree); } @@ -460,7 +460,7 @@ type_expression: } | "record" optional_fields "end" { - $$ = new boot::record_type_expression(boot::make_position(@1), std::move($2), std::nullopt); + $$ = new boot::record_type_expression(boot::make_position(@1), std::move($2)); } | "record" "(" IDENTIFIER ")" optional_fields "end" { |
