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

Function updateMetadata

cel/folding.go:313–325  ·  view source on GitHub ↗
(a *ast.AST, targetID, updatedID int64)

Source from the content-addressed store, hash-verified

311}
312
313func updateMetadata(a *ast.AST, targetID, updatedID int64) {
314 if a == nil {
315 return
316 }
317 if ref, found := a.ReferenceMap()[updatedID]; found {
318 a.ReferenceMap()[targetID] = ref
319 } else {
320 delete(a.ReferenceMap(), targetID)
321 }
322 if t, found := a.TypeMap()[updatedID]; found {
323 a.TypeMap()[targetID] = t
324 }
325}
326
327func isBoolType(a *ast.AST, e ast.Expr) bool {
328 if a != nil && a.GetType(e.ID()) == types.BoolType {

Callers 3

maybePruneBranchesFunction · 0.85
maybeShortcircuitLogicFunction · 0.85
TestUpdateMetadataFunction · 0.85

Calls 2

ReferenceMapMethod · 0.80
TypeMapMethod · 0.80

Tested by 1

TestUpdateMetadataFunction · 0.68