#include "error.h"
#include "LocationNode.hpp"
#include <list>
#include <exception>
#include <cstdarg>
Go to the source code of this file.
Namespaces | |
namespace | cfront |
Data Structures | |
class | cfront::UncontinuableError |
class | cfront::InternalError |
Defines | |
#define | ERROR_BASIC(code, fmt, filename, ln, col, logs,...) |
#define | POSTPROCESS_ERROR |
#define | ERROR(code, fmt, logs, locNode) |
#define | ERROR1(code, fmt, logs, locNode) |
#define | ERROR2(code, fmt, logs, tokenNode1, tokenNode2) |
#define | WARNING(code, fmt, logs, locNode) |
Typedefs | |
typedef std::list< ctrump_loginfo > | cfront::Logs |
Functions | |
void | ctrump_report_log (struct ctrump_loginfo *logInfo) |
void | ctrump_add_log (cfront::Logs *logs, int logLevel, enum ctrump_error_code code, const char *fmt, const cfront::Location &location,...) |
Definition in file CFrontError.hpp.
#define ERROR | ( | code, | |||
fmt, | |||||
logs, | |||||
locNode | ) |
Value:
do { \ ctrump_add_log(logs, CTRUMP_LOGLEVEL_ERROR, code, fmt, \ (locNode)->getLocation(), NULL); \ POSTPROCESS_ERROR; \ } while (0)
Definition at line 109 of file CFrontError.hpp.
Referenced by cfront::CAnalyzer::checkArrayInitializer(), cfront::CAnalyzer::setTypeAttribute(), cfront::CAnalyzer::typeAssignmentExpr(), cfront::CAnalyzer::typeCastExpr(), and cfront::CAnalyzer::typeExpr().
#define ERROR1 | ( | code, | |||
fmt, | |||||
logs, | |||||
locNode | ) |
Value:
do { \ ctrump_add_log(logs, CTRUMP_LOGLEVEL_ERROR, code, fmt, \ (locNode)->getLocation(), \ (locNode)->getText().c_str(), NULL); \ POSTPROCESS_ERROR; \ } while (0)
Definition at line 121 of file CFrontError.hpp.
Referenced by cfront::CAnalyzer::checkBinaryArithmetic(), cfront::CAnalyzer::checkStructOrUnionDefinition(), cfront::CAnalyzer::parseIntegerConstant(), cfront::CAnalyzer::typeAssignmentExpr(), cfront::CAnalyzer::typeComparisonExpr(), cfront::CAnalyzer::typeExpr(), cfront::CAnalyzer::typeFunctionArgument(), and cfront::CAnalyzer::typeFunctionArguments().
#define ERROR2 | ( | code, | |||
fmt, | |||||
logs, | |||||
tokenNode1, | |||||
tokenNode2 | ) |
Value:
do { \ ctrump_add_log(logs, CTRUMP_LOGLEVEL_ERROR, code, fmt, \ (tokenNode1)->getLocation(), \ (tokenNode1)->getText().c_str(), \ (tokenNode2)->getText().c_str(), \ NULL); \ POSTPROCESS_ERROR; \ } while (0)
Definition at line 134 of file CFrontError.hpp.
#define ERROR_BASIC | ( | code, | |||
fmt, | |||||
filename, | |||||
ln, | |||||
col, | |||||
logs, | |||||
... | ) |
Value:
do { \ Location loc; \ loc.filePath = (filename); \ loc.line = (ln); \ loc.column = (col); \ ctrump_add_log((logs), CTRUMP_LOGLEVEL_ERROR, (code), (fmt), loc, __VA_ARGS__); \ } while (0)
Definition at line 85 of file CFrontError.hpp.
Referenced by ctrump_parse(), and setInternalError().
#define POSTPROCESS_ERROR |
Definition at line 101 of file CFrontError.hpp.
#define WARNING | ( | code, | |||
fmt, | |||||
logs, | |||||
locNode | ) |
Value:
do { \ ctrump_add_log(logs, CTRUMP_LOGLEVEL_WARNING, code, fmt, \ (locNode)->getLocation(), NULL); \ } while (0)
Definition at line 144 of file CFrontError.hpp.
Referenced by cfront::CAnalyzer::getInitializerListElemType(), cfront::CAnalyzer::parseGccAttribute(), and cfront::CAnalyzer::typeAssignmentExpr().
void ctrump_add_log | ( | cfront::Logs * | logs, | |
int | logLevel, | |||
enum ctrump_error_code | code, | |||
const char * | fmt, | |||
const cfront::Location & | location, | |||
... | ||||
) |
Definition at line 110 of file CFrontError.cpp.
References cfront::Location::column, ctrump_log(), CTRUMP_LOGLEVEL_ERROR, cfront::Location::filePath, cfront::Location::line, MAX_MESSAGE_LEN, and MAX_TOKEN_LEN.
void ctrump_report_log | ( | struct ctrump_loginfo * | logInfo | ) |
Definition at line 96 of file CFrontError.cpp.
References ctrump_loginfo::column, ctrump_get_loginfo_message(), CTRUMP_LOGLEVEL_ERROR, CTRUMP_LOGLEVEL_WARNING, ctrump_loginfo::filename, ctrump_loginfo::line, and ctrump_loginfo::logLevel.
Referenced by ctrump_log().