Ready for Dev! 🎉

This commit is contained in:
Scarlett
2025-04-04 15:42:50 -04:00
parent 4e862d54a4
commit d1aa7f7e0f
4 changed files with 55 additions and 33 deletions

View File

@ -134,7 +134,16 @@ int run(FILE *alpha) {
if (st_flag != NULL) {
yyparse();
print_symbol_table(getAncestor(cur), st_flag);
if (cur == NULL) {
printdebug("%s[FATAL] cur is null", COLOR_LIGHTRED);
}
if (top == NULL) {
printdebug("%s[FATAL] top is null", COLOR_LIGHTRED);
}
print_symbol_table(top, st_flag);
fclose(st_flag);
if (yyin != NULL) {
fclose(yyin);
@ -144,7 +153,8 @@ int run(FILE *alpha) {
yyparse();
FILE *f = fdopen(1, "w");
print_symbol_table(getAncestor(cur), f);
print_symbol_table(top, f);
fclose(f);
if (yyin != NULL) {