MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / syntaxError

Method syntaxError

parser/parser.cc:1424–1435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1422}
1423
1424void 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
1437bool ParserVisitor::HasErrored() const { return factory_.HasErrors(); }
1438

Callers

nothing calls this directly

Calls 2

GetPositionMethod · 0.80
ReportErrorMethod · 0.45

Tested by

no test coverage detected