Merge branch 'DontBreakDev' into FunctionCalls
This commit is contained in:
@ -116,6 +116,18 @@ int getPrimSize(TableNode *definition) {
|
||||
"Invalid.");
|
||||
return -1;
|
||||
}
|
||||
if(getAdInfoType(definition) == TYPE_ARRAY_TYPE){
|
||||
//special case to return size for reference to an array
|
||||
return 8;
|
||||
}
|
||||
if(getAdInfoType(definition) == TYPE_FUNCTION_TYPE){
|
||||
//special case to return size for reference to a function
|
||||
return 8;
|
||||
}
|
||||
if(getAdInfoType(definition) == TYPE_RECORD_TYPE){
|
||||
//special case to return size for reference to a record
|
||||
return getRecTotal(definition);
|
||||
}
|
||||
if (definition->additionalinfo == NULL) {
|
||||
printdebug("node has NULL additionalinfo. Invalid.");
|
||||
return -1;
|
||||
@ -1200,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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user