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

Function ErrorRecoveryLimit

parser/options.go:65–73  ·  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

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

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