diff options
author | pacien | 2018-05-08 21:05:16 +0200 |
---|---|---|
committer | pacien | 2018-05-08 21:05:16 +0200 |
commit | 5732ffaa722bda7c5957324e79e61ad8f3811e2f (patch) | |
tree | dddd0d9e30a9c97fd3b464bfdd16f21b5057f34f /src/symbol_table.h | |
parent | 008d12251620366c3972c8884a33c63ddf4843ba (diff) | |
download | tpc-compiler-5732ffaa722bda7c5957324e79e61ad8f3811e2f.tar.gz |
Replace type macro with enum
Diffstat (limited to 'src/symbol_table.h')
-rw-r--r-- | src/symbol_table.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/symbol_table.h b/src/symbol_table.h index 9926fec..fe0e35c 100644 --- a/src/symbol_table.h +++ b/src/symbol_table.h | |||
@@ -11,10 +11,13 @@ | |||
11 | #include <string.h> | 11 | #include <string.h> |
12 | 12 | ||
13 | #define MAXNAME 32 | 13 | #define MAXNAME 32 |
14 | #define INT 0 | ||
15 | #define CHAR 1 | ||
16 | #define MAXSYMBOLS 256 | 14 | #define MAXSYMBOLS 256 |
17 | 15 | ||
16 | typedef enum type { | ||
17 | INT, | ||
18 | CHAR | ||
19 | } Type; | ||
20 | |||
18 | typedef struct { | 21 | typedef struct { |
19 | char name[MAXNAME]; | 22 | char name[MAXNAME]; |
20 | int type; | 23 | int type; |