|
IDL compiler front-end library
|
Compiler messages output. More...
#include <MessageOut.h>
Public Types | |
| enum class | MessageType { ERROR , WARNING , MESSAGE } |
| Message types. More... | |
Public Member Functions | |
| MessageOut (std::ostream &out=std::cerr, unsigned max_err_cnt=20) | |
| void | message (const AST::Location &l, MessageType mt, const std::string &msg) |
| void | message (const std::exception &ex) |
| unsigned | error_count () const noexcept |
Compiler messages output.
Definition at line 41 of file MessageOut.h.
|
strong |
Message types.
| Enumerator | |
|---|---|
| ERROR | Error message. |
| WARNING | Warning message. |
| MESSAGE | Informational message. |
Definition at line 53 of file MessageOut.h.
| BE::MessageOut::MessageOut | ( | std::ostream & | out = std::cerr, |
| unsigned | max_err_cnt = 20 |
||
| ) |
Constructor.
| out | Output stream. Default is std::cerr. |
| max_err_cnt | Maximal error count. When count of MessageType::ERROR messages reaches this limit, the std::runtime_error exception is thrown. |
| void BE::MessageOut::message | ( | const AST::Location & | l, |
| MessageType | mt, | ||
| const std::string & | msg | ||
| ) |
Print message to the output stream.
| l | AST::Location info. |
| mt | The message type. |
| msg | The message. |
| void BE::MessageOut::message | ( | const std::exception & | ex | ) |
Print exception information to the output stream.
| ex | An exception. |
|
inlinenoexcept |
Definition at line 73 of file MessageOut.h.