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

Function getChildFactory

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

Source from the content-addressed store, hash-verified

567func (f navigableFieldImpl) isEntryExpr() {}
568
569func getChildFactory(expr Expr) childFactory {
570 if expr == nil {
571 return noopFactory
572 }
573 switch expr.Kind() {
574 case LiteralKind:
575 return noopFactory
576 case IdentKind:
577 return noopFactory
578 case SelectKind:
579 return selectFactory
580 case CallKind:
581 return callArgFactory
582 case ListKind:
583 return listElemFactory
584 case MapKind:
585 return mapEntryFactory
586 case StructKind:
587 return structEntryFactory
588 case ComprehensionKind:
589 return comprehensionFactory
590 default:
591 return noopFactory
592 }
593}
594
595type childFactory func(*navigableExprImpl) []NavigableExpr
596

Callers 1

newNavigableExprFunction · 0.85

Calls 1

KindMethod · 0.65

Tested by

no test coverage detected