diff options
Diffstat (limited to 'std')
-rw-r--r-- | std/bool.c | 1 | ||||
-rw-r--r-- | std/int.c | 2 | ||||
-rw-r--r-- | std/nil.c | 10 |
3 files changed, 11 insertions, 2 deletions
@@ -9,7 +9,6 @@ static inline bool get_bool_arg(UwUVMArgs *args, size_t i) return uwubool_get(uwuvm_get_arg(args, i)); } -#include "../api/str.h" UwUVMValue uwu_if(UwUVMArgs *args) { if (args->num != 3) @@ -80,7 +80,7 @@ static int reduce(const char *fnname, UwUVMArgs *args, ReduceOP op, int result) UwUVMValue uwu_add(UwUVMArgs *args) { - return uwuint_create(reduce(":int:mul", args, ROP_ADD, 0)); + return uwuint_create(reduce(":int:add", args, ROP_ADD, 0)); } UwUVMValue uwu_sub(UwUVMArgs *args) diff --git a/std/nil.c b/std/nil.c new file mode 100644 index 0000000..33230fb --- /dev/null +++ b/std/nil.c @@ -0,0 +1,10 @@ +#include "../src/err.h" +#include "../api/nil.h" + +UwUVMValue uwu_nil(UwUVMArgs *args) +{ + if (args->num != 0) + error(":nil:nil does not accept any arguments\n"); + + return uwunil_create(); +} |