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

Function ErrorRecoveryLimit

parser/options.go:66–74  ·  view source on GitHub ↗

ErrorRecoveryLimit limits the number of attempts the parser will perform to recover from an error.

(limit int)

Source from the content-addressed store, hash-verified

64
65// ErrorRecoveryLimit limits the number of attempts the parser will perform to recover from an error.
66func ErrorRecoveryLimit(limit int) Option {
67 return func(opts *options) error {
68 if limit < -1 {
69 return fmt.Errorf("error recovery limit must be greater than or equal to -1: %d", limit)
70 }
71 opts.errorRecoveryLimit = limit
72 return nil
73 }
74}
75
76// ErrorReportingLimit limits the number of syntax error reports before terminating parsing.
77//

Callers 6

configureMethod · 0.92
parser_test.goFile · 0.85
TestParserOptionErrorsFunction · 0.85
BenchmarkParseFunction · 0.85
BenchmarkParseParallelFunction · 0.85
newTestParserFunction · 0.85

Calls

no outgoing calls

Tested by 4

TestParserOptionErrorsFunction · 0.68
BenchmarkParseFunction · 0.68
BenchmarkParseParallelFunction · 0.68
newTestParserFunction · 0.68