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

Function MaxRecursionDepth

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

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

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