From f7b035a505e86ad916a43ab1dc1a662a6066b011 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Thu, 24 Sep 2026 00:39:51 +0200 Subject: Move module heading to the top --- boot/ast.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'boot/ast.cc') diff --git a/boot/ast.cc b/boot/ast.cc index b38e8d1..2d8e90d 100644 --- a/boot/ast.cc +++ b/boot/ast.cc @@ -367,7 +367,10 @@ namespace elna::boot void walking_visitor::visit_entry_point(unit *unit) { - traverse_body(this, unit->entry_point.value()); + for (statement *body_statement : unit->entry_point.value()) + { + body_statement->accept(this); + } } void walking_visitor::visit(type_declaration *declaration) @@ -1121,10 +1124,9 @@ namespace elna::boot std::vector&& declarations, std::vector&& parameters, const source_position entry_position, - std::optional&& body) - : node(position), - imports(std::move(imports)), declarations(std::move(declarations)), entry_point(std::move(body)), - parameters(std::move(parameters)), entry_position(entry_position) + std::vector&& body) + : node(position), imports(std::move(imports)), declarations(std::move(declarations)), + entry_point(std::move(body)), parameters(std::move(parameters)), entry_position(entry_position) { } -- cgit v1.2.3