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

Function MaxExpressionNodeCount

parser/options.go:105–113  ·  view source on GitHub ↗

MaxExpressionNodeCount limits the maximum number of expression nodes that may be emitted by the parser, including nodes created by macro expansion.

(limit int)

Source from the content-addressed store, hash-verified

103// MaxExpressionNodeCount limits the maximum number of expression nodes that may be emitted by the parser,
104// including nodes created by macro expansion.
105func MaxExpressionNodeCount(limit int) Option {
106 return func(opts *options) error {
107 if limit < -1 {
108 return fmt.Errorf("max expression node count must be greater than or equal to -1: %d", limit)
109 }
110 opts.maxExpressionNodeCount = limit
111 return nil
112 }
113}
114
115// Macros adds the given macros to the parser.
116func Macros(macros ...Macro) Option {

Callers 3

configureMethod · 0.92
TestParserOptionErrorsFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestParserOptionErrorsFunction · 0.68