From 72f5e82196d95008ed12c12de6bdccf24361e106 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Mon, 7 Sep 2026 22:02:15 +0200 Subject: Make module entry point more procedure like --- boot/ast.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'boot/ast.cc') diff --git a/boot/ast.cc b/boot/ast.cc index b8647f4..edf1237 100644 --- a/boot/ast.cc +++ b/boot/ast.cc @@ -367,10 +367,15 @@ namespace elna::boot } if (unit->entry_point.has_value()) { - traverse_body(this, unit->entry_point.value()); + visit_entry_point(unit); } } + void walking_visitor::visit_entry_point(unit *unit) + { + traverse_body(this, unit->entry_point.value()); + } + void walking_visitor::visit(type_declaration *declaration) { declaration->underlying_type().accept(this); @@ -1033,10 +1038,13 @@ namespace elna::boot std::vector&& types, std::vector&& variables, std::vector&& procedures, + std::vector&& parameters, + const source_position entry_position, std::optional&& body) : node(position), imports(std::move(imports)), types(std::move(types)), procedures(std::move(procedures)), - variables(std::move(variables)), entry_point(std::move(body)) + variables(std::move(variables)), entry_point(std::move(body)), + parameters(std::move(parameters)), entry_position(entry_position) { } -- cgit v1.2.3