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

Method getPath

checker/cost.go:886–893  ·  view source on GitHub ↗
(e ast.Expr)

Source from the content-addressed store, hash-verified

884}
885
886func (c *coster) getPath(e ast.Expr) []string {
887 if e.Kind() == ast.IdentKind {
888 if v, found := c.peekLocalVar(e.AsIdent()); found {
889 return v.path[:]
890 }
891 }
892 return c.exprPaths[e.ID()][:]
893}
894
895func (c *coster) addPath(e ast.Expr, path []string) {
896 c.exprPaths[e.ID()] = path

Callers 8

pushIterKeyMethod · 0.95
pushIterValueMethod · 0.95
pushIterSingleMethod · 0.95
pushLocalVarMethod · 0.95
costSelectMethod · 0.95
costCallMethod · 0.95
newAstNodeMethod · 0.95
computeSizeMethod · 0.95

Calls 4

peekLocalVarMethod · 0.95
KindMethod · 0.65
AsIdentMethod · 0.65
IDMethod · 0.65

Tested by

no test coverage detected