Fix and test include directive parsing
This commit is contained in:
parent
dc5abeb785
commit
9c46c96820
7 changed files with 90 additions and 21 deletions
|
|
@ -20,7 +20,11 @@ bool diagnostic_logger::log(const char* source, const diagnostic& d) const
|
|||
|
||||
bool stderr_diagnostic_logger::do_log(const char* source, const diagnostic& d) const
|
||||
{
|
||||
std::fprintf(stderr, "[%s] [%s] %s %s\n", source, to_string(d.severity),
|
||||
d.location.to_string().c_str(), d.message.c_str());
|
||||
auto loc = d.location.to_string();
|
||||
if (loc.empty())
|
||||
std::fprintf(stderr, "[%s] [%s] %s\n", source, to_string(d.severity), d.message.c_str());
|
||||
else
|
||||
std::fprintf(stderr, "[%s] [%s] %s %s\n", source, to_string(d.severity),
|
||||
d.location.to_string().c_str(), d.message.c_str());
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue