I'm adding some extras to basic meta-programming for C, and I can't come up with a simple, but fairly robust way to distinguish between global variable and function declaration.
Function declaration being:
int oompaloompa(int a, int b);
Since anything can be pointer to function returning another N times nested function pointer...
And I don't know the full extent of craziness going on there (such as rules for omitting function return
types and god knows how deep the rabbit hole goes) -
I'm not quite sure how to do this, any ideas?
For brevity's sake lets assume that I know all the defined symbols (e.g. the typedefs).