Components related to parser error reporting and exception handling.
More...
|
#define | ERROR_TYPE(NAME) |
| Enumeration of Circus parser error types.
|
#define | ERROR_TYPE(NAME) |
| Enumeration of Circus parser error types.
|
#define | ERROR_TYPEs ERROR_TYPE(SYNTAX) |
|
enum | CIRCUS_ERROR_TYPES : std::uint64_t { ERROR_TYPEs
} |
|
| circus::error::parser_error::parser_error (flag_type E, const std::string &what) |
| Constructs a parser error with a flag type and descriptive message.
|
bool | circus::error::parser_reporter::empty () const noexcept |
| Checks if there are any errors logged.
|
void | circus::error::parser_reporter::report (const flag_type &type, const std::string &message, std::pair< std::size_t, std::size_t > location) noexcept |
| Reports an error by adding a formatted message to the error log stack.
|
void | circus::error::parser_reporter::log_errors () noexcept |
| Logs all errors to std::clog and preserves the error stack.
|
void | circus::error::parser_reporter::flush_errors () noexcept |
| Clears all errors from the error log stack.
|
template<typename E>
requires std::is_enum_v<E> |
constexpr E | circus::error::operator| (E lhs, E rhs) |
| Bitwise OR operator for enum error types.
|
template<typename E>
requires std::is_enum_v<E> |
constexpr E | circus::error::operator& (E lhs, E rhs) |
| Bitwise AND operator for enum error types.
|
template<typename E>
requires std::is_enum_v<E> |
constexpr E | circus::error::operator~ (E val) |
| Bitwise NOT operator for enum error types.
|
Components related to parser error reporting and exception handling.
◆ ERROR_TYPE [1/2]
#define ERROR_TYPE |
( |
| NAME | ) |
|
Value:
Enumeration of Circus parser error types.
String names corresponding to error types.
◆ ERROR_TYPE [2/2]
#define ERROR_TYPE |
( |
| NAME | ) |
|
Value:
Enumeration of Circus parser error types.
String names corresponding to error types.
◆ empty()
bool circus::error::parser_reporter::empty |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Checks if there are any errors logged.
- Returns
- true if error stack is empty, false otherwise.
◆ operator&()
template<typename E>
requires std::is_enum_v<E>
E circus::error::operator& |
( |
E | lhs, |
|
|
E | rhs ) |
|
constexpr |
Bitwise AND operator for enum error types.
- Template Parameters
-
- Parameters
-
lhs | Left-hand operand. |
rhs | Right-hand operand. |
- Returns
- Bitwise AND of lhs and rhs.
◆ operator|()
template<typename E>
requires std::is_enum_v<E>
E circus::error::operator| |
( |
E | lhs, |
|
|
E | rhs ) |
|
constexpr |
Bitwise OR operator for enum error types.
- Template Parameters
-
- Parameters
-
lhs | Left-hand operand. |
rhs | Right-hand operand. |
- Returns
- Bitwise OR of lhs and rhs.
◆ operator~()
template<typename E>
requires std::is_enum_v<E>
E circus::error::operator~ |
( |
E | val | ) |
|
|
constexpr |
Bitwise NOT operator for enum error types.
- Template Parameters
-
- Parameters
-
- Returns
- Bitwise NOT of val.
◆ parser_error()
circus::error::parser_error::parser_error |
( |
flag_type | E, |
|
|
const std::string & | what ) |
|
inline |
Constructs a parser error with a flag type and descriptive message.
- Parameters
-
E | The error flag. |
what | The error message. |
◆ report()
void circus::error::parser_reporter::report |
( |
const flag_type & | type, |
|
|
const std::string & | message, |
|
|
std::pair< std::size_t, std::size_t > | location ) |
|
inlinenoexcept |
Reports an error by adding a formatted message to the error log stack.
- Parameters
-
type | The error flag. |
message | The error message. |
location | The source location as (line, column). |
◆ REFLECTED_ERROR_MAP
const char* circus::error::REFLECTED_ERROR_MAP[] |
|
inline |