bottlenoselabs / c2cs

Generate C# bindings from a C header.
MIT License
245 stars 18 forks source link

Sort C# generated code #117

Closed lithiumtoast closed 1 year ago

lithiumtoast commented 1 year ago

Sort C# nodes for consistent C# source code file generation using file location in the C header file.

Layout is determined by C# node kinds. E.g. API functions come first, followed by types, etc. For the types, it's the following order: function pointers, structs, opaque types, typedefs, enums, macro objects, enum constants. Sorting happens for each of the previously mentioned as collections. E.g. the collection of function pointers are now sorted by C header file location.

lithiumtoast commented 1 year ago

fixes #90