0xfaded/eval — pull request #34 by 0xfaded (2014-01-12 03:58:02+00:00)
Title: [r=Rocky] Carl check typed const exprs

This is more just a heads up this is going in. There are quite a few hacks in `errors.go` to get the formatting of binary expression errors correct. `checkbinaryexpr.go` is comparatively straight forward, it just took a while to get everything right.

But now, we have ...

```
go> 1 + int8(2)
Kind = Type = int8
results[0] = 3
go> true + int8(2)
cannot convert true to type int8
invalid operation: true + 2 (mismatched types bool and int8)
go> string("abc") + 10000000
cannot convert 10000000 to type string
invalid operation: "abc" + 10000000 (mismatched types string and int)
go> true
eval error: true undefined
go> true || false
eval error: true undefined
go> 1 == 1 && 1 == 1
eval error: invalid binary operation &&
go> int8(100) + 100
constant 200 overflows int8
```

There are still some rubbish errors being produced by bool expressions, but these are from the evaluator not the checker.

Feel free to comment or merge