23 explicit operator bool()
const {
return row != 0; }
46 Loc(
const std::filesystem::path* file,
Pos pos)
47 :
Loc(file, pos, pos) {}
51 :
Loc(nullptr, pos, pos) {}
57 explicit operator bool()
const {
return (
bool)
begin; }
62 const std::filesystem::path*
path = {};
75static_assert(
sizeof(
void*) != 8 ||
sizeof(Loc) == 16,
"Loc should stay two machine words");
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.