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

Provide support for private Aliases #139

Open
studgeek opened this issue Apr 30, 2024 · 0 comments
Open

Provide support for private Aliases #139

studgeek opened this issue Apr 30, 2024 · 0 comments
Labels
enhancement New feature or request language feature

Comments

@studgeek
Copy link
Contributor

It would be helpful to support private/local Aliases that are not exposed in the generated code. That way they can be used for computing offsets and sizes, but without polluting the fields shown in the generated code.

For example, something like the following would allow using hdr_size in the struct, but wouldn't add hdr_size to the generated code.

  private let hdr_size = EventHeader.$size_in_bytes
  0       [+hdr_size]  EventHeader  header
  $next   [+1]         UInt         num_hci_command_packets
  $next   [+2]         OpCode       command_opcode_enum
  $next-2 [+2]         OpCodeBits   command_opcode_bits
@studgeek studgeek changed the title Provide support for private aliases Provide support for private Aliases Apr 30, 2024
@jasongraffius jasongraffius added the enhancement New feature or request label Jul 22, 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 language feature
Projects
None yet
Development

No branches or pull requests

3 participants