From 78cdf2fcc7ae3ca7773d0da1328dbc256e99dcb3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 4 Dec 2010 07:48:41 +0000 Subject: Use saner numeric values for tags. git-svn-id: http://svn.drobilla.net/resp/resp@291 ad02d1e2-f140-0410-9f75-f8b11f17cedd --- src/resp.hpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/resp.hpp b/src/resp.hpp index e4caac5..a3f56f5 100644 --- a/src/resp.hpp +++ b/src/resp.hpp @@ -133,16 +133,17 @@ typedef void* CFunc; ///< Compiled function (opaque) struct Object; +/// Type tag for an AST node (must be even and > 1 since LSb is used as mark) enum Tag { - T_UNKNOWN = 1<<1, - T_BOOL = 1<<2, - T_FLOAT = 1<<3, - T_INT32 = 1<<4, - T_LEXEME = 1<<5, - T_STRING = 1<<6, - T_SYMBOL = 1<<7, - T_TUPLE = 1<<8, - T_TYPE = 1<<9 + T_UNKNOWN = 2, + T_BOOL = 4, + T_FLOAT = 6, + T_INT32 = 8, + T_LEXEME = 10, + T_STRING = 12, + T_SYMBOL = 14, + T_TUPLE = 16, + T_TYPE = 18 }; /// Garbage collector -- cgit v1.2.1