(recognizer antlr.Parser)
| 198 | } |
| 199 | |
| 200 | func (rl *recoveryLimitErrorStrategy) checkAttempts(recognizer antlr.Parser) { |
| 201 | if rl.recoveryAttempts == rl.errorRecoveryLimit { |
| 202 | rl.recoveryAttempts++ |
| 203 | msg := fmt.Sprintf("error recovery attempt limit exceeded: %d", rl.errorRecoveryLimit) |
| 204 | recognizer.NotifyErrorListeners(msg, nil, nil) |
| 205 | panic(&recoveryLimitError{ |
| 206 | message: msg, |
| 207 | }) |
| 208 | } |
| 209 | rl.recoveryAttempts++ |
| 210 | } |
| 211 | |
| 212 | var _ antlr.ErrorStrategy = &recoveryLimitErrorStrategy{} |
| 213 |
no outgoing calls
no test coverage detected