google / google/emboss

Provide support for private Aliases

Open
#139 0 comments 1 reaction 0 assignees View on GitHub
enhancement language feature
Dominant language
Python
Stars
92
Forks
30
PR merge metrics
No merged PRs in 30d

Description

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
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.