Skip to content
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

Suggestion: handling of mixed typedef and struct definition #36

Open
pierre-24 opened this issue Jan 20, 2024 · 1 comment
Open

Suggestion: handling of mixed typedef and struct definition #36

pierre-24 opened this issue Jan 20, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@pierre-24
Copy link
Contributor

Linked to #35

In C (it is not the case in C++), it is customary to do

typedef struct stuff_ {
  int a;
} stuff;

If doxide encounter such construct, it seems to be creating a page for struct stuff_ and forgets about the typedef. It would probably be possible to automatically duplicate this info and create an corresponding entry for the corresponding typedef structy stuff_ stuff.

However, that's a C specific stuff, so I understand if it is not a priority :)

@lawmurray
Copy link
Owner

This is great feedback, thanks. And I would like to make C support a priority, so any contributions to improve parsing and output for C would be happily received. I think this one wouldn't be too tricky to support, the tree-sitter query (even though it's for C++, as much as possible would be good to reuse it for C) likely just needs to catch the common use case of a the typedef around a struct declaration and set up the data structure of entities accordingly.

@lawmurray lawmurray added the enhancement New feature or request label Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants