diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-07-14 19:42:32 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-07-14 19:42:32 +0200 |
| commit | 308a2addf655fe45f2098f8542f0ff1290612cd9 (patch) | |
| tree | 19230bdb673d306d59b32427ad2a3ad5e9850631 /boot/ast.cc | |
| parent | a32a61813ebaecf0c1e69fd1481bf09d8c8b1420 (diff) | |
| download | elna-308a2addf655fe45f2098f8542f0ff1290612cd9.tar.gz | |
Replace procedure end with return
Diffstat (limited to 'boot/ast.cc')
| -rw-r--r-- | boot/ast.cc | 11 |
1 files changed, 3 insertions, 8 deletions
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<type_declaration *>&& types, std::vector<variable_declaration *>&& variables, std::vector<procedure_declaration *>&& procedures, - std::vector<statement *>&& entry_point, - expression *const return_expression) + std::vector<statement *>&& 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() |
