FE 0.6.0
A header-only C++ library for writing frontends
Loading...
Searching...
No Matches
fe::Driver Struct Reference

Use/derive from this class for "global" variables that you need all over the place. More...

#include <fe/driver.h>

Inheritance diagram for fe::Driver:
[legend]

Diagnostics

template<class... Args>
static void note (Loc loc, format::format_string< Args... > fmt, Args &&... args)
 
template<class... Args>
void warn (Loc loc, format::format_string< Args... > fmt, Args &&... args)
 
template<class... Args>
void err (Loc loc, format::format_string< Args... > fmt, Args &&... args)
 
unsigned num_errors () const
 
unsigned num_warnings () const
 

Additional Inherited Members

- Public Types inherited from fe::SymPool
using String = Sym::String
 
- Public Member Functions inherited from fe::SymPool
 SymPool (const SymPool &)=delete
 
 SymPool () noexcept
 
 SymPool (SymPool &&other) noexcept
 
SymPooloperator= (SymPool)=delete
 
Sym sym (std::string_view s)
 
Sym sym (const std::string &s)
 
Sym sym (const char *s)
 s is a null-terminated C-string.
 

Detailed Description

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. Right now, it manages a SymPool (by inherting from it) and offers std::format-based diagnostics.

Definition at line 15 of file driver.h.

Member Function Documentation

◆ err()

template<class... Args>
void fe::Driver::err ( Loc loc,
format::format_string< Args... > fmt,
Args &&... args )
inline

Definition at line 26 of file driver.h.

◆ note()

template<class... Args>
static void fe::Driver::note ( Loc loc,
format::format_string< Args... > fmt,
Args &&... args )
inlinestatic

Definition at line 19 of file driver.h.

◆ num_errors()

unsigned fe::Driver::num_errors ( ) const
inline

Definition at line 31 of file driver.h.

◆ num_warnings()

unsigned fe::Driver::num_warnings ( ) const
inline

Definition at line 32 of file driver.h.

◆ warn()

template<class... Args>
void fe::Driver::warn ( Loc loc,
format::format_string< Args... > fmt,
Args &&... args )
inline

Definition at line 22 of file driver.h.


The documentation for this struct was generated from the following file: