Commit Graph
19 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 ef77c07819 202608290119 2026-08-29 01:20:03 +08:00
starcells 5aa4893dc6 202608290010 2026-08-29 00:10:20 +08:00
starcells c44a4058d1 202608280123 2026-08-28 01:23:16 +08:00
starcells 10a793e2db 202608280013 2026-08-28 00:13:13 +08:00
starcells 7a55472569 202608271413 2026-08-27 14:14:01 +08:00
starcells c41f0b02ff 202608271338 2026-08-27 13:38:59 +08:00
starcells 0bc249e35a 202608271235 2026-08-27 12:35:20 +08:00
starcells 16cabba2ee added an export for r8asm 2026-08-26 23:07:57 +08:00
starcells baa7873a36 fixed repeated use of node.value 2026-08-26 21:12:22 +08:00
starcells 32cc058c6f 202608261940 2026-08-26 19:40:48 +08:00
starcells d3cbf6b2e1 standardized all vector<ast_node> to ast_node with type CODEBLOCK 2026-08-26 19:32:14 +08:00
starcells 53cbf0ccc3 202608260022 2026-08-26 00:22:37 +08:00
starcells 3dbe5cb4aa 202608260006 2026-08-26 00:06:08 +08:00
starcells ef7a8f9d6c 202608252348 2026-08-25 23:48:59 +08:00
starcells 0c6b494f22 202608251836 2026-08-25 18:36:13 +08:00
starcells 4145ce3989 first commit 2026-08-25 18:09:16 +08:00