func (this *Mem) getFunc(expr *ast.Expr) funcs.Bool { if f, ok := this.funcs[expr]; ok { return f } f, err := compose.NewBool(expr) if err != nil { panic(err) } compose.SetContext(f, this.context) this.funcs[expr] = f return f }
func (mem *Mem) SetContext(context *funcs.Context) { mem.context = context for _, f := range mem.funcs { compose.SetContext(f, mem.context) } }