replaced the different statement types by one union type saving a lot of casts (and...
[cparser] / token_t.h
index 27832f8..762f143 100644 (file)
--- a/token_t.h
+++ b/token_t.h
@@ -4,6 +4,7 @@
 #include <stdio.h>
 #include "symbol.h"
 #include "symbol_table.h"
+#include "type.h"
 
 typedef enum {
 #define T(x,str,val) T_##x val,
@@ -34,10 +35,11 @@ typedef struct {
        int type;
        union {
                symbol_t   *symbol;
-               int         intvalue;
-               double      floatvalue;
+               long long   intvalue;
+               long double floatvalue;
                const char *string;
        } v;
+       type_t            *datatype;
        source_position_t  source_position;
 } token_t;