18 explicit operator bool()
const {
return row != 0; }
41 Loc(
const std::filesystem::path* file,
Pos pos)
42 :
Loc(file, pos, pos) {}
46 :
Loc(nullptr, pos, pos) {}
52 explicit operator bool()
const {
return (
bool)
begin; }
57 const std::filesystem::path*
path = {};
Default Pos/Loc stream output and dump helpers.
Loc(Pos begin, Pos finis)
Pos finis
It's called finis because it refers to the last character within this Location.
Loc()=default
Creates an invalid Location.
Loc(const std::filesystem::path *path, Pos begin, Pos finis)
const std::filesystem::path * path
Loc operator+(Loc loc) const
friend std::ostream & operator<<(std::ostream &os, Loc loc)
fe/loc.h only declares the stream output and dump helpers.
bool operator==(Loc other) const
Loc(const std::filesystem::path *file, Pos pos)
Loc operator+(Pos pos) const
Position in a source file; pass around as value.
auto operator<=>(const Pos &) const =default
Pos(uint16_t row, uint16_t col)
Pos()=default
Creates an invalid Position.
friend std::ostream & operator<<(std::ostream &os, Pos pos)
fe/loc.h only declares the stream output and dump helpers.