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

Method pushLocalVar

checker/cost.go:448–454  ·  view source on GitHub ↗
(varName string, e ast.Expr)

Source from the content-addressed store, hash-verified

446}
447
448func (c *coster) pushLocalVar(varName string, e ast.Expr) {
449 path := c.getPath(e)
450 // note: retrieve the entry size for the local variable based on the size of the binding expression
451 // since the binding expression could be a list or map, the entry size should also be propagated
452 entrySize := c.computeEntrySize(e)
453 c.localVars.push(varName, e, path, c.computeSize(e), entrySize)
454}
455
456func (c *coster) peekLocalVar(varName string) (*localVar, bool) {
457 return c.localVars.peek(varName)

Callers 2

costComprehensionMethod · 0.95
costBindMethod · 0.95

Calls 4

getPathMethod · 0.95
computeEntrySizeMethod · 0.95
computeSizeMethod · 0.95
pushMethod · 0.45

Tested by

no test coverage detected