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

Function isCelBind

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

Source from the content-addressed store, hash-verified

592}
593
594func isCelBind(e ast.NavigableExpr) bool {
595 if !isEmptyRangeComprehension(e) {
596 return false
597 }
598 compre := e.AsComprehension()
599 loopCond := compre.LoopCondition()
600 loopStep := compre.LoopStep()
601 return compre.IterVar() == unusedIterVar &&
602 loopCond.Kind() == ast.LiteralKind && loopCond.AsLiteral().Value() == false &&
603 loopStep.Kind() == ast.IdentKind && loopStep.AsIdent() == compre.AccuVar()
604}
605
606func isRegexFunctionName(fn string) bool {
607 return fn == overloads.Matches || fn == "matches" || fn == "regex.extract" || fn == "regex.extractAll" || fn == "regex.replace"

Callers 1

ValidateMethod · 0.85

Calls 10

AsComprehensionMethod · 0.65
LoopConditionMethod · 0.65
LoopStepMethod · 0.65
IterVarMethod · 0.65
KindMethod · 0.65
ValueMethod · 0.65
AsLiteralMethod · 0.65
AsIdentMethod · 0.65
AccuVarMethod · 0.65

Tested by

no test coverage detected