willsteel/lcpp — pull request #11 by umegaya (2014-01-01 01:06:40+00:00)
Title: process macro chaining caused by concat correctly

hi, I love lcpp feature and use it in my project for parsing some practical library's header file (pthread.h in osx).
but lcpp did not handle macro chaining as I expected.

below quick example about my expectation.
``` lua
#define CONCAT_TEST1 foo##bar
#define CONCAT_TEST4(baz) CONCAT_TEST##baz
CONCAT_TEST4(1) -- I expect its compiled to foobar, but lcpp keep it CONCAT_TEST1
```

and it seems that lcpp missing re-processing token when ## is processed.
for above example, after CONCAT_TEST4 processed and it compiled to CONCAT_TEST1, lcpp reprocess it again
and compiled it to foobar.

I add some test case and fixing code which passes these new test.
but this is not entirely tested for various macro usage.
so can you review this fix?
if it seems good, please merge this commit.
thanks and happy new year!!