fixed some of the spacing in the table t#29

This commit is contained in:
Meyer Simon
2025-02-21 10:09:26 -05:00
parent 4468dbd02f
commit dbcdafb1a0
2 changed files with 7 additions and 3 deletions

View File

@ -4,7 +4,7 @@
void print_symbol_table(SymbolTable *table, FILE *file_ptr){
if(table->Parent_Scope == NULL){
fprintf(file_ptr, "%-17s:%-8s:%-8s:%-22s:%-29s\n", "NAME", "SCOPE", "PARANT", "TYPE", "Extra annotation");
fprintf(file_ptr, "%-17s: %-6s : %-6s : %-21s: %-28s\n", "NAME", "SCOPE", "PARANT", "TYPE", "Extra annotation");
}
TableNode * entrie = table->entries;
fprintf(file_ptr, "-----------------:--------:--------:----------------------:-----------------------------\n");
@ -18,7 +18,7 @@ void print_symbol_table(SymbolTable *table, FILE *file_ptr){
}
for(; entrie != NULL; entrie = entrie->next){
fprintf(file_ptr, "%-17s: %06d : %06d :%-22s:%-29s\n",
fprintf(file_ptr, "%-17s: %06d : %06d : %-21s: %-28s\n",
entrie->theName, current_scope, parant_scope,
entrie->theType, "Extra annotation");
}
@ -34,6 +34,7 @@ void print_symbol_table(SymbolTable *table, FILE *file_ptr){
}
/*
*/
int main(void){
SymbolTable * parant = CreateScope(NULL, 1,1);
// Value* v = calloc(1, sizeof(Value));
@ -59,4 +60,3 @@ int main(void){
print_symbol_table(parant, stderr);
return 0;
}
*/