Document symbol bag class and methods
This commit is contained in:
@@ -66,7 +66,6 @@ using dependency_state = elna::boot::dependency_state<std::shared_ptr<elna::gcc:
|
||||
|
||||
static elna::boot::dependency elna_parse_file(dependency_state& state, const char *filename)
|
||||
{
|
||||
auto module_table = std::make_shared<elna::boot::symbol_table>(state.globals);
|
||||
std::ifstream entry_point{ filename, std::ios::in };
|
||||
|
||||
if (!entry_point)
|
||||
@@ -80,7 +79,7 @@ static elna::boot::dependency elna_parse_file(dependency_state& state, const cha
|
||||
{
|
||||
elna::gcc::report_errors(outcome.errors());
|
||||
}
|
||||
elna::boot::symbol_bag outcome_bag = elna::boot::symbol_bag{ std::move(outcome.unresolved), module_table };
|
||||
elna::boot::symbol_bag outcome_bag = elna::boot::symbol_bag{ std::move(outcome.unresolved), state.globals };
|
||||
|
||||
for (const auto& sub_tree : outcome.tree->imports)
|
||||
{
|
||||
@@ -102,7 +101,7 @@ static elna::boot::dependency elna_parse_file(dependency_state& state, const cha
|
||||
elna::gcc::report_errors(semantic_errors);
|
||||
}
|
||||
state.cache.insert({ filename, outcome_bag });
|
||||
elna::gcc::rewrite_symbol_table(module_table, state.custom);
|
||||
elna::gcc::rewrite_symbol_table(outcome_bag.leave(), state.custom);
|
||||
linemap_add(line_table, LC_LEAVE, 0, NULL, 0);
|
||||
|
||||
return outcome;
|
||||
|
Reference in New Issue
Block a user