(recognizer antlr.Parser)
| 298 | } |
| 299 | |
| 300 | func (rl *recoveryLimitErrorStrategy) RecoverInline(recognizer antlr.Parser) antlr.Token { |
| 301 | rl.checkAttempts(recognizer) |
| 302 | lc := &lookaheadConsumer{Parser: recognizer, errorRecoveryTokenLookaheadLimit: rl.errorRecoveryTokenLookaheadLimit} |
| 303 | return rl.DefaultErrorStrategy.RecoverInline(lc) |
| 304 | } |
| 305 | |
| 306 | func (rl *recoveryLimitErrorStrategy) checkAttempts(recognizer antlr.Parser) { |
| 307 | if rl.recoveryAttempts == rl.errorRecoveryLimit { |