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

Struct folder

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

1537// in preserving evaluation order semantics which might otherwise be disrupted through the use of
1538// cel.bind or cel.@block.
1539type folder struct {
1540 *evalFold
1541 frame *ExecutionFrame
1542
1543 // fold state objects.
1544 accuVal ref.Val
1545 iterVar1Val any
1546 iterVar2Val any
1547
1548 // bookkeeping flags to modify Activation and fold behaviors.
1549 initialized bool
1550 mutableValue bool
1551 interrupted bool
1552 computeResult bool
1553}
1554
1555func (f *folder) foldIterable(iterable traits.Iterable) ref.Val {
1556 it := iterable.Iterator()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected