FE 0.6.0
A header-only C++ library for writing frontends
|
#include <fe/loc.h>
Public Member Functions | |
Loc ()=default | |
Creates an invalid Location. | |
Loc (const std::filesystem::path *path, Pos begin, Pos finis) | |
Loc (const std::filesystem::path *file, Pos pos) | |
Loc (Pos begin, Pos finis) | |
Loc (Pos pos) | |
Loc | anew_begin () const |
Loc | anew_finis () const |
Loc | operator+ (Pos pos) const |
Loc | operator+ (Loc loc) const |
operator bool () const | |
Is a valid Location? | |
bool | operator== (Loc other) const |
void | dump () const |
Public Attributes | |
const std::filesystem::path * | path = {} |
Pos | begin = {} |
Pos | finis = {} |
It's called finis because it refers to the last character within this Location. | |
Friends | |
std::ostream & | operator<< (std::ostream &os, Loc loc) |
Write your own implementation or include fe/loc.cpp.h somewhere for a default one. | |
Location in a File.
It's only two machine words on a 64 bit arch, so pass around as value.
|
default |
Creates an invalid Location.
|
inline |
|
inline |
|
inline |
|
inlineexplicit |
|
inline |
|
friend |
Write your own implementation or include fe/loc.cpp.h somewhere for a default one.
Pos fe::Loc::begin = {} |
Definition at line 56 of file loc.h.
Referenced by anew_begin(), operator bool(), operator+(), operator+(), operator==(), and fe::Lexer< K, S >::start().
Pos fe::Loc::finis = {} |
It's called finis
because it refers to the last character within this Location.
In the STL the word end
refers to the position of something that is one element past the end.
Definition at line 57 of file loc.h.
Referenced by anew_finis(), fe::Lexer< K, S >::next(), operator+(), and operator==().
const std::filesystem::path* fe::Loc::path = {} |
Definition at line 55 of file loc.h.
Referenced by anew_begin(), anew_finis(), operator+(), operator+(), and operator==().