Re: How does one determine the UDAs of all symbols contained in a given module?

2017-07-24 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-07-21 06:16, Andrew Edwards wrote: Thanks... Minus the AliasSeq bit, this is pretty much what I've been working with since talking to Brain. The main problem I'm facing is that it fails to compileif any of the symbols in the imported module is marked private. Ah, yes. That's a known

Re: How does one determine the UDAs of all symbols contained in a given module?

2017-07-20 Thread Andrew Edwards via Digitalmars-d-learn
On Wednesday, 19 July 2017 at 14:23:25 UTC, Jacob Carlborg wrote: Here's an example: Thanks... Minus the AliasSeq bit, this is pretty much what I've been working with since talking to Brain. The main problem I'm facing is that it fails to compileif any of the symbols in the imported module

Re: How does one determine the UDAs of all symbols contained in a given module?

2017-07-19 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-07-19 13:49, Andrew Edwards wrote: Thanks Jacob and Nicholas... Brian Schott helped me out a bit on IRC earlier. I'm still not getting exactly what I'm looking for though so wanted to experiment a bit more before posting an update here. I'll check out the warp.d examples Nicholas linke

Re: How does one determine the UDAs of all symbols contained in a given module?

2017-07-19 Thread Andrew Edwards via Digitalmars-d-learn
On Wednesday, 19 July 2017 at 11:28:30 UTC, Jacob Carlborg wrote: On 2017-07-19 11:25, Nicholas Wilson wrote: You'll want to use https://dlang.org/spec/traits.html#getMember in conjunction with https://dlang.org/spec/traits.html#getAttributes. Have a look some of the projects on github e.g.

Re: How does one determine the UDAs of all symbols contained in a given module?

2017-07-19 Thread Jacob Carlborg via Digitalmars-d-learn
On 2017-07-19 11:25, Nicholas Wilson wrote: You'll want to use https://dlang.org/spec/traits.html#getMember in conjunction with https://dlang.org/spec/traits.html#getAttributes. Have a look some of the projects on github e.g. https://github.com/kaleidicassociates/excel-d/blob/master/source/xl

Re: How does one determine the UDAs of all symbols contained in a given module?

2017-07-19 Thread Nicholas Wilson via Digitalmars-d-learn
On Wednesday, 19 July 2017 at 07:29:55 UTC, Andrew Edwards wrote: Given a module (somepackage.somemodule) how does one programmatically determine the symbols contained therein and associated UDAs? Where symbol is a variable, function, UDT, etc... is this possible? foreach (symbol; somep

How does one determine the UDAs of all symbols contained in a given module?

2017-07-19 Thread Andrew Edwards via Digitalmars-d-learn
Given a module (somepackage.somemodule) how does one programmatically determine the symbols contained therein and associated UDAs? Where symbol is a variable, function, UDT, etc... is this possible? foreach (symbol; somepackage.somemodule) { writeln(symbol.name, " attributes :")