Hello,
I've been using CB for a few months now and love it.
As I started noticing some parsing bugs and areas of improvement in CC features, I decided to take a look at it and have so far managed to fix most of the things I had in mind. I've attached a patch file and commented all my changes, let me know if something is not clear.
To summarize the important changes:
1) Full file parsing (i.e., expand each #include file and recurse), no need to keep priority headers. Previously when the parser finds an #include token, the file was simply added to the end of the parsing queue, so although all the include files are getting parsed anyway, it is done in the wrong order. Now the #include file parsing is done immediately instead of getting queued. It also means there is no need for 3-phase parsing (priority headers, non-priority headers, sources) anymore, simply parsing the source files is enough.
2) The "Grey out inactive code" feature now uses CC plugin support. I had to study carefully the CB SDK vs Scintilla communication to get this done in a clean way. I'm happy with my current implementation but let me know if it needs improvement. Despite the limitations of CC plugin, this feature is working nicely for most practical purposes. In case a token is #defined and used within the same file, their order is checked too. This ensures header files (with header guards) do not get totally greyed out.
3) CC support for DirectX (and related typedefs) and full WinAPI (including macro and function calltips). Parses function pointers and variables defined with constructor (eg.,
wxString myString(_T("text")); ), recursive union inside union, etc. and several other fixes. Improved tooltip behavior and speed, for both CC and Debugger.
With my 2008 PC (Core 2 Duo 2.6 GHz) and all parsing options enabled (parse global / local headers, preprocessor, complex macros) it takes about 20sec to parse the full CodeBlocks project, not bad at all.
All changes are checked with rev 9271.
[attachment deleted by admin]