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

Function ExpressionSizeCodePointLimit

parser/options.go:90–98  ·  view source on GitHub ↗

ExpressionSizeCodePointLimit is an option which limits the maximum code point count of an expression.

(expressionSizeCodePointLimit int)

Source from the content-addressed store, hash-verified

88// ExpressionSizeCodePointLimit is an option which limits the maximum code point count of an
89// expression.
90func ExpressionSizeCodePointLimit(expressionSizeCodePointLimit int) Option {
91 return func(opts *options) error {
92 if expressionSizeCodePointLimit < -1 {
93 return fmt.Errorf("expression size code point limit must be greater than or equal to -1: %d", expressionSizeCodePointLimit)
94 }
95 opts.expressionSizeCodePointLimit = expressionSizeCodePointLimit
96 return nil
97 }
98}
99
100// Macros adds the given macros to the parser.
101func Macros(macros ...Macro) Option {

Callers 3

configureMethod · 0.92
TestParserOptionErrorsFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestParserOptionErrorsFunction · 0.68