aboutsummaryrefslogtreecommitdiff
path: root/std
diff options
context:
space:
mode:
Diffstat (limited to 'std')
-rw-r--r--std/bool.c16
-rw-r--r--std/int.c20
-rw-r--r--std/nil.c4
-rw-r--r--std/ref.c6
-rw-r--r--std/str.c2
5 files changed, 24 insertions, 24 deletions
diff --git a/std/bool.c b/std/bool.c
index 8c8df7d..72a52d3 100644
--- a/std/bool.c
+++ b/std/bool.c
@@ -12,7 +12,7 @@ static inline bool get_bool_arg(UwUVMArgs *args, size_t i)
UwUVMValue uwu_if(UwUVMArgs *args)
{
- uwuutil_require_exact(":bool:if", args, 3);
+ uwuutil_require_exact("bool.if", args, 3);
return uwuvm_clone_value(get_bool_arg(args, 0)
? uwuvm_get_arg(args, 1)
@@ -22,7 +22,7 @@ UwUVMValue uwu_if(UwUVMArgs *args)
UwUVMValue uwu_and(UwUVMArgs *args)
{
- uwuutil_require_min(":bool:and", args, 1);
+ uwuutil_require_min("bool.and", args, 1);
for (size_t i = 0; i < args->num; i++)
if (! get_bool_arg(args, i))
@@ -33,7 +33,7 @@ UwUVMValue uwu_and(UwUVMArgs *args)
UwUVMValue uwu_or(UwUVMArgs *args)
{
- uwuutil_require_min(":bool:or", args, 1);
+ uwuutil_require_min("bool.or", args, 1);
for (size_t i = 0; i < args->num; i++)
if (get_bool_arg(args, i))
@@ -44,7 +44,7 @@ UwUVMValue uwu_or(UwUVMArgs *args)
UwUVMValue uwu_equal(UwUVMArgs *args)
{
- uwuutil_require_min(":bool:equal", args, 2);
+ uwuutil_require_min("bool.equal", args, 2);
bool value = get_bool_arg(args, 0);
@@ -57,23 +57,23 @@ UwUVMValue uwu_equal(UwUVMArgs *args)
UwUVMValue uwu_not(UwUVMArgs *args)
{
- uwuutil_require_exact(":bool:not", args, 1);
+ uwuutil_require_exact("bool.not", args, 1);
return uwubool_create(! get_bool_arg(args, 0));
}
UwUVMValue uwu_true(UwUVMArgs *args)
{
- uwuutil_require_exact(":bool:true", args, 0);
+ uwuutil_require_exact("bool.true", args, 0);
return uwubool_create(true);
}
UwUVMValue uwu_false(UwUVMArgs *args)
{
- uwuutil_require_exact(":bool:false", args, 0);
+ uwuutil_require_exact("bool.false", args, 0);
return uwubool_create(false);
}
UwUVMValue uwu_is(UwUVMArgs *args)
{
- return uwuutil_is_type(":bool:is", args, &uwubool_type);
+ return uwuutil_is_type("bool.is", args, &uwubool_type);
}
diff --git a/std/int.c b/std/int.c
index 615d3a5..625595d 100644
--- a/std/int.c
+++ b/std/int.c
@@ -82,46 +82,46 @@ static long reduce(const char *fnname, UwUVMArgs *args, ReduceOP op, long result
UwUVMValue uwu_add(UwUVMArgs *args)
{
- return uwuint_create(reduce(":int:add", args, ROP_ADD, 0));
+ return uwuint_create(reduce("int.add", args, ROP_ADD, 0));
}
UwUVMValue uwu_sub(UwUVMArgs *args)
{
- return uwuint_create(binary(":int:sub", args, BOP_SUB));
+ return uwuint_create(binary("int.sub", args, BOP_SUB));
}
UwUVMValue uwu_mul(UwUVMArgs *args)
{
- return uwuint_create(reduce(":int:mul", args, ROP_MUL, 1));
+ return uwuint_create(reduce("int.mul", args, ROP_MUL, 1));
}
UwUVMValue uwu_div(UwUVMArgs *args)
{
- return uwuint_create(binary(":int:div", args, BOP_DIV));
+ return uwuint_create(binary("int.div", args, BOP_DIV));
}
UwUVMValue uwu_mod(UwUVMArgs *args)
{
- return uwuint_create(binary(":int:mod", args, BOP_MOD));
+ return uwuint_create(binary("int.mod", args, BOP_MOD));
}
UwUVMValue uwu_smaller(UwUVMArgs *args)
{
- return uwubool_create(binary(":int:smaller", args, BOP_SML) == 1);
+ return uwubool_create(binary("int.smaller", args, BOP_SML) == 1);
}
UwUVMValue uwu_greater(UwUVMArgs *args)
{
- return uwubool_create(binary(":int:greater", args, BOP_GRT) == 1);
+ return uwubool_create(binary("int.greater", args, BOP_GRT) == 1);
}
UwUVMValue uwu_equal(UwUVMArgs *args)
{
- uwuutil_require_min(":int:equal", args, 2);
- return uwubool_create(reduce(":int:equal", args, ROP_EQU, 1) == 1);
+ uwuutil_require_min("int.equal", args, 2);
+ return uwubool_create(reduce("int.equal", args, ROP_EQU, 1) == 1);
}
UwUVMValue uwu_is(UwUVMArgs *args)
{
- return uwuutil_is_type(":int:is", args, &uwuint_type);
+ return uwuutil_is_type("int.is", args, &uwuint_type);
}
diff --git a/std/nil.c b/std/nil.c
index 52a2872..cb27dbb 100644
--- a/std/nil.c
+++ b/std/nil.c
@@ -4,11 +4,11 @@
UwUVMValue uwu_nil(UwUVMArgs *args)
{
- uwuutil_require_exact(":nil:nil", args, 0);
+ uwuutil_require_exact("nil.nil", args, 0);
return uwunil_create();
}
UwUVMValue uwu_is(UwUVMArgs *args)
{
- return uwuutil_is_type(":nil:is", args, &uwunil_type);
+ return uwuutil_is_type("nil.is", args, &uwunil_type);
}
diff --git a/std/ref.c b/std/ref.c
index ee18bfc..0147160 100644
--- a/std/ref.c
+++ b/std/ref.c
@@ -4,17 +4,17 @@
UwUVMValue uwu_call(UwUVMArgs *args)
{
- uwuutil_require_min(":ref:call", args, 1);
+ uwuutil_require_min("ref.call", args, 1);
UwUVMValue value = uwuvm_get_arg(args, 0);
if (value.type != &uwuref_type)
- error(":ref:call requires a function reference as $1\n");
+ error("ref.call requires a function reference as $1\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);
+ return uwuutil_is_type("ref.is", args, &uwuref_type);
}
diff --git a/std/str.c b/std/str.c
index a0e4edd..29b94db 100644
--- a/std/str.c
+++ b/std/str.c
@@ -32,5 +32,5 @@ UwUVMValue uwu_cat(UwUVMArgs *args)
UwUVMValue uwu_is(UwUVMArgs *args)
{
- return uwuutil_is_type(":str:is", args, &uwustr_type);
+ return uwuutil_is_type("str.is", args, &uwustr_type);
}