diff -r 0a202714eea4 -r 588cc27e84bb common.h --- a/common.h Wed Dec 19 04:20:02 2012 +0200 +++ b/common.h Wed Dec 19 13:44:18 2012 +0200 @@ -67,6 +67,16 @@ MODE_ONEXIT, // inside onexit }; +enum type_e { + TYPE_UNKNOWN = 0, + TYPE_VOID, + TYPE_INT, + TYPE_STRING, + TYPE_FLOAT, + TYPE_BOOL, + +}; + #define CHECK_FILE(pointer,path,action) \ if (!pointer) { \ error ("couldn't open %s for %s!\n", (char*)path, action); \ @@ -89,6 +99,8 @@ void error (const char* text, ...); char* ObjectFileName (str s); bool fexists (char* path); +type_e GetTypeByName (str token); +str GetTypeName (type_e type); // Make the parser's variables globally available extern int g_NumStates;