有很多片段详细描述了Erlang中解析转换过程的细节,但是我没有找到一个完整的从动机到执行的覆盖面。是否有一个好的教程我在哪里遗漏了,如果有的话,在哪里可以找到?
busg9geu1#
Check out this series of blog posts, by Philip Robinson, on how to use parse transform capabilities of Erlang to write a macro processor for Erlang:
z18hc3ub2#
通过使用https://github.com/uwiger/parse_trans,这些操作变得很容易
kdfy810k3#
请注意“Programmers are strongly advised not to engage in parse transformations and no support is offered for problems encountered”。有时它简化了编写新代码的过程,但经常会破坏语法检查器,如flymake。事实上,我讨厌它,因为当你试图弄清楚别人在源代码中做了什么时,它会增加一层新的混淆。
3条答案
按热度按时间busg9geu1#
Check out this series of blog posts, by Philip Robinson, on how to use parse transform capabilities of Erlang to write a macro processor for Erlang:
z18hc3ub2#
通过使用https://github.com/uwiger/parse_trans,这些操作变得很容易
kdfy810k3#
请注意“Programmers are strongly advised not to engage in parse transformations and no support is offered for problems encountered”。有时它简化了编写新代码的过程,但经常会破坏语法检查器,如flymake。事实上,我讨厌它,因为当你试图弄清楚别人在源代码中做了什么时,它会增加一层新的混淆。