diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-09-24 00:39:51 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-09-24 00:39:51 +0200 |
| commit | f7b035a505e86ad916a43ab1dc1a662a6066b011 (patch) | |
| tree | a54369ae8ad56352d148c4583ab568f7d4869d30 /boot/ast.cc | |
| parent | 74e75e41fe12f19e5365a3152ffafa1a29376240 (diff) | |
| download | elna-f7b035a505e86ad916a43ab1dc1a662a6066b011.tar.gz | |
Move module heading to the top
Diffstat (limited to 'boot/ast.cc')
| -rw-r--r-- | boot/ast.cc | 12 |
1 files changed, 7 insertions, 5 deletions
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<declaration *>&& declarations, std::vector<identifier>&& parameters, const source_position entry_position, - std::optional<procedure_body>&& 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<statement *>&& body) + : node(position), imports(std::move(imports)), declarations(std::move(declarations)), + entry_point(std::move(body)), parameters(std::move(parameters)), entry_position(entry_position) { } |
