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

Function getChildFactory

common/ast/navigable.go:592–616  ·  view source on GitHub ↗
(expr Expr)

Source from the content-addressed store, hash-verified

590func (f navigableFieldImpl) isEntryExpr() {}
591
592func getChildFactory(expr Expr) childFactory {
593 if expr == nil {
594 return noopFactory
595 }
596 switch expr.Kind() {
597 case LiteralKind:
598 return noopFactory
599 case IdentKind:
600 return noopFactory
601 case SelectKind:
602 return selectFactory
603 case CallKind:
604 return callArgFactory
605 case ListKind:
606 return listElemFactory
607 case MapKind:
608 return mapEntryFactory
609 case StructKind:
610 return structEntryFactory
611 case ComprehensionKind:
612 return comprehensionFactory
613 default:
614 return noopFactory
615 }
616}
617
618type childFactory func(*navigableExprImpl) []NavigableExpr
619

Callers 1

newNavigableExprFunction · 0.85

Calls 1

KindMethod · 0.65

Tested by

no test coverage detected