[banjo] Support more types as union fields
This causes union fields to be generated using the same logic as struct fields, so that arrays and strings are properly handled. Note for now that vector fields are excluded from unions, as they actually generate two fields (a pointer and a count) which does not interact well with unions. Change-Id: I69a36903390740d5443f5e3ff0d00d3e49e423f8
Showing
- tools/banjo/banjo/src/backends/c.rs 86 additions, 81 deletionstools/banjo/banjo/src/backends/c.rs
- tools/banjo/banjo/test/ast/types.test.ast 355 additions, 0 deletionstools/banjo/banjo/test/ast/types.test.ast
- tools/banjo/banjo/test/banjo/types.test.banjo 31 additions, 0 deletionstools/banjo/banjo/test/banjo/types.test.banjo
- tools/banjo/banjo/test/c/protocol-other-types.h 1 addition, 1 deletiontools/banjo/banjo/test/c/protocol-other-types.h
- tools/banjo/banjo/test/c/types.h 31 additions, 1 deletiontools/banjo/banjo/test/c/types.h
Loading
Please register or sign in to comment