|
FE 0.13.1
Header-only C++ frontend library
|
Use/derive from this class for "global" variables that you need all over the place. More...
#include <fe/driver.h>
Public Member Functions | |
| Driver () | |
| Driver (std::unique_ptr< Diag > diag) | |
Installs diag right away, so Driver::error renders through it from the very first message. | |
| ~Driver () | |
| Driver (const Driver &)=delete | |
| Driver (Driver &&)=delete | |
| Driver & | operator= (Driver)=delete |
Diagnostics | |
Every frontend building block reports into Driver::error; Error::ack it before this Driver dies. | |
| Error & | error () |
| const Error & | error () const |
| template<class... Args> | |
| Error & | error (Loc loc, std::format_string< Args... > fmt, Args &&... args) |
| template<class... Args> | |
| Error & | warn (Loc loc, std::format_string< Args... > fmt, Args &&... args) |
| template<class... Args> | |
| Error & | note (std::format_string< Args... > fmt, Args &&... args) |
| template<class... Args> | |
| Error & | note (Loc loc, std::format_string< Args... > fmt, Args &&... args) |
| Diag & | diag () |
| const Diag & | diag () const |
| std::unique_ptr< Diag > | diag (std::unique_ptr< Diag > diag) |
Installs diag - a subclass of your own, typically - and yields the previous one. | |
Source Files | |
| SrcMap & | src () |
| const SrcMap & | src () const |
Dbg Interning | |
| Dbg | dbg (DbgKey key) const |
| DbgKey | dbg (Dbg dbg) |
Interns dbg and yields its DbgKey. | |
| Public Member Functions inherited from fe::SymPool | |
| SymPool (const SymPool &)=delete | |
| SymPool () noexcept | |
| SymPool (SymPool &&other) noexcept | |
| SymPool & | operator= (SymPool)=delete |
| Sym | sym (std::string_view s) |
| Sym | sym (const std::string &s) |
| constexpr Sym | sym (const char *s) |
s is a null-terminated C-string. | |
Additional Inherited Members | |
| Public Types inherited from fe::SymPool | |
| using | String = Sym::String |
Use/derive from this class for "global" variables that you need all over the place.
Well, there are not really global - that's the point of this class. It manages a SymPool, a SrcMap, the interned Dbgs, the Diag that lays out a diagnostic, and the Error they land in.
| fe::Driver::Driver | ( | ) |
Referenced by Driver(), Driver(), and operator=().
|
explicit |
Installs diag right away, so Driver::error renders through it from the very first message.
References diag().
| fe::Driver::~Driver | ( | ) |
|
delete |
References Driver().
|
delete |
References Driver().
Interns dbg and yields its DbgKey.
Definition at line 74 of file driver.h.
References dbg(), and fe::DbgKey::DbgKey().
|
inline |
|
inline |
Definition at line 42 of file driver.h.
References fe::Error::error().
|
inline |
Definition at line 45 of file driver.h.
References fe::Error::note().
|
inline |
Definition at line 44 of file driver.h.
References fe::Error::note().
|
inline |
Definition at line 43 of file driver.h.
References fe::Error::warn().