Arc Forumnew | comments | leaders | submitlogin
1 point by stefano 5974 days ago | link | parent

I've implemented them as I've described here: http://arclanguage.org/item?id=7097

They still have some problems when you use the compiler to compile itself, because macros have to run in the host compiler environment and not in the target environment (that doen't still exist). I'll write more about this problem in a NOTES file I have to add to the repository. The key point in implementing macros in a compiled system is first to get the system able to compile itself: once that point is reached, they are quite straightforward to implement, except for the problem mentioned before. The last two functions in transformations.arc plus the function eval in lib.arc implement macros.