masak / bel

An interpreter for Bel, Paul Graham's Lisp language
GNU General Public License v3.0
26 stars 1 forks source link

Have some tests that check that macros can be called at runtime #413

Open masak opened 2 years ago

masak commented 2 years ago

It just occurred to me that we don't have test coverage for this. Something like:

(mac moo ()
  (pr "B" \lf)
  `(pr "C" \lf))

(pr "A" \lf)
(moo)

Should print A B C, in that order.

Maybe also one or more tests with mutable state being mutated in the macro body.