let print_to_stream also print the end of a source region (#244)

This commit is contained in:
Niels Dekker
2025-02-07 09:45:59 +01:00
committed by GitHub
parent d00dd1f5cb
commit 1fdd67ce5a
2 changed files with 10 additions and 0 deletions

View File

@@ -419,6 +419,11 @@ TOML_IMPL_NAMESPACE_START
void TOML_CALLCONV print_to_stream(std::ostream & stream, const source_region& val)
{
print_to_stream(stream, val.begin);
if (val.begin != val.end)
{
print_to_stream(stream, " to "sv);
print_to_stream(stream, val.end);
}
if (val.path)
{
print_to_stream(stream, " of '"sv);

View File

@@ -10694,6 +10694,11 @@ TOML_IMPL_NAMESPACE_START
void TOML_CALLCONV print_to_stream(std::ostream & stream, const source_region& val)
{
print_to_stream(stream, val.begin);
if (val.begin != val.end)
{
print_to_stream(stream, " to "sv);
print_to_stream(stream, val.end);
}
if (val.path)
{
print_to_stream(stream, " of '"sv);