MCPcopy
hub / github.com/expr-lang/expr / Operator

Function Operator

expr.go:44–55  ·  view source on GitHub ↗

Operator allows to replace a binary operator with a function.

(operator string, fn ...string)

Source from the content-addressed store, hash-verified

42
43// Operator allows to replace a binary operator with a function.
44func Operator(operator string, fn ...string) Option {
45 return func(c *conf.Config) {
46 p := &patcher.OperatorOverloading{
47 Operator: operator,
48 Overloads: fn,
49 Env: &c.Env,
50 Functions: c.Functions,
51 NtCache: &c.NtCache,
52 }
53 c.Visitors = append(c.Visitors, p)
54 }
55}
56
57// ConstExpr defines func expression as constant. If all argument to this function is constants,
58// then it can be replaced by result of this func call on compile step.

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…