(val super.Value)
| 165 | } |
| 166 | |
| 167 | func (s *searchString) Eval(val super.Value) super.Value { |
| 168 | if s.expr != nil { |
| 169 | val = s.expr.Eval(val) |
| 170 | if val.IsError() { |
| 171 | return super.False |
| 172 | } |
| 173 | } |
| 174 | if s.fnm.Match(val.Type()) { |
| 175 | return super.True |
| 176 | } |
| 177 | if errMatch == val.Walk(func(typ super.Type, body scode.Bytes) error { |
| 178 | if typ.ID() == super.IDString && |
| 179 | StringContainsFold(byteconv.UnsafeString(body), s.term) { |
| 180 | return errMatch |
| 181 | } |
| 182 | return nil |
| 183 | }) { |
| 184 | return super.True |
| 185 | } |
| 186 | return super.False |
| 187 | } |
| 188 | |
| 189 | type filter struct { |
| 190 | expr Evaluator |
nothing calls this directly
no test coverage detected