| 20 | } |
| 21 | |
| 22 | void SyntaxErrorLogger::check_errors() { |
| 23 | stringstream error_msg; |
| 24 | error_msg << endl; |
| 25 | for (auto &e : _errors) { |
| 26 | error_msg << e.filename << ':' << e.line << ':' |
| 27 | << (uint32_t) e.charPosition << ":" << error_prefix |
| 28 | << "SyntaxError:" << e.message << endl; |
| 29 | } |
| 30 | if (_errors.size() > 0) { |
| 31 | throw ParseException(error_msg.str()); |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | void SyntaxErrorLogger::syntaxError(antlr4::Recognizer *recognizer, |
| 36 | antlr4::Token *UNUSED(offendingSymbol), size_t line, size_t charPositionInLine, |
no test coverage detected