Concertando as funções lookup e destroy
[toypasc.git] / symbol_table.h
bloba5287c9cda68bdf8adac47976a7c15886e0076b2
1 #ifndef SYMBOL_TABLE_H
2 #define SYMBOL_TABLE_H
4 typedef struct _symbol {
5 char *name;
6 int type;
8 union {
9 int integer;
10 int boolean;
11 char character;
12 } value;
14 struct _symbol *next;
15 } Symbol;
17 Symbol *symbol_insert(Symbol *table, char const *name, int type);
18 Symbol *symbol_lookup(Symbol *table, char const *name);
19 void symbol_table_destroy(Symbol **table);
20 void symbol_print(Symbol *symbol);
21 void symbol_table_dump(Symbol *table);
23 #endif // SYMBOL_TABLE_H