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

Method plan

interpreter/planner.go:87–107  ·  view source on GitHub ↗
(expr ast.Expr)

Source from the content-addressed store, hash-verified

85}
86
87func (p *planBuilder) plan(expr ast.Expr) (InterpretableV2, error) {
88 switch expr.Kind() {
89 case ast.CallKind:
90 return p.decorate(p.planCall(expr))
91 case ast.IdentKind:
92 return p.decorate(p.planIdent(expr))
93 case ast.LiteralKind:
94 return p.decorate(p.planConst(expr))
95 case ast.SelectKind:
96 return p.decorate(p.planSelect(expr))
97 case ast.ListKind:
98 return p.decorate(p.planCreateList(expr))
99 case ast.MapKind:
100 return p.decorate(p.planCreateMap(expr))
101 case ast.StructKind:
102 return p.decorate(p.planCreateStruct(expr))
103 case ast.ComprehensionKind:
104 return p.decorate(p.planComprehension(expr))
105 }
106 return nil, fmt.Errorf("unsupported expr: %v", expr)
107}
108
109// decorate applies the InterpretableDecorator functions to the given Interpretable.
110// Both the Interpretable and error generated by a Plan step are accepted as arguments

Callers 7

PlanMethod · 0.95
planSelectMethod · 0.95
planCallMethod · 0.95
planCreateListMethod · 0.95
planCreateMapMethod · 0.95
planCreateStructMethod · 0.95
planComprehensionMethod · 0.95

Calls 10

decorateMethod · 0.95
planCallMethod · 0.95
planIdentMethod · 0.95
planConstMethod · 0.95
planSelectMethod · 0.95
planCreateListMethod · 0.95
planCreateMapMethod · 0.95
planCreateStructMethod · 0.95
planComprehensionMethod · 0.95
KindMethod · 0.65

Tested by

no test coverage detected