projects
/
cparser
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
replaced the different statement types by one union type saving a lot of casts (and...
[cparser]
/
token_t.h
diff --git
a/token_t.h
b/token_t.h
index
60a748f
..
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 <stdio.h>
#include "symbol.h"
#include "symbol_table.h"
+#include "type.h"
typedef enum {
#define T(x,str,val) T_##x val,
typedef enum {
#define T(x,str,val) T_##x val,
@@
-34,9
+35,11
@@
typedef struct {
int type;
union {
symbol_t *symbol;
int type;
union {
symbol_t *symbol;
- int intvalue;
+ long long intvalue;
+ long double floatvalue;
const char *string;
} v;
const char *string;
} v;
+ type_t *datatype;
source_position_t source_position;
} token_t;
source_position_t source_position;
} token_t;