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

Method ProgramOptions

ext/regex.go:170–179  ·  view source on GitHub ↗

ProgramOptions implements the cel.Library interface method

()

Source from the content-addressed store, hash-verified

168
169// ProgramOptions implements the cel.Library interface method
170func (r *regexLib) ProgramOptions() []cel.ProgramOption {
171 return []cel.ProgramOption{
172 cel.CostTrackerOptions(
173 interpreter.OverloadCostTracker("regex_extract_string_string", extractCostTracker()),
174 interpreter.OverloadCostTracker("regex_extractAll_string_string", extractAllCostTracker()),
175 interpreter.OverloadCostTracker("regex_replace_string_string_string", replaceCostTracker()),
176 interpreter.OverloadCostTracker("regex_replace_string_string_string_int", replaceCostTracker()),
177 ),
178 }
179}
180
181func regReplace(args ...ref.Val) ref.Val {
182 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