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

Function MaxExpressionNodeCount

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

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

Callers 3

configureMethod · 0.92
TestParserOptionErrorsFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestParserOptionErrorsFunction · 0.68