200sc / bebop

bebop wire format in Go
Apache License 2.0
69 stars 5 forks source link

Feature/custom sized enums #35

Closed 200sc closed 1 year ago

200sc commented 1 year ago

This resolves #24, adding support for specifying an integer type on enums.

sveinnthorarins commented 1 year ago

I believe you forgot to consider enum custom sizes when generating structs (that contain fields whose types are custom-sized enums).

For example, the MarshalBebopTo method will just call iohelp.WriteUint32Bytes regardless of the enum's custom size.