aboutsummaryrefslogtreecommitdiff
path: root/boot/validation.cc
diff options
context:
space:
mode:
Diffstat (limited to 'boot/validation.cc')
-rw-r--r--boot/validation.cc8
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();