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

Function EnableHiddenAccumulatorName

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

144// have different internal identifiers in any of the built-in comprehension sub-expressions. When
145// disabled, it is possible but almost certainly a logic error to access the accumulator variable.
146func EnableHiddenAccumulatorName(enabled bool) Option {
147 return func(opts *options) error {
148 opts.enableHiddenAccumulatorName = enabled
149 return nil
150 }
151}
152
153// EnableVariadicOperatorASTs enables a compact representation of chained like-kind commutative
154// 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