How can I simulate macros in JavaScript?

后端 未结 8 1163
悲哀的现实
悲哀的现实 2020-12-05 10:02

I know that JavaScript doesn\'t support macros (Lisp-style ones) but I was wondering if anyone had a solution to maybe simulate macros? I Googled it, and one of the solution

8条回答
  •  甜味超标
    2020-12-05 10:57

    Check out the Linux/Unix/GNU M4 processor. It is a generic and powerful macro processor for any language. It is especially oriented towards Algol-style languages of which JavaScript is a member.

提交回复
热议问题