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