42 virtual void print(std::ostream&)
const = 0;
64 return isEqual(other) && other.isEqual(*
this);
67 return !(*
this == other);
72 virtual bool operator<(
const Location&)
const = 0;
73 virtual bool operator<=(
const Location&)
const = 0;
74 virtual bool operator>(
const Location&)
const = 0;
75 virtual bool operator>=(
const Location&)
const = 0;
83 virtual explicit operator bool()
const {
87 virtual explicit operator bool() const final {
103 return *
this ? false :
true;
108inline std::ostream& operator<<(std::ostream &out,
const Location &x) {
Base class for location types.
virtual bool operator!=(const Location &other) const final
Equality and inequality.
virtual bool isValid() const =0
Test whether this object is valid.
virtual bool isEmpty() const final
Test whether this object is empty.
virtual bool operator!() const final
Test whether this object is empty.
virtual void print(std::ostream &) const =0
Output location to a stream.
virtual bool operator==(const Location &other) const final
Equality and inequality.
virtual bool isEqual(const Location &other) const =0
Equality and inequality.
virtual std::string printableName() const =0
Convert location to escaped, parsable string.
virtual std::string toString() const =0
Convert location to string.