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

Struct folder

interpreter/interpretable.go:1967–1982  ·  view source on GitHub ↗

folder tracks the state associated with folding a list or map with a comprehension v2 style macro. The folder embeds an interpreter.Activation and Interpretable evalFold value as well as implements the traits.Folder interface methods. Instances of a folder are intended to be pooled to minimize all

Source from the content-addressed store, hash-verified

1965// in preserving evaluation order semantics which might otherwise be disrupted through the use of
1966// cel.bind or cel.@block.
1967type folder struct {
1968 *evalFold
1969 frame *ExecutionFrame
1970
1971 // fold state objects.
1972 accuVal ref.Val
1973 iterVar1Val any
1974 iterVar2Val any
1975
1976 // bookkeeping flags to modify Activation and fold behaviors.
1977 initialized bool
1978 mutableValue bool
1979 interrupted bool
1980 computeResult bool
1981 listV1Fold bool
1982}
1983
1984func (f *folder) foldIterable(iterable traits.Iterable) ref.Val {
1985 it := iterable.Iterator()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected