Flush stdout after PRINTLN

This allows debug PRINTLN statements to run even if
subsequent rgbasm directives cause a crash.
This commit is contained in:
Rangi
2021-03-31 11:22:41 -04:00
parent c7ed9a275e
commit 363b3d0134

View File

@@ -1164,8 +1164,14 @@ popc : T_POP_POPC { charmap_Pop(); }
print : T_POP_PRINT print_exprs trailing_comma print : T_POP_PRINT print_exprs trailing_comma
; ;
println : T_POP_PRINTLN { putchar('\n'); } println : T_POP_PRINTLN {
| T_POP_PRINTLN print_exprs trailing_comma { putchar('\n'); } putchar('\n');
fflush(stdout);
}
| T_POP_PRINTLN print_exprs trailing_comma {
putchar('\n');
fflush(stdout);
}
; ;
print_exprs : print_expr print_exprs : print_expr