On Thursday, 23 January 2020 at 17:10:29 UTC, berni44 wrote:
I'd like to get a list of all items (public, package, private) that are defined in a D file. Is there a simple way, to get them?
__traits(allMembers, mixin(__MODULE__))?Replace with a full module name if not the current one. You'll only get their string names with that though, not aliases to the symbols themselves (as you would have with .tupleof). I imagine you could get those with __traits(getMember, moduleName, stringName).