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

@ -42,20 +42,10 @@ namespace boot
}
driver::driver(const char *input_file)
: input_file(input_file)
: error_container(input_file)
{
}
void driver::error(const yy::location& loc, const std::string& message)
{
m_errors.emplace_back(new boot::syntax_error(message, input_file, loc));
}
const std::list<std::unique_ptr<struct error>>& driver::errors() const noexcept
{
return m_errors;
}
char escape_char(char escape)
{
switch (escape)