tomhrr / dale

Lisp-flavoured C
BSD 3-Clause "New" or "Revised" License
1.03k stars 48 forks source link

Add debug macros #110

Closed porky11 closed 6 years ago

porky11 commented 7 years ago

Especially the current way to see macroexpansions is not very usable. I'd like to be able to get the macro-expansion of a macro at compiletime, so I could write something like: (print (macro-expansion (my-macro …))) and see the expanded macro, maybe being able to specify a number of maximal expansions for recursive macros

tomhrr commented 6 years ago

Thanks for this. eval-macro-call was added for unrelated reasons after this issue was submitted, and it handles the macroexpand case. It only had to be modified slightly to handle the macroexpand-1 case, fortunately.