updated branch to not crash due to getType issue
This commit is contained in:
@ -472,11 +472,11 @@ TableNode *CreateEntry(SymbolTable *table, TableNode *typeOf, char *id,
|
|||||||
char *getType(TableNode *tn) {
|
char *getType(TableNode *tn) {
|
||||||
if(tn == NULL){
|
if(tn == NULL){
|
||||||
printf("passed a NULL table entry to getType\n");
|
printf("passed a NULL table entry to getType\n");
|
||||||
return NULL;
|
return tn;
|
||||||
}
|
}
|
||||||
if(tn->theType == NULL){
|
if(tn->theType == NULL){
|
||||||
printf("type of entry is currently NULL, undefined type \n");
|
printf("type of entry is currently NULL, undefined type \n");
|
||||||
return NULL;
|
return tn;
|
||||||
}
|
}
|
||||||
return tn->theType->theName; }
|
return tn->theType->theName; }
|
||||||
char *getName(TableNode *tn) { return tn->theName; }
|
char *getName(TableNode *tn) { return tn->theName; }
|
||||||
|
Reference in New Issue
Block a user