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

Function EnableHiddenAccumulatorName

parser/options.go:159–164  ·  view source on GitHub ↗

EnableHiddenAccumulatorName uses an accumulator variable name that is not a normally accessible identifier in source for comprehension macros. Compatibility notes: with this option enabled, a parsed AST would be semantically the same as if disabled, but would have different internal identifiers in a

(enabled bool)

Source from the content-addressed store, hash-verified

157// have different internal identifiers in any of the built-in comprehension sub-expressions. When
158// disabled, it is possible but almost certainly a logic error to access the accumulator variable.
159func EnableHiddenAccumulatorName(enabled bool) Option {
160 return func(opts *options) error {
161 opts.enableHiddenAccumulatorName = enabled
162 return nil
163 }
164}
165
166// EnableVariadicOperatorASTs enables a compact representation of chained like-kind commutative
167// operators. e.g. `a || b || c || d` -> `call(op='||', args=[a, b, c, d])`

Callers 2

parser_test.goFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected