blob: 62c0a5289bfd9207753d2302eb10f9e76e5db5fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#include "common/err.h"
#include "api/ref.h"
#include "api/util.h"
UwUVMValue uwu_call(UwUVMArgs *args)
{
if (args->num < 1)
error(":ref:call requires at least one argument\n");
UwUVMValue value = uwuvm_get_arg(args, 0);
if (value.type != &uwuref_type)
error(":ref:call requires a function reference as $0\n");
return uwuvm_call_function(value.data, args->num - 1, &args->unevaluated[1], args->super);
}
UwUVMValue uwu_is(UwUVMArgs *args)
{
return uwuutil_is_type(":ref:is", args, &uwuref_type);
}
|