-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add Size and Alignment on type/field hover #70
Comments
Go's LSP Gopls may be a helpful reference, here's the code: |
Is there any reference on C3 about what size every type uses? |
There is a list on basic types that shows the bit size of primitives |
As a note, you also need to take alignment into account for padding in structs. Unions are just the size of their largest item. To verify that types are calculated properly, you can use |
@pherrymason how is this going? There was some progress posted in the tooling channel of discord, but haven't heard anything since. Did you get stuck or did life start doing life things and you've been busy? |
Sorry, I've been more busy lately and could not advance with this |
Is your feature request related to a problem? Please describe.
No
Describe the solution you'd like
Both Golang and Rust show the size and alignment of types. Since C3 is a lower level language, it would be useful to have this information available on hover, instead of needing to use something like reflection.
Describe alternatives you've considered
Reflection could be used, but it is not as convenient
Additional context
Type:
Field (from Josh):
The text was updated successfully, but these errors were encountered: