diff options
Diffstat (limited to 'val.h')
-rw-r--r-- | val.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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) |