Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've learned about them, staring endlessly at the luajit source code - for example (not the best example I can remember, but still) - https://github.com/LuaJIT/LuaJIT/blob/v2.1/src/lj_lex.h#L15

there it defines a TOKEN(_,__) macro generator the luajit token/keywords and later generates enums with them.

I've used it recently to wrap a "C" api with lots of functions, such that I can redirect calls.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: