|
FE 0.13.1
Header-only C++ frontend library
|
The Diag a Driver installs by default: colors a `citation` and drops its backticks - or keeps them verbatim without color; \` is a literal backtick. More...
#include <fe/diag.h>
Public Member Functions | |
| std::string | render (const std::function< std::string()> &) const override |
| Postprocesses the text of one Error::Msg; the identity here, see CodeDiag. | |
| Public Member Functions inherited from fe::Diag | |
| Diag ()=default | |
| Diag (const Diag &)=delete | |
| virtual | ~Diag () |
| virtual void | loc (std::ostream &, Loc) const |
| Just the position. | |
| virtual void | header (std::ostream &, Loc, Tag, std::string_view) const |
| The loc: tag: msg line. | |
| virtual void | snippet (std::ostream &, Loc, Tag) const |
| The underlined source excerpt. | |
| virtual void | note (std::ostream &, Loc, std::string_view) const |
| One note below the message it belongs to. | |
| virtual void | summary (std::ostream &, size_t num_errors, size_t num_warnings, bool truncated) const |
Additional Inherited Members | |
| Public Types inherited from fe::Diag | |
| enum class | Tag { Error , Warn , Note } |
| Static Public Member Functions inherited from fe::Diag | |
| static term::FG | tag2color (Tag) |
| Public Attributes inherited from fe::Diag | |
| uint32_t | gutter = 5 |
| Width of the line-number column. | |
| uint32_t | max_rows = 8 |
| Rows a snippet streams before eliding its middle; 0 elides nothing. | |
| uint32_t | max_errors = 0 |
| Errors recorded before the rest is dropped; 0 keeps everything. | |
| bool | no_snippet = false |
| If true, a diagnostic is only its header line. | |
| bool | werror = false |
| If true, a warning is recorded as an error. | |
| Loc::Style | loc_style = Loc::Style::Full |
| How Diag::loc spells out a position. | |
The Diag a Driver installs by default: colors a `citation` and drops its backticks - or keeps them verbatim without color; \` is a literal backtick.
|
overridevirtual |
Postprocesses the text of one Error::Msg; the identity here, see CodeDiag.
fmt captures its arguments by reference and is only valid for that one call. Reimplemented from fe::Diag.