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

Method checkAttempts

parser/parser.go:306–316  ·  view source on GitHub ↗
(recognizer antlr.Parser)

Source from the content-addressed store, hash-verified

304}
305
306func (rl *recoveryLimitErrorStrategy) checkAttempts(recognizer antlr.Parser) {
307 if rl.recoveryAttempts == rl.errorRecoveryLimit {
308 rl.recoveryAttempts++
309 msg := fmt.Sprintf("error recovery attempt limit exceeded: %d", rl.errorRecoveryLimit)
310 recognizer.NotifyErrorListeners(msg, nil, nil)
311 panic(&recoveryLimitError{
312 message: msg,
313 })
314 }
315 rl.recoveryAttempts++
316}
317
318var _ antlr.ErrorStrategy = &recoveryLimitErrorStrategy{}
319

Callers 2

RecoverMethod · 0.95
RecoverInlineMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected