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

Function isEmptyRangeComprehension

cel/validator.go:528–534  ·  view source on GitHub ↗
(e ast.NavigableExpr)

Source from the content-addressed store, hash-verified

526}
527
528func isEmptyRangeComprehension(e ast.NavigableExpr) bool {
529 if e.Kind() != ast.ComprehensionKind {
530 return false
531 }
532 iterRange := e.AsComprehension().IterRange()
533 return iterRange.Kind() == ast.ListKind && iterRange.AsList().Size() == 0
534}
535
536func isCelBind(e ast.NavigableExpr) bool {
537 if !isEmptyRangeComprehension(e) {

Callers 2

ValidateMethod · 0.85
isCelBindFunction · 0.85

Calls 5

KindMethod · 0.65
IterRangeMethod · 0.65
AsComprehensionMethod · 0.65
SizeMethod · 0.65
AsListMethod · 0.65

Tested by

no test coverage detected