EnableHiddenAccumulatorName sets the parser to use the identifier '@result' for accumulators which is not normally accessible from CEL source.
(enabled bool)
| 1053 | // EnableHiddenAccumulatorName sets the parser to use the identifier '@result' for accumulators |
| 1054 | // which is not normally accessible from CEL source. |
| 1055 | func EnableHiddenAccumulatorName(enabled bool) EnvOption { |
| 1056 | return func(e *Env) (*Env, error) { |
| 1057 | e.prsrOpts = append(e.prsrOpts, parser.EnableHiddenAccumulatorName(enabled)) |
| 1058 | return e, nil |
| 1059 | } |
| 1060 | } |
| 1061 | |
| 1062 | func maybeInteropProvider(provider any) (types.Provider, error) { |
| 1063 | switch p := provider.(type) { |