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

Nested structs & unions #28

Merged
merged 5 commits into from
Mar 19, 2024
Merged

Conversation

Srekel
Copy link
Contributor

@Srekel Srekel commented Mar 18, 2024

As indicated in the tests, this now supports various forms of structs and unions inside structs.

The main thing I had to change was that previously, an anonymous struct would immediately yield a field defining that struct, which was nice. But I couldn't get that behavior to work together with various other kinds of struct definitions.

In the clang ast, the RecordDecl always comes first and then the FieldDecl referencing it comes, and so I had to register the record by it's line & column.

Future work: Add similar support for enums.

@lassade lassade merged commit 49ead61 into lassade:main Mar 19, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants