Skip to content

Commit

Permalink
Lecture 180 - Finishing our codegen_generate_global_variable function
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonzapeducation committed Sep 1, 2022
1 parent 4181f08 commit 6090d95
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions codegen.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,9 @@ void codegen_generate_global_variable(struct node *node)
compiler_error(current_process, "Doubles and floats are not supported in our subset of C\n");
break;
}

assert(node->type == NODE_TYPE_VARIABLE);
codegen_new_scope_entity(node, 0, 0);
}

void codegen_generate_struct(struct node* node)
Expand Down

0 comments on commit 6090d95

Please sign in to comment.