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

Function MaxRecursionDepth

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

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

Callers 8

configureMethod · 0.92
TestParserOptionErrorsFunction · 0.85
TestRecursionLimitFunction · 0.85
BenchmarkParseFunction · 0.85
BenchmarkParseParallelFunction · 0.85
newTestParserFunction · 0.85

Calls

no outgoing calls

Tested by 6

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