diff options
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() |
