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
| 1495 | // in preserving evaluation order semantics which might otherwise be disrupted through the use of |
| 1496 | // cel.bind or cel.@block. |
| 1497 | type 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 | |
| 1513 | func (f *folder) foldIterable(iterable traits.Iterable) ref.Val { |
| 1514 | it := iterable.Iterator() |
nothing calls this directly
no outgoing calls
no test coverage detected