summaryrefslogtreecommitdiff
path: root/val.h
diff options
context:
space:
mode:
Diffstat (limited to 'val.h')
-rw-r--r--val.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/val.h b/val.h
index db0a789..aa20b48 100644
--- a/val.h
+++ b/val.h
@@ -30,6 +30,8 @@ void print_val(Val v);
void println_val(Val v);
const char *typename_str(Val v);
+bool is_truthy(Val v);
+
typedef enum {
OTY_STRING,
@@ -55,7 +57,7 @@ ObjString *objstring_copy_cstr(State *s, char *str);
ObjString *objstring_take(State *S, char *src, size_t len);
-#define IS_NIL(x) (x.ty == NIL)
+#define IS_NIL(x) (x.ty == TY_NIL)
#define IS_NUM(x) (x.ty == TY_NUM)
#define IS_BOOL(x) (x.ty == TY_BOOL)
#define IS_OBJ(x) (x.ty == TY_OBJ)