New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse C/C++ tags wrapped in an extern "C" {...} block #349
Comments
Agree, although inside {} these are really global declarations. |
@elextr Yep, added |
BTW fishman ctags does parse extern C blocks, and our code is probably meant to (e.g. |
Err, what are you using? For me it works just fine, and produces an Extern Variables |
I'm having this issue too, on Windows 10, types are not highlighted correctly inside #ifdef __cplusplus
extern "C" {
#endif
typedef struct SomeStruct SomeTypedef;
struct SomeStruct
{
int x;
};
#ifdef __cplusplus
}
#endif Doesn't highlight the type name "SomeTypedef" in C, but it does for the "SomeStruct". If I switch the filetype to C++, neither type is highlighted. It must be Windows-specific, I know this works fine Linux for sure. |
Confirm that like @b4n the test code used by @codebrainz works fine on linux. |
As a workaround, putting the |
Just for the record, I tested the code snippet on Windows with the ctags binary we ship with Geany-Plugins (originating from the MSYS2 ctags package) and this binary also does not parse the extern variable. |
As far as trying the input directly with u-ctags, it captures all expected tags. |
@eht16 Did the new cxx parser fix this issue on Windows? |
Good, one more mysterious bug away. |
Maybe have a unit test for this? |
Yeah, but parser problems should mostly be business of uctags now. And I think the new cxx parser is tested quite well there. |
Geany fails to parse tags wrapped in an
extern "C" {...}
block, even in C++. The construct should be recognised for the C parser also, so this pattern is supported:The text was updated successfully, but these errors were encountered: