Create a generic type for types with an error list

This commit is contained in:
2025-03-12 00:23:51 +01:00
parent f739194e06
commit c9a8ecdc0a
13 changed files with 79 additions and 46 deletions

View File

@ -32,7 +32,7 @@ namespace boot
}
declaration_visitor::declaration_visitor(const char *path, std::shared_ptr<symbol_table> symbols)
: path(path), symbols(symbols)
: error_container(path), symbols(symbols)
{
}
@ -66,10 +66,8 @@ namespace boot
}
else
{
auto new_error = std::make_unique<declaration_error>(type_expression->name,
path, type_expression->position());
this->errors.emplace_back(std::move(new_error));
// TODO: Delete the next line.
// TODO:
// add_error<declaration_error>(type_expression->name, this->input_file, type_expression->position());
this->current_type = type(std::make_shared<primitive_type>(type_expression->name));
}
}