1 #ifndef COMPILER_ERRORHANDLER_H_INCLUDED
2 #define COMPILER_ERRORHANDLER_H_INCLUDED
Type
Definition: errorhandler.hpp:23
void error(const std::string &message, const TokenLoc &loc)
Generate an error message.
Definition: errorhandler.cpp:49
void message(CodeContainer &code, Literals &literals, const std::string &message, int buttons)
Definition: generator.cpp:537
int mWarningsMode
Definition: errorhandler.hpp:18
int countWarnings() const
Return number of warnings.
Definition: errorhandler.cpp:26
Location of a token in a source file.
Definition: tokenloc.hpp:10
void setWarningsMode(int mode)
// 0 ignore, 1 rate as warning, 2 rate as error
Definition: errorhandler.cpp:76
Definition: errorhandler.hpp:25
virtual void reset()
Remove all previous error/warning events.
Definition: errorhandler.cpp:71
ErrorDowngrade(const ErrorDowngrade &)
not implemented
virtual ~ErrorHandler()
destructor
Definition: errorhandler.cpp:8
void downgradeErrors(bool downgrade)
Treat errors as warnings.
Definition: errorhandler.cpp:81
void warning(const std::string &message, const TokenLoc &loc)
Generate a warning message.
Definition: errorhandler.cpp:33
Error handling.
Definition: errorhandler.hpp:14
int mWarnings
Definition: errorhandler.hpp:16
ErrorDowngrade & operator=(const ErrorDowngrade &)
not implemented
Definition: errorhandler.hpp:74
Definition: errorhandler.hpp:25
virtual void report(const std::string &message, const TokenLoc &loc, Type type)=0
Report error to the user.
ErrorHandler & mHandler
Definition: errorhandler.hpp:76
bool isGood() const
Was compiling successful?
Definition: errorhandler.cpp:12
~ErrorDowngrade()
Definition: errorhandler.cpp:92
void endOfFile()
Generate an error message for an unexpected EOF.
Definition: errorhandler.cpp:63
int countErrors() const
Return number of errors.
Definition: errorhandler.cpp:19
ErrorHandler()
constructor
Definition: errorhandler.cpp:5
bool mDowngradeErrors
Definition: errorhandler.hpp:19
int mErrors
Definition: errorhandler.hpp:17