31 ErrorMessage::MessageType type;
34 Check(
const std::string &msg, ErrorMessage::MessageType type)
35 : msg(msg), type(type), matched(
false) {}
38 static constexpr int NO_SOURCE = 0;
40 std::unordered_map<int, std::vector<Check>> checks;
41 std::vector<std::string> unexpected_errors;
42 bool has_error_checks =
false;
43 bool match_checks(
const ErrorMessage &msg);
44 bool match_check(ErrorMessage::MessageType type,
int line,
const std::string &msg);
47 void emit_message(
const ErrorMessage &msg)
override;
49 void emit_message(
const ParserErrorMessage &msg)
override;
52 enum class CheckResult { NO_TESTS, SUCCESS, FAILURE };
54 void increment_the_error_count() { ++this->errorCount; }
62 void add_check(ErrorMessage::MessageType type,
const std::string &msg);
72 void add_check(ErrorMessage::MessageType type,
int line,
const std::string &msg);
CheckResult verify_checks() const
Verify error/warning checks in the program. During compilation, if an error/warning message matches t...
Definition bf_error_reporter.cpp:151
void add_check(ErrorMessage::MessageType type, const std::string &msg)
Adds a check with no specified source code line.
Definition bf_error_reporter.cpp:98