aboutsummaryrefslogtreecommitdiff
path: root/boot/ast.cc
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-09-07 22:02:15 +0200
committerEugen Wissner <belka@caraus.de>2026-09-07 23:39:53 +0200
commit72f5e82196d95008ed12c12de6bdccf24361e106 (patch)
tree8319324de8e2a5182dc3c1ddca00a837c2489ad2 /boot/ast.cc
parent47521ad6d85f9bd6caee39696ce40dff82cfa50d (diff)
downloadelna-72f5e82196d95008ed12c12de6bdccf24361e106.tar.gz
Make module entry point more procedure like
Diffstat (limited to 'boot/ast.cc')
-rw-r--r--boot/ast.cc12
1 files changed, 10 insertions, 2 deletions
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<type_declaration *>&& types,
std::vector<variable_declaration *>&& variables,
std::vector<procedure_declaration *>&& procedures,
+ std::vector<identifier>&& parameters,
+ const source_position entry_position,
std::optional<procedure_body>&& 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)
{
}