[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LuaJIT FFI purely using .h files; and handling the multiple definition attempts
- From: Andrew Yourtchenko <ayourtch@...>
- Date: Wed, 2 Mar 2011 20:58:59 +0100
On Mon, Feb 28, 2011 at 5:13 PM, Mike Pall <email@example.com> wrote:
> Andrew Yourtchenko wrote:
>> And I think the best approach is actually to implement the
>> preprocessor itself.
> Umm ... an integrated pre-processor is definitely on my TODO list
> for the FFI. I just don't know when I'll get around to it.
Couple of evenings ago I got the #ifdef/#ifndef/#else to work (and the
beginnings of the parameter-less as well as parametrized #defines).
All of the code quite a bit ugly/incomplete at this point, but so far
I am able to deal with the pearls like this:
*/ # /*
The parametrized macros calls that stretch multiple lines not handled
yet - but I will deal with that when I get the rest of the stuff done
- like proper parsing of the expressions within the #if.
Here's a good set of unit-tests IMHO:
>> Having a Lua-aware CPP would allow also to pull in the #define-d
>> primitives - which would be a plus.
> That's part of the plan, of course.