67 [[nodiscard]]
const std::string&
text()
const {
return _text; }
74 [[nodiscard]]
const Span&
span()
const {
return _span; }
Represents a short textual annotation attached to a Span in a source.
Definition: label.hpp:12
friend bool operator<(const Label &lhs, const Label &rhs)
Orders labels by their span to allow placement within a line/group.
Definition: label.hpp:30
const std::string & text() const
Returns the label text.
Definition: label.hpp:67
Label(std::string text, Span span)
Constructs a label with a human-readable message and the span it refers to.
friend bool operator<=(const Label &lhs, const Label &rhs)
Less-than-or-equal comparison derived from >=
Definition: label.hpp:40
friend bool operator>(const Label &lhs, const Label &rhs)
Greater-than comparison derived from <
Definition: label.hpp:50
const Span & span() const
Returns the span associated with this label.
Definition: label.hpp:74
friend bool operator>=(const Label &lhs, const Label &rhs)
Greater-than-or-equal comparison derived from <
Definition: label.hpp:60
Represents a contiguous region within a Source
Definition: span.hpp:12