mjplusplus
v0.4.1
|
#include <ErrorReporter.hpp>
Public Types | |
enum | ErrorType { LEXER, PARSER, SEMANTIC } |
Public Member Functions | |
void | recordError (ErrorReporter::ErrorType type, std::string const &error_msg, source_position_t position) |
void | recordError (ErrorReporter::ErrorType type, std::string const &error_msg) |
void | printErrors () const |
ErrorReporter (std::string const &file_name, bool recordErrors) | |
A common error reporter which can be used for lexer, parser and semantic errors
ErrorReporter::ErrorReporter | ( | std::string const & | file_name, |
bool | recordErrors | ||
) |
void ErrorReporter::printErrors | ( | ) | const |
Print all errors stored in the errors multimap to std::cerr. This should be called after parsing and semantic analysis are complete.
void ErrorReporter::recordError | ( | ErrorReporter::ErrorType | type, |
std::string const & | error_msg, | ||
source_position_t | position | ||
) |
void ErrorReporter::recordError | ( | ErrorReporter::ErrorType | type, |
std::string const & | error_msg | ||
) |