summaryrefslogtreecommitdiff
path: root/val.h
diff options
context:
space:
mode:
Diffstat (limited to 'val.h')
-rw-r--r--val.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/val.h b/val.h
index d742c14..4c84fd9 100644
--- a/val.h
+++ b/val.h
@@ -71,6 +71,8 @@ ObjString *objstring_take(State *S, char *src, size_t len);
#define VAL_NIL ((Val){.ty=TY_NIL})
#define VAL_NUM(x) ((Val){.ty=TY_NUM, .as.d=(x) })
#define VAL_BOOL(x) ((Val){.ty=TY_BOOL, .as.b=(x) })
+#define VAL_TRUE VAL_BOOL(1)
+#define VAL_FALSE VAL_BOOL(0)
#define VAL_OBJ(x) ((Val){.ty=TY_OBJ, .as.o=(Obj*)(x) })
static inline bool is_obj_ty(Val v, ObjTy t) {