Compiler: fix 16 of 18 compile errors — 32/72 tests passing
Fixes: - Include graphics.h/virmem.h in gwrt.h (5 programs: draw_commands, get_put, graphics_stubs, peek_gfx, view_window) - RND(n): discard argument to buffer instead of emitting it inline - Float constant 0: emit "0.0f" not "0f" (invalid C suffix) - MID$ function: proper 3-argument emission with optional length - FOR/NEXT: use static variables instead of block scope for limit/step (fixes FOR inside IF/THEN and unmatched brace issues) - RESUME/RESUME NEXT: handle as statements (not misparse as FOR/NEXT) - ON TIMER/KEY/COM: skip event trap setup (not misparse as ON n GOTO) - MID$ assignment: recognize and skip (don't misparse as variable) - ERROR statement: emit gw_error() call - ERASE: stub handler Only 2 compile errors remain: bubble_sort (SWAP with arrays), misc_stmts (ENVIRON$ variable name clash). 32 of 72 tests pass. New: datetime, luhn, peek_poke, error_handler, on_timer, timer_stop, monte_carlo, number_guess.
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
#include "strpool.h"
|
||||
#include "portio.h"
|
||||
#include "sound.h"
|
||||
#include "graphics.h"
|
||||
#include "virmem.h"
|
||||
#include <setjmp.h>
|
||||
|
||||
/* Initialization / shutdown */
|
||||
|
||||
Reference in New Issue
Block a user