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

Method sanitizeMacro

cel/optimizer.go:572–579  ·  view source on GitHub ↗
(macroID int64, macroExpr ast.Expr)

Source from the content-addressed store, hash-verified

570}
571
572func (opt *optimizerExprFactory) sanitizeMacro(macroID int64, macroExpr ast.Expr) {
573 macroRefVisitor := ast.NewExprVisitor(func(e ast.Expr) {
574 if _, exists := opt.sourceInfo.GetMacroCall(e.ID()); exists && e.ID() != macroID {
575 e.SetKindCase(nil)
576 }
577 })
578 ast.PostOrderVisit(macroExpr, macroRefVisitor)
579}

Callers 2

NewBindMacroMethod · 0.95
NewHasMacroMethod · 0.95

Calls 5

NewExprVisitorFunction · 0.92
PostOrderVisitFunction · 0.92
GetMacroCallMethod · 0.80
IDMethod · 0.65
SetKindCaseMethod · 0.65

Tested by

no test coverage detected