starting to work on grammar fixes
This commit is contained in:
@ -1142,6 +1142,19 @@ void print_symbol_table(SymbolTable *table, FILE *file_ptr) {
|
||||
}
|
||||
}
|
||||
|
||||
if (getAdInfoType(entry) == TYPE_PRIMITIVE_TYPE) {
|
||||
char *primAdInfo = (char *)malloc(100);
|
||||
sprintf(primAdInfo, " size-%d bytes", getPrimSize(getTypeEntry(entry)));
|
||||
if (parentScopeNum == 0) {
|
||||
st_fprint(file_ptr, getName(entry), currentScopeNum, -100, " Primitive Type", primAdInfo);
|
||||
} else {
|
||||
//printdebug("%sTHIS ONE", COLOR_RED);
|
||||
printTableNode(entry);
|
||||
char *primType = (char *)malloc(sizeof(getType(entry) + 1));
|
||||
sprintf(primType, " %s", getType(entry));
|
||||
st_fprint(file_ptr, getName(entry), currentScopeNum, parentScopeNum, primType, primAdInfo);
|
||||
}
|
||||
}
|
||||
if (getAdInfoType(entry) == TYPE_PRIMITIVE) {
|
||||
char *primAdInfo = (char *)malloc(100);
|
||||
sprintf(primAdInfo, " size-%d bytes", getPrimSize(getTypeEntry(entry)));
|
||||
@ -1152,7 +1165,7 @@ void print_symbol_table(SymbolTable *table, FILE *file_ptr) {
|
||||
printTableNode(entry);
|
||||
char *primType = (char *)malloc(sizeof(getType(entry) + 1));
|
||||
sprintf(primType, " %s", getType(entry));
|
||||
st_fprint(file_ptr, getName(entry), currentScopeNum, parentScopeNum, primType, primAdInfo);
|
||||
st_fprint(file_ptr, getName(entry), currentScopeNum, parentScopeNum, getType(entry), "Primitive Instance");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user