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

Method reportError

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

Source from the content-addressed store, hash-verified

903}
904
905func (p *parser) reportError(ctx any, format string, args ...any) ast.Expr {
906 var location common.Location
907 err := p.helper.newExpr(ctx)
908 switch c := ctx.(type) {
909 case common.Location:
910 location = c
911 case antlr.Token, antlr.ParserRuleContext:
912 location = p.helper.getLocation(err.ID())
913 }
914 // Provide arguments to the report error.
915 p.errors.reportErrorAtID(err.ID(), location, format, args...)
916 return err
917}
918
919// ANTLR Parse listener implementations
920func (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