Got symbol Table largely working (but without certain entries being added like functions or records)
This commit is contained in:
@ -17,8 +17,6 @@ TableNode* chara;
|
||||
TableNode* stri;
|
||||
TableNode* boo;
|
||||
TableNode* recprime;
|
||||
TableNode* funprime;
|
||||
TableNode* arrayprime;
|
||||
TableNode* funtypeprime;
|
||||
|
||||
|
||||
@ -234,7 +232,7 @@ SymbolTable* CreateScope(SymbolTable* ParentScope, int Line, int Column) {
|
||||
|
||||
//create entry just for things below top level scope
|
||||
SymbolTable* init(SymbolTable* start){
|
||||
if(start->Parent_Scope == NULL){
|
||||
if(start->Parent_Scope != NULL){
|
||||
printf("Cannot initialize a scope that is not the parent scope\n");
|
||||
return NULL;
|
||||
}
|
||||
@ -280,7 +278,7 @@ SymbolTable* init(SymbolTable* start){
|
||||
funprime->theName= "primitive function";
|
||||
funprime->theType=NULL;
|
||||
funprime->additionalinfo = NULL;
|
||||
funpprime->next = NULL;
|
||||
funprime->next = NULL;
|
||||
|
||||
//record
|
||||
recprime = (TableNode*)malloc(sizeof(TableNode));
|
||||
|
Reference in New Issue
Block a user