MCPcopy Create free account
hub / github.com/cel-expr/cel-go / reportError

Method reportError

parser/parser.go:897–909  ·  view source on GitHub ↗
(ctx any, format string, args ...any)

Source from the content-addressed store, hash-verified

895}
896
897func (p *parser) reportError(ctx any, format string, args ...any) ast.Expr {
898 var location common.Location
899 err := p.helper.newExpr(ctx)
900 switch c := ctx.(type) {
901 case common.Location:
902 location = c
903 case antlr.Token, antlr.ParserRuleContext:
904 location = p.helper.getLocation(err.ID())
905 }
906 // Provide arguments to the report error.
907 p.errors.reportErrorAtID(err.ID(), location, format, args...)
908 return err
909}
910
911// ANTLR Parse listener implementations
912func (p *parser) SyntaxError(recognizer antlr.Recognizer, offendingSymbol any, line, column int, msg string, e antlr.RecognitionException) {

Callers 15

ParseMethod · 0.95
VisitMethod · 0.95
VisitConditionalOrMethod · 0.95
VisitConditionalAndMethod · 0.95
VisitRelationMethod · 0.95
VisitCalcMethod · 0.95
VisitSelectMethod · 0.95
VisitIndexMethod · 0.95
VisitIdentMethod · 0.95
VisitGlobalCallMethod · 0.95

Calls 4

getLocationMethod · 0.80
reportErrorAtIDMethod · 0.80
IDMethod · 0.65
newExprMethod · 0.45

Tested by

no test coverage detected