diff options
author | ubq323 <ubq323@ubq323.website> | 2024-06-20 17:23:01 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2024-06-20 17:23:01 +0100 |
commit | b8d0ee2e105727021f9466790ec07ecbfee8dff6 (patch) | |
tree | fe151cdbd4e0ca61a491f2f2fd01afc6448bc124 /val.h | |
parent | 60b3369ab24f9bd2a4a6d638ab1b3013ebc29814 (diff) |
string interning and print statement
Diffstat (limited to 'val.h')
-rw-r--r-- | val.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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) { |