aboutsummaryrefslogtreecommitdiff
path: root/boot/parser.yy
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-07-09 17:24:42 +0200
committerEugen Wissner <belka@caraus.de>2026-07-09 17:24:42 +0200
commit36440faa345bf842c348711325312c2b02e4cc23 (patch)
treea7ec54ad2f948efc556f3a74b59064321ae581c9 /boot/parser.yy
parent8d8e771af944796eba10cfa9568d284daaab93a1 (diff)
downloadelna-36440faa345bf842c348711325312c2b02e4cc23.tar.gz
Merge program and unit AST types
Diffstat (limited to 'boot/parser.yy')
-rw-r--r--boot/parser.yy6
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"
{