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

Struct folder

interpreter/interpretable.go:1497–1511  ·  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

1495// in preserving evaluation order semantics which might otherwise be disrupted through the use of
1496// cel.bind or cel.@block.
1497type folder struct {
1498 *evalFold
1499 frame *ExecutionFrame
1500
1501 // fold state objects.
1502 accuVal ref.Val
1503 iterVar1Val any
1504 iterVar2Val any
1505
1506 // bookkeeping flags to modify Activation and fold behaviors.
1507 initialized bool
1508 mutableValue bool
1509 interrupted bool
1510 computeResult bool
1511}
1512
1513func (f *folder) foldIterable(iterable traits.Iterable) ref.Val {
1514 it := iterable.Iterator()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected