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

Function matchIsConstantValue

common/ast/navigable.go:277–290  ·  view source on GitHub ↗
(e NavigableExpr)

Source from the content-addressed store, hash-verified

275}
276
277func matchIsConstantValue(e NavigableExpr) bool {
278 if e.Kind() == LiteralKind {
279 return true
280 }
281 if e.Kind() == StructKind || e.Kind() == MapKind || e.Kind() == ListKind {
282 for _, child := range e.Children() {
283 if !matchIsConstantValue(child) {
284 return false
285 }
286 }
287 return true
288 }
289 return false
290}
291
292func newNavigableExpr(ast *AST, parent NavigableExpr, expr Expr, depth int) NavigableExpr {
293 // Reduce navigable expression nesting by unwrapping the embedded Expr value.

Callers

nothing calls this directly

Calls 2

KindMethod · 0.65
ChildrenMethod · 0.65

Tested by

no test coverage detected