12 if (pos.
col)
return os << pos.
row <<
':' << pos.
col;
15 return os <<
"<unknown position>";
20 os << (loc.
path ? loc.
path->string() :
"<unknown file>") <<
':' << loc.
begin;
24 return os <<
"<unknown location>";
27void Pos::dump()
const { std::cout << *
this << std::endl; }
28void Loc::dump()
const { std::cout << *
this << std::endl; }
Default Pos/Loc stream output and dump helpers.
std::ostream & operator<<(std::ostream &os, Pos pos)
Pos finis
It's called finis because it refers to the last character within this Location.
Loc()=default
Creates an invalid Location.
const std::filesystem::path * path
Pos()=default
Creates an invalid Position.