Merge pull request #64 from UB-CSE443/tests

Tests
This commit is contained in:
scarlett
2025-05-04 16:25:45 -04:00
committed by GitHub
174 changed files with 984 additions and 664 deletions

View File

@ -1212,6 +1212,14 @@ TableNode *table_lookup(SymbolTable *table, char *x) {
}
TableNode *entrie = table->entries;
for (; entrie != NULL; entrie = entrie->next) {
if (entrie->theName == NULL) {
printdebug("name of entry is currently NULL, undefined");
return undefined;
}
if (entrie->theName == undefined->theName) {
printdebug("name of entry is currently undefined");
return undefined;
}
if (!strcmp(entrie->theName, x)) {
return entrie;
}