aboutsummaryrefslogtreecommitdiff
path: root/src/symbol_table.h
diff options
context:
space:
mode:
authorpacien2018-05-08 21:05:16 +0200
committerpacien2018-05-08 21:05:16 +0200
commit5732ffaa722bda7c5957324e79e61ad8f3811e2f (patch)
treedddd0d9e30a9c97fd3b464bfdd16f21b5057f34f /src/symbol_table.h
parent008d12251620366c3972c8884a33c63ddf4843ba (diff)
downloadtpc-compiler-5732ffaa722bda7c5957324e79e61ad8f3811e2f.tar.gz
Replace type macro with enum
Diffstat (limited to 'src/symbol_table.h')
-rw-r--r--src/symbol_table.h7
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
16typedef enum type {
17 INT,
18 CHAR
19} Type;
20
18typedef struct { 21typedef struct {
19 char name[MAXNAME]; 22 char name[MAXNAME];
20 int type; 23 int type;