|
cparse
1.1.0
A small hand-written recursive-descent parser core for C++
|
A single diagnostic produced during parsing. More...
#include <Parser.hh>
Public Types | |
| enum class | Kind { Syntax , Type , Faulty , Internal , Warning } |
| Severity / category of a #ParseError. More... | |
Public Attributes | |
| Kind | kind { Kind::Internal } |
| Severity / category. | |
| std::string | message |
| Human-readable description. | |
| std::string | filename |
| Source file the error is in. | |
| unsigned long int | line { 0 } |
| 1-based line, or 0 if unknown. | |
| unsigned long int | col { 0 } |
| 1-based column, or 0 if unknown. | |
A single diagnostic produced during parsing.
Records are appended to the collector by Parser::recordError() and read back through Parser::errors() after parse() returns. A record carries its severity (Kind), a message, and the source location it was raised at (filename / line / column, filled from the cursor when the caller passes 0).
|
strong |