Rather than explicitly building a DAG and doing a topological sort, just traverse structs recursively and emit declarations for all of their dependent structs before emitting the original struct declaration. Not only is this simpler than the previous implementation, but it fixes a bug where we'd hit an assert if we had a struct with multiple contained members of another struct type.
66 KiB
66 KiB