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

Method NewComprehension

parser/macro.go:236–236  ·  view source on GitHub ↗

NewComprehension creates a new one-variable comprehension instruction. - iterRange represents the expression that resolves to a list or map where the elements or keys (respectively) will be iterated over. - iterVar is the variable name for the list element value, or the map key, depending on the ra

(iterRange ast.Expr,
		iterVar,
		accuVar string,
		accuInit,
		condition,
		step,
		result ast.Expr)

Source from the content-addressed store, hash-verified

234 // environment in the step and condition expressions. Presently, the name __result__ is commonly
235 // used by built-in macros but this may change in the future.
236 NewComprehension(iterRange ast.Expr,
237 iterVar,
238 accuVar string,
239 accuInit,

Callers 8

pruneMethod · 0.65
newComprehensionMethod · 0.65
NewComprehensionMethod · 0.65
MakeMapFunction · 0.65
MakeFilterFunction · 0.65
makeQuantifierFunction · 0.65
celBindFunction · 0.65
sortByMacroFunction · 0.65

Implementers 1

exprHelperparser/helper.go

Calls

no outgoing calls

Tested by

no test coverage detected