Add file name to error output

This commit is contained in:
Jonathan Müller 2017-07-03 09:02:31 +02:00
commit ca5623b43d
6 changed files with 40 additions and 14 deletions

View file

@ -47,6 +47,12 @@ namespace cppast
return {type_safe::nullopt, type_safe::nullopt, type_safe::nullopt, type_safe::nullopt};
}
/// \returns A source location where entity and file name is available.
static source_location make_entity(std::string entity, std::string file)
{
return {std::move(entity), std::move(file), type_safe::nullopt};
}
/// \returns A possible string representation of the source location.
/// \notes It will include a separator, but no trailing whitespace.
std::string to_string() const