* 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>
102 lines
463 B
Plaintext
102 lines
463 B
Plaintext
10
|
|
20
|
|
__add__
|
|
2
|
|
6
|
|
2419
|
|
30
|
|
30
|
|
-10
|
|
10
|
|
11
|
|
4
|
|
__sub__
|
|
-1
|
|
1
|
|
-10
|
|
-85986
|
|
-10
|
|
10
|
|
__mul__
|
|
1
|
|
-1
|
|
-1
|
|
0
|
|
0
|
|
65536
|
|
16
|
|
998001
|
|
200
|
|
40000
|
|
__div__
|
|
1
|
|
0
|
|
2
|
|
121
|
|
0
|
|
0
|
|
2
|
|
__ne__
|
|
false
|
|
true
|
|
false
|
|
true
|
|
true
|
|
true
|
|
true
|
|
__eq__
|
|
true
|
|
false
|
|
true
|
|
false
|
|
false
|
|
false
|
|
__gt__
|
|
false
|
|
true
|
|
true
|
|
false
|
|
false
|
|
false
|
|
__ge__
|
|
false
|
|
true
|
|
true
|
|
false
|
|
true
|
|
true
|
|
__lt__
|
|
true
|
|
false
|
|
false
|
|
true
|
|
false
|
|
false
|
|
__le__
|
|
true
|
|
false
|
|
true
|
|
true
|
|
true
|
|
true
|
|
__pos__
|
|
1
|
|
1
|
|
10
|
|
10
|
|
__neg__
|
|
-1
|
|
1
|
|
-1
|
|
1
|
|
30
|
|
-30
|
|
10
|
|
-255
|
|
constructor
|
|
10
|
|
1234
|
|
1
|
|
1
|
|
0
|