diff options
| author | Eugen Wissner <belka@caraus.de> | 2026-09-24 00:39:51 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2026-09-24 00:39:51 +0200 |
| commit | f7b035a505e86ad916a43ab1dc1a662a6066b011 (patch) | |
| tree | a54369ae8ad56352d148c4583ab568f7d4869d30 /boot/validation.cc | |
| parent | 74e75e41fe12f19e5365a3152ffafa1a29376240 (diff) | |
| download | elna-f7b035a505e86ad916a43ab1dc1a662a6066b011.tar.gz | |
Move module heading to the top
Diffstat (limited to 'boot/validation.cc')
| -rw-r--r-- | boot/validation.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/boot/validation.cc b/boot/validation.cc index facef04..dda3af7 100644 --- a/boot/validation.cc +++ b/boot/validation.cc @@ -64,10 +64,10 @@ namespace elna::boot } if (unit->entry_point.has_value()) { - auto entry_point = this->bag.lookup("")->is_procedure(); + const std::shared_ptr<procedure_info> entry_point = this->bag.lookup("")->is_procedure(); this->bag.enter(entry_point->scope); - visit_statements(unit->entry_point->statements); + visit_statements(unit->entry_point.value()); this->bag.leave(); } } @@ -84,7 +84,9 @@ namespace elna::boot { if (declaration->body.has_value()) { - auto procedure = this->bag.lookup(declaration->identifier.name())->is_procedure(); + const std::shared_ptr<procedure_info> procedure = + this->bag.lookup(declaration->identifier.name())->is_procedure(); + this->bag.enter(procedure->scope); visit_statements(declaration->body.value().statements); this->bag.leave(); |
