4 ms·
Sweet.js (http://sweetjs.org http://sweetjs.org) and MacroPy (https://github.com/lihaoyi/macropy https://github.com/lihaoyi/macropy) come to mind. Actually "re
by klibertp 12y ago
Sweet.js (http://sweetjs.org http://sweetjs.org) and MacroPy (https://github.com/lihaoyi/macropy https://github.com/lihaoyi/macropy) come to mind. Actually "real macros" are just macros which operate on AST instead of on strings, they are hard to do if you have to re-implement language parser, but rather easy if the language exposes its AST api, like in Python case.