From a31eff3926b4355ab9a4d7a76b0007fae0dd68b2 Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Sat, 30 Oct 2021 15:36:04 +0200 Subject: Add dead code elimination to AST tree --- src/parser.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/parser.h') diff --git a/src/parser.h b/src/parser.h index dff40d8..01f53b0 100755 --- a/src/parser.h +++ b/src/parser.h @@ -108,6 +108,8 @@ void free_objects(void); #define IS_NIL(VAL) ((VAL)->type == OBJ_TYPE_NIL) #define IS_TRUE(VAL) ((VAL)->type != OBJ_TYPE_FALSE) #define IS_FALSE(VAL) ((VAL)->type == OBJ_TYPE_FALSE) +#define IS_BOOL(VAL) \ + (((VAL)->type == OBJ_TYPE_FALSE) || ((VAL)->type == OBJ_TYPE_TRUE)) #define IS_FIXNUM(VAL) ((VAL)->type == OBJ_TYPE_FIXNUM) #define IS_STRING(VAL) ((VAL)->type == OBJ_TYPE_STRING) #define IS_SYMBOL(VAL) ((VAL)->type == OBJ_TYPE_SYMBOL) -- cgit v1.2.1