1
Files
lecture-interpreters/builtins.simple
Christoph 81e2dd0745 cleanup
2021-09-02 18:26:59 +02:00

106 lines
1.9 KiB
Plaintext

object nil:
1
def pass:
nil
object inttrait:
def eq(other):
self $int_eq(other)
def noteq(other):
self $int_eq(other) not
def leq(other):
self $int_leq(other)
def geq(other):
self $int_geq(other)
def greater(other):
self $int_greater(other)
def less(other):
self $int_less(other)
def add(other):
self $int_add(other)
def sub(other):
self $int_sub(other)
def mul(other):
self $int_mul(other)
def div(other):
self $int_div(other)
def mod(other):
self $int_mod(other)
def inc:
self $int_inc
def dec:
self $int_dec
def tobool:
self $int_tobool
def tostr:
self $int_tostr
def todouble:
self $int_todouble
object booltrait:
def eq(other):
self $bool_eq(other)
def and(other):
self $bool_and(other)
def or(other):
self $bool_or(other)
def not:
self $bool_not
def toint:
self $bool_toint
def tostr:
self $bool_tostr
def todouble:
self $bool_todouble
object strtrait:
def eq(other):
self $str_eq(other)
def add(other):
self $str_add(other)
def substr(s, e):
self $str_subs(s, e)
def rev:
self $str_rev
def len:
self $str_len
def tobool:
self $str_tobool
def toint:
self $str_toint
def todouble:
self $str_todouble
object doubletrait:
def eq(other):
self $double_eq(other)
def add(other):
self $double_add(other)
def sub(other):
self $double_sub(other)
def mul(other):
self $double_mul(other)
def div(other):
self $double_div(other)
def toint:
self $double_toint
def tobool:
self $double_tobool
def tostr:
self $double_tostr