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

Method ProgramOptions

ext/regex.go:169–178  ·  view source on GitHub ↗

ProgramOptions implements the cel.Library interface method

()

Source from the content-addressed store, hash-verified

167
168// ProgramOptions implements the cel.Library interface method
169func (r *regexLib) ProgramOptions() []cel.ProgramOption {
170 return []cel.ProgramOption{
171 cel.CostTrackerOptions(
172 interpreter.OverloadCostTracker("regex_extract_string_string", extractCostTracker()),
173 interpreter.OverloadCostTracker("regex_extractAll_string_string", extractAllCostTracker()),
174 interpreter.OverloadCostTracker("regex_replace_string_string_string", replaceCostTracker()),
175 interpreter.OverloadCostTracker("regex_replace_string_string_string_int", replaceCostTracker()),
176 ),
177 }
178}
179
180func regReplace(args ...ref.Val) ref.Val {
181 target := args[0].(types.String)

Callers

nothing calls this directly

Calls 5

CostTrackerOptionsFunction · 0.92
OverloadCostTrackerFunction · 0.92
extractCostTrackerFunction · 0.85
extractAllCostTrackerFunction · 0.85
replaceCostTrackerFunction · 0.85

Tested by

no test coverage detected