Remove type visiting in generic visitor
This commit is contained in:
@@ -74,7 +74,7 @@ static elna::boot::dependency elna_parse_file(dependency_state& state, const cha
|
||||
fatal_error(UNKNOWN_LOCATION, "Cannot open filename %s: %m", filename);
|
||||
}
|
||||
linemap_add(line_table, LC_ENTER, 0, filename, 1);
|
||||
elna::boot::dependency outcome = elna::boot::read_sources(entry_point, filename);
|
||||
elna::boot::dependency outcome = elna::boot::read_source(entry_point, filename);
|
||||
|
||||
if (outcome.has_errors())
|
||||
{
|
||||
@@ -92,12 +92,11 @@ static elna::boot::dependency elna_parse_file(dependency_state& state, const cha
|
||||
}
|
||||
outcome_bag.add_import(state.cache.find(sub_path)->second);
|
||||
}
|
||||
elna::boot::name_analysis_visitor name_analysis_visitor(filename, outcome_bag);
|
||||
outcome.tree->accept(&name_analysis_visitor);
|
||||
elna::boot::error_list semantic_errors = analyze_semantics(filename, outcome.tree, outcome_bag);
|
||||
|
||||
if (name_analysis_visitor.has_errors())
|
||||
if (!semantic_errors.empty())
|
||||
{
|
||||
elna::gcc::report_errors(name_analysis_visitor.errors());
|
||||
elna::gcc::report_errors(semantic_errors);
|
||||
}
|
||||
state.cache.insert({ filename, outcome_bag });
|
||||
elna::gcc::rewrite_symbol_table(module_table, state.custom);
|
||||
|
Reference in New Issue
Block a user