anko / eslisp

un-opinionated S-expression syntax and macro system for JavaScript
ISC License
528 stars 31 forks source link

How can I use macroexpand and macroexpand-1 in eslisp? #28

Closed legokichi closed 8 years ago

legokichi commented 8 years ago

I want to use macroexpand and macroexpand-1 like common lisp. Or eslc compiler need to output s-expression source code after apply macro.

anko commented 8 years ago

That is not currently possible.

macroexpand would be possible to add, but might break in the future if macros become able to return estree objects instead of lists/atoms/strings.

Overall, I am finding it difficult to keep everything feeling familiar to lisp. The macro system still needs lots of work, so I am scared of adding things that would force a certain implementation. I will try to add it in the future.

legokichi commented 8 years ago

I see. Thank you for your answer. :+1: