Files
r8asm_rev-fork/tests
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
..