Ready for Dev! 🎉
This commit is contained in:
14
src/runner.c
14
src/runner.c
@ -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) {
|
||||
|
Reference in New Issue
Block a user