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

Function MaxRecursionDepth

parser/options.go:37–45  ·  view source on GitHub ↗

MaxRecursionDepth limits the maximum depth the parser will attempt to parse the expression before giving up.

(limit int)

Source from the content-addressed store, hash-verified

35
36// MaxRecursionDepth limits the maximum depth the parser will attempt to parse the expression before giving up.
37func MaxRecursionDepth(limit int) Option {
38 return func(opts *options) error {
39 if limit < -1 {
40 return fmt.Errorf("max recursion depth must be greater than or equal to -1: %d", limit)
41 }
42 opts.maxRecursionDepth = limit
43 return nil
44 }
45}
46
47// ErrorRecoveryLookaheadTokenLimit limits the number of lexer tokens that may be considered during error recovery.
48//

Callers 5

configureMethod · 0.92
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