|
FE 0.13.1
Header-only C++ frontend library
|
Byte offset into a Src; pass around as value. More...
#include <fe/loc.h>
Public Member Functions | |
| constexpr | Pos ()=default |
| Creates an invalid Position. | |
| constexpr | Pos (uint32_t off) |
| constexpr | operator bool () const |
| Is a valid Position? | |
| constexpr auto | operator<=> (const Pos &) const =default |
| constexpr Pos | operator+ (uint32_t n) const |
| void | dump () const |
Public Attributes | |
| uint32_t | off = Invalid |
Static Public Attributes | |
| static constexpr uint32_t | Invalid = uint32_t(-1) |
Friends | |
| std::ostream & | operator<< (std::ostream &os, Pos pos) |
| fe/loc.h only declares the stream output and dump helpers. | |
Byte offset into a Src; pass around as value.
A Position is just an index - fe::Src turns it back into the row/column a human wants to read.
|
constexprdefault |
Creates an invalid Position.
Referenced by fe::Src::begin(), fe::Src::end(), operator+(), operator<<, operator<=>(), and fe::Src::prev().
|
inlineexplicitconstexpr |
| void fe::Pos::dump | ( | ) | const |
|
inlineexplicitconstexpr |
|
inlineconstexpr |
|
friend |
|
staticconstexpr |
Definition at line 19 of file loc.h.
Referenced by operator bool(), and operator+().
| uint32_t fe::Pos::off = Invalid |
Definition at line 33 of file loc.h.
Referenced by fe::Src::contains(), operator bool(), operator+(), Pos(), fe::Src::prev(), fe::Src::rowcol(), and fe::Loc::size().