OptimizeRegex provides a way to replace the InterpretableCall for regex functions. This can be used to compile regex string constants at program creation time and report any errors and then use the compiled regex for all regex function invocations.
(regexOptimizations ...*interpreter.RegexOptimization)
| 574 | // to compile regex string constants at program creation time and report any errors and then use the |
| 575 | // compiled regex for all regex function invocations. |
| 576 | func OptimizeRegex(regexOptimizations ...*interpreter.RegexOptimization) ProgramOption { |
| 577 | return func(p *prog) (*prog, error) { |
| 578 | p.regexOptimizations = append(p.regexOptimizations, regexOptimizations...) |
| 579 | return p, nil |
| 580 | } |
| 581 | } |
| 582 | |
| 583 | // ConfigOptionFactory declares a signature which accepts a configuration element, e.g. env.Extension |
| 584 | // and optionally produces an EnvOption in response. |
nothing calls this directly
no outgoing calls
no test coverage detected