Commit Graph
5 Commits
Author SHA1 Message Date
starcells 3f3e431d64 r8asm: say what is wrong instead of dying or lying
A typo used to end in one of three ways: std::out_of_range aborting the
process (unknown macro, unknown directive), a silent 0 (unknown name used
as an address, which quietly mis-assembles), or a silent empty tape (a
file or %include that could not be opened).  All four now go through
ast::fail(), print a line on stderr, set the error flag and make the CLI
exit with 1.  Names that are reported repeatedly are only printed once.

While here: import_file set the cell size *after* parsing, so the
%include handler read main_tree.CELL_SIZE before it had ever been set and
handed 0 to included files.  It worked by accident because the top-level
call ran again at the end.  Moved it before the parse.

r8asm_test.cc came from the working tree (argv instead of a hard-coded
path); it now also checks the arguments and the error flag.
2026-11-05 22:49:54 +08:00
starcells bef8310558 README added 2026-09-14 21:01:48 +08:00
starcells 57905c1cf1 First test with real asm files 2026-08-29 01:33:28 +08:00
starcells 5aa4893dc6 202608290010 2026-08-29 00:10:20 +08:00
starcells 4145ce3989 first commit 2026-08-25 18:09:16 +08:00