| 1422 | } |
| 1423 | |
| 1424 | void ParserVisitor::syntaxError(antlr4::Recognizer* recognizer, |
| 1425 | antlr4::Token* offending_symbol, size_t line, |
| 1426 | size_t col, const std::string& msg, |
| 1427 | std::exception_ptr e) { |
| 1428 | cel::SourceRange range; |
| 1429 | if (auto position = source_.GetPosition(cel::SourceLocation{ |
| 1430 | static_cast<int32_t>(line), static_cast<int32_t>(col)}); |
| 1431 | position) { |
| 1432 | range.begin = *position; |
| 1433 | } |
| 1434 | factory_.ReportError(range, absl::StrCat("Syntax error: ", msg)); |
| 1435 | } |
| 1436 | |
| 1437 | bool ParserVisitor::HasErrored() const { return factory_.HasErrors(); } |
| 1438 |
nothing calls this directly
no test coverage detected