18 explicit operator bool()
const {
return row != 0; }
39 Loc(
const std::filesystem::path* file,
Pos pos)
40 :
Loc(file, pos, pos) {}
44 :
Loc(nullptr, pos, pos) {}
50 explicit operator bool()
const {
return (
bool)
begin; }
55 const std::filesystem::path*
path = {};
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)
Write your own implementation or include fe/loc.cpp.h somewhere for a default one.
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)
Write your own implementation or include fe/loc.cpp.h somewhere for a default one.