Move command line handling into a module
This commit is contained in:
@@ -85,12 +85,15 @@ static elna::boot::dependency elna_parse_file(dependency_state& state, const cha
|
||||
for (const auto& sub_tree : outcome.tree->imports)
|
||||
{
|
||||
std::filesystem::path sub_path = "source" / elna::boot::build_path(sub_tree->segments);
|
||||
std::unordered_map<std::filesystem::path, elna::boot::symbol_bag>::const_iterator cached_import =
|
||||
state.cache.find(sub_path);
|
||||
|
||||
if (state.cache.find(sub_path) == state.cache.end())
|
||||
if (cached_import == state.cache.end())
|
||||
{
|
||||
elna_parse_file(state, state.allocate_path(sub_path));
|
||||
elna_parse_file(state, sub_path.c_str());
|
||||
cached_import = state.cache.find(sub_path);
|
||||
}
|
||||
outcome_bag.add_import(state.cache.find(sub_path)->second);
|
||||
outcome_bag.add_import(cached_import->second);
|
||||
}
|
||||
elna::boot::error_list semantic_errors = analyze_semantics(filename, outcome.tree, outcome_bag);
|
||||
|
||||
|
Reference in New Issue
Block a user