diff options
Diffstat (limited to 'boot/materialization.cc')
| -rw-r--r-- | boot/materialization.cc | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/boot/materialization.cc b/boot/materialization.cc index 0ca81aa..6eea0d1 100644 --- a/boot/materialization.cc +++ b/boot/materialization.cc @@ -48,6 +48,19 @@ namespace elna::boot { } + void materialization_visitor::visit(unit *unit) + { + visit_all(this, unit->imports); + visit_all(this, unit->declarations); + + this->in_global_scope = false; + if (unit->entry_point.has_value()) + { + visit_all(this, unit->entry_point.value()); + } + this->in_global_scope = true; + } + void materialization_visitor::visit(procedure_declaration *declaration) { this->in_global_scope = false; @@ -144,11 +157,4 @@ namespace elna::boot materialization_error::kind::real_overflow); } } - - void materialization_visitor::visit_entry_point(unit *unit) - { - this->in_global_scope = false; - walking_visitor::visit_entry_point(unit); - this->in_global_scope = true; - } } |
