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

Method sanitizeMacro

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

Source from the content-addressed store, hash-verified

564}
565
566func (opt *optimizerExprFactory) sanitizeMacro(macroID int64, macroExpr ast.Expr) {
567 macroRefVisitor := ast.NewExprVisitor(func(e ast.Expr) {
568 if _, exists := opt.sourceInfo.GetMacroCall(e.ID()); exists && e.ID() != macroID {
569 e.SetKindCase(nil)
570 }
571 })
572 ast.PostOrderVisit(macroExpr, macroRefVisitor)
573}

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