summaryrefslogtreecommitdiff
path: root/val.c
diff options
context:
space:
mode:
Diffstat (limited to 'val.c')
-rw-r--r--val.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/val.c b/val.c
index ec200d3..7c8b25a 100644
--- a/val.c
+++ b/val.c
@@ -76,6 +76,9 @@ void print_val(Val v) {
break;
}
break;
+ case TY_CFUNC:
+ printf("[cfunc]");
+ break;
}
}
@@ -98,6 +101,7 @@ bool val_equal(Val a, Val b) {
case TY_NUM: return AS_NUM(a) == AS_NUM(b);
case TY_BOOL: return AS_BOOL(a) == AS_BOOL(b);
case TY_OBJ: return AS_OBJ(a) == AS_OBJ(b);
+ case TY_CFUNC: return AS_CFUNC(a) == AS_CFUNC(b);
default: return false;
}
}
@@ -114,6 +118,7 @@ const char *typename_str(Val v) {
case OTY_FUNC: return "Func";
}
break;
+ case TY_CFUNC: return "cfunc";
}
return "???";
}