updated lex to return the right values to the tokens (mostly table entries)
This commit is contained in:
@ -769,6 +769,26 @@ TableNode *CreateEntry(SymbolTable *table, TableNode *typeOf, char *id,
|
||||
}
|
||||
}
|
||||
|
||||
TableNode *getTypeEntry(TableNode *tn) {
|
||||
if (tn == NULL) {
|
||||
printdebug("passed a NULL table entry to getType");
|
||||
return undefined;
|
||||
}
|
||||
if (tn == undefined) {
|
||||
printdebug("passed an undefined table entry to getType");
|
||||
return undefined;
|
||||
}
|
||||
if (tn->theType == NULL) {
|
||||
printdebug("type of entry is currently NULL type");
|
||||
return undefined;
|
||||
}
|
||||
if (tn->theType == undefined) {
|
||||
printdebug("type of entry is currently undefined type");
|
||||
return undefined;
|
||||
}
|
||||
return tn->theType;
|
||||
}
|
||||
|
||||
char *getType(TableNode *tn) {
|
||||
if (tn == NULL) {
|
||||
printdebug("passed a NULL table entry to getType");
|
||||
|
Reference in New Issue
Block a user