fixed print symbol table to not print scopes used as flags
This commit is contained in:
@ -1139,7 +1139,15 @@ void print_symbol_table(SymbolTable *table, FILE *file_ptr) {
|
|||||||
if (getChildren(table) != NULL) {
|
if (getChildren(table) != NULL) {
|
||||||
ListOfTable *node = getChildren(table);
|
ListOfTable *node = getChildren(table);
|
||||||
for (; node != NULL; node = node->next) {
|
for (; node != NULL; node = node->next) {
|
||||||
|
if((node->table) == NULL){
|
||||||
print_symbol_table(node->table, file_ptr);
|
print_symbol_table(node->table, file_ptr);
|
||||||
|
}else{
|
||||||
|
if ((node->table)->Line_Number == -1){
|
||||||
|
continue;
|
||||||
|
}else{
|
||||||
|
print_symbol_table(node->table, file_ptr);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (getParent(table) == NULL) {
|
if (getParent(table) == NULL) {
|
||||||
|
@ -24,6 +24,5 @@ entry(arg) := {
|
|||||||
w.y := 7;
|
w.y := 7;
|
||||||
result := bar1(w); (* pass w (a rec type value) to bar1 *)
|
result := bar1(w); (* pass w (a rec type value) to bar1 *)
|
||||||
result := bar2(5,7); (* implicitly build a rec type value, assign 5 and 7 to fields x and y, but call them r and s *)
|
result := bar2(5,7); (* implicitly build a rec type value, assign 5 and 7 to fields x and y, but call them r and s *)
|
||||||
arr(3);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user