edited symbol table node structure to remove strlength and value as they are not needed

This commit is contained in:
Partho Bhattacharya
2025-02-21 12:52:24 -05:00
parent ad5da96857
commit e0ab5540da
3 changed files with 7 additions and 59 deletions

View File

@ -9,20 +9,10 @@ typedef struct ListOfTable{
}ListOfTable;
typedef union Value{
int* value_of_int;
void* value_of_pointer;
bool* value_of_bool;
char* value_of_char;
}Value;
typedef struct TableNode{
char* theType;
char* theName;
Value* value;
struct TableNode* next;
//this next value is an int for string types to tell you how far to traverse a buffer for the string
int StrLength;
}TableNode;
typedef struct SymbolTable{
@ -34,5 +24,5 @@ typedef struct SymbolTable{
}SymbolTable;
TableNode* CreateEntry(SymbolTable* table, char* typeOf, char* id, Value* value, int StringLength);
TableNode* CreateEntry(SymbolTable* table, char* typeOf, char* id);
SymbolTable* CreateScope(SymbolTable* ParentScope, int Line, int Column);