Re: list of all defined items in a D file

2020-01-25 Thread Basile B. via Digitalmars-d-learn
On Friday, 24 January 2020 at 14:28:03 UTC, berni44 wrote: On Friday, 24 January 2020 at 12:22:49 UTC, Dennis wrote: You can pass the -X flag to dmd, which makes it generate a .json file describing the compiled file. Great, that's what I was looking for - although it's also good to know the

Re: list of all defined items in a D file

2020-01-24 Thread berni44 via Digitalmars-d-learn
On Friday, 24 January 2020 at 12:22:49 UTC, Dennis wrote: You can pass the -X flag to dmd, which makes it generate a .json file describing the compiled file. Great, that's what I was looking for - although it's also good to know the __traits approach! Thanks!

Re: list of all defined items in a D file

2020-01-24 Thread Dennis via Digitalmars-d-learn
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? You can pass the -X flag to dmd, which makes it generate a .json file describing the compiled file.

Re: list of all defined items in a D file

2020-01-23 Thread Anonymouse via Digitalmars-d-learn
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.

list of all defined items in a D file

2020-01-23 Thread berni44 via Digitalmars-d-learn
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?