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

Method pushIterValue

checker/cost.go:417–430  ·  view source on GitHub ↗
(varName string, rangeExpr ast.Expr)

Source from the content-addressed store, hash-verified

415}
416
417func (c *coster) pushIterValue(varName string, rangeExpr ast.Expr) {
418 entrySize := c.computeEntrySize(rangeExpr)
419 size := entrySize.valSize()
420 path := c.getPath(rangeExpr)
421 container := entrySize.container()
422 if container == types.UnknownKind {
423 container = c.getType(rangeExpr).Kind()
424 }
425 subpath := "@values"
426 if container == types.ListKind {
427 subpath = "@items"
428 }
429 c.localVars.push(varName, rangeExpr, append(path, subpath), size, nil)
430}
431
432func (c *coster) pushIterSingle(varName string, rangeExpr ast.Expr) {
433 entrySize := c.computeEntrySize(rangeExpr)

Callers 1

costComprehensionMethod · 0.95

Calls 7

computeEntrySizeMethod · 0.95
getPathMethod · 0.95
getTypeMethod · 0.95
valSizeMethod · 0.80
containerMethod · 0.80
KindMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected