diff options
author | Adam NAILI | 2018-04-22 15:32:40 +0200 |
---|---|---|
committer | Adam NAILI | 2018-04-22 15:32:40 +0200 |
commit | a431f189d33af68ea179e464c889761e65ed1f08 (patch) | |
tree | 2da926fa6eccd0d2b9459be841fd0168d474e607 /src/symboltable.h | |
parent | 5d83670f6b0b142bcda19270d3c9b50f9370bee8 (diff) | |
download | tpc-compiler-a431f189d33af68ea179e464c889761e65ed1f08.tar.gz |
Basic implementation of the symbol table
Diffstat (limited to 'src/symboltable.h')
-rw-r--r-- | src/symboltable.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/symboltable.h b/src/symboltable.h index cc828fa..02e47a4 100644 --- a/src/symboltable.h +++ b/src/symboltable.h | |||
@@ -13,6 +13,7 @@ | |||
13 | typedef struct { | 13 | typedef struct { |
14 | char name[MAXNAME]; | 14 | char name[MAXNAME]; |
15 | int type; | 15 | int type; |
16 | int addr; | ||
16 | } STentry; | 17 | } STentry; |
17 | 18 | ||
18 | 19 | ||
@@ -26,5 +27,5 @@ typedef struct { | |||
26 | void addVar(const char name[], int type); | 27 | void addVar(const char name[], int type); |
27 | void lookup(const char name[]); | 28 | void lookup(const char name[]); |
28 | void display_table(); | 29 | void display_table(); |
29 | 30 | int get_type(const char name[]); | |
30 | #endif \ No newline at end of file | 31 | #endif \ No newline at end of file |