* I noticed that `fn call(...)` in all objects was identical, so I made a macro for it. This should make things a little easier to read, since do_call is about 30 lines a pop. * Bool has a constructor now, and a to_int and to_float implementations * Add tests for constructors and add new bool tests Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
107 lines
606 B
Plaintext
107 lines
606 B
Plaintext
1.234
|
|
20.0
|
|
0.3333333333333333
|
|
1.1
|
|
__add__
|
|
2.5
|
|
2.25
|
|
2.125
|
|
21.234
|
|
__sub__
|
|
-1.0
|
|
-0.5
|
|
0.0
|
|
18.766
|
|
__mul__
|
|
-0.0
|
|
0.0
|
|
-0.0
|
|
1.0
|
|
__div__
|
|
0.1
|
|
3.0
|
|
0.5
|
|
2.0
|
|
__ne__
|
|
false
|
|
false
|
|
true
|
|
false
|
|
false
|
|
false
|
|
false
|
|
true
|
|
true
|
|
__eq__
|
|
true
|
|
true
|
|
false
|
|
true
|
|
true
|
|
true
|
|
true
|
|
false
|
|
false
|
|
__gt__
|
|
false
|
|
true
|
|
true
|
|
true
|
|
true
|
|
false
|
|
false
|
|
__ge__
|
|
true
|
|
true
|
|
true
|
|
false
|
|
true
|
|
true
|
|
true
|
|
false
|
|
false
|
|
__lt__
|
|
false
|
|
false
|
|
false
|
|
true
|
|
false
|
|
true
|
|
false
|
|
false
|
|
false
|
|
false
|
|
false
|
|
false
|
|
true
|
|
__le__
|
|
true
|
|
true
|
|
true
|
|
true
|
|
false
|
|
true
|
|
false
|
|
false
|
|
true
|
|
true
|
|
true
|
|
false
|
|
true
|
|
__pos__
|
|
1.0
|
|
0.0
|
|
0.0
|
|
__neg__
|
|
-0.0
|
|
0.0
|
|
-0.0
|
|
constructor
|
|
10.0
|
|
10000.0
|
|
0.012
|
|
1234.0
|
|
1.5
|
|
1.0
|
|
0.0
|