this looks very nice.
in time it will be a very good code completion plugin..
as for the "heavy macros";
parse all macros to a database, then when parsing a line, "dereference" the macros till there are no macro references left.
for example.
1. //used in GCC i thought
2. #define DLL_EXPORT _attribute_((export))
3. #define CLASS class DLL_EXPORT
4. CLASS someclass
5. {
6. /* some stuff */
7. };
1. { we are parsing line 4 {
2. find CLASS in macro db
3. found CLASS, {replace
4. class is not a macro
5. found DLL_EXPORT, {replace
6. _attribute_ and export are not macros } }
7. someclass is not a macro }
8. start parsing definitions, declarations etc.
line that it is parsing is 'class _attribute_((export)) someclass'}
this could fix the "heavy macro" "bug"... just an idea
thought it has performance impact... but at least its correct
if you manage the database well, like ordering entries by name u can make a very fast algorithm to search for definitions and declarations.
and if u make it so it only parses on a new project and if u edit a line performance impact should not be noticable when programming (unlike intellisense, blegh)