Here is a piece of code from one of ImageMagick headers.
extern WandExport void
ClearMagickWand(MagickWand *),
MagickWandGenesis(void),
MagickWandTerminus(void),
*MagickRelinquishMemory(void *),
...
In this case, MagickWandGenesis is recognized not as a function, but as a return type for MagickWandTerminus. This is clearly wrong.
What does "WandExport" means? a type?
No, that's probably function attribute. On windows it discloses for compiling DLLs properly.
So, do you mean like this:
yep, something like that
just skip attributes i.e. every token between extern and something that has semicolon or comma after it and process every next token as function name until semicolon
We need to handle comma as a terminator for function declarations (in
HandleFunction()). It's not enough to support this case, but it's a start. Here's a preliminary patch.Hello, Huki, long time no see.
Thanks for the patch, I will see I can take some time to test your patch this week.
I'm always thinking how to improve our CodeCompletion's Parser and Tokenizer. This is not a simple task.
Yep, good to be back. :)
Good news is I was able to finish rest of the changes needed to support function declaration lists. See the cc_fixes branch in my repo:
https://github.com/gk7huki/codeblocks_sf/commits/cc_fixes
I also added some tests.
Hi, huki, thanks for the patches and the test files.
I just did a simple test (running the CCTest project on the file new cc test file), and the result is good! 100% PASS.
See below:
About the test file, here is the modified cc test file:
The cc test file has some special "rules" which is desinged by me several years ago. The test line should only be put in the last lines of the source file.
For a test case:
This means when user type "Func", and request for a code suggestion, the suggesting list should contains the "Func1" and "Func2".
I will review the detailed changes as soon as I can.