Okay. Okay, yeah!

So with one little change (okay, one large change I wrote over two days), I think my mini-LISP is now set up to be effortlessly converted into an assembler:

codeberg.org/mcc/nameless-expe

What I'm gonna do is let the reader build the AST, run the transformations of the preprocessor macros, then yank the data structure away and instead of the LISP interpreter pass it as input to some other program, decided by command-line flag, which in this case will treat it as assembly language.

# Simple compile-time code exec
# Expect: 4

discard !: set 'x 4

print !x ln
0

If you have a fediverse account, you can quote this note from your own instance. Search https://mastodon.social/users/mcc/statuses/114707678698699889 on your instance and quote it. (Note that quoting is not supported in Mastodon.)