| 259 | } |
| 260 | |
| 261 | func (n *numeric) eval(this super.Value) (super.Value, super.Value, *super.Value) { |
| 262 | lhs := n.lhs.Eval(this).Under() |
| 263 | if lhs.IsNull() { |
| 264 | return super.Null, super.Null, &super.Null |
| 265 | } |
| 266 | rhs := n.rhs.Eval(this).Under() |
| 267 | if lhs.IsNull() || rhs.IsNull() { |
| 268 | return super.Null, super.Null, &super.Null |
| 269 | } |
| 270 | if lhs.IsError() { |
| 271 | return super.Null, super.Null, &lhs |
| 272 | } |
| 273 | if rhs.IsError() { |
| 274 | return super.Null, super.Null, &rhs |
| 275 | } |
| 276 | return lhs, rhs, nil |
| 277 | } |
| 278 | |
| 279 | type Compare struct { |
| 280 | sctx *super.Context |