From 308a2addf655fe45f2098f8542f0ff1290612cd9 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Tue, 14 Jul 2026 19:42:32 +0200 Subject: Replace procedure end with return --- boot/ast.cc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'boot/ast.cc') diff --git a/boot/ast.cc b/boot/ast.cc index 14bad30..2a22d69 100644 --- a/boot/ast.cc +++ b/boot/ast.cc @@ -348,10 +348,6 @@ namespace elna::boot { entry_statement->accept(this); } - if (unit->return_expression != nullptr) - { - unit->return_expression->accept(this); - } } void walking_visitor::visit(type_declaration *declaration) @@ -879,10 +875,9 @@ namespace elna::boot std::vector&& types, std::vector&& variables, std::vector&& procedures, - std::vector&& entry_point, - expression *const return_expression) + std::vector&& entry_point) : node(position), - procedure_body(std::move(constants), std::move(variables), std::move(entry_point), return_expression), + procedure_body(std::move(constants), std::move(variables), std::move(entry_point)), imports(std::move(imports)), types(std::move(types)), procedures(std::move(procedures)) { } @@ -894,7 +889,7 @@ namespace elna::boot bool unit::has_body() const { - return !this->entry_point.empty() || this->return_expression != nullptr; + return !this->entry_point.empty(); } unit::~unit() -- cgit v1.2.3