Re: Loop through all modules and module members?

2011-01-02 Thread Andrej Mitrovic
On 1/2/11, Philippe Sigaud wrote: >> Of course, you need to -J switch with the path of your module. > > I'm not much versed in DMD switches. I'll try and see. > > Philippe > Well it's a simple switch, really. If the module is in "C:\dev\project\", use: dmd -JC:\dev\project\ On *nix it's the same

Re: Loop through all modules and module members?

2011-01-02 Thread Philippe Sigaud
On Sat, Jan 1, 2011 at 18:56, Andrej Mitrovic wrote: > On 1/1/11, Philippe Sigaud wrote: >> I'm not sure it's doable at >> compile-time right now: you need to have access to the module code, as >> text. Do imports work in CT-evaluable functions? >> >> Philippe >> > > You're gonna love this: > > m

Re: Loop through all modules and module members?

2011-01-01 Thread Andrej Mitrovic
*the* J switch. On 1/1/11, Andrej Mitrovic wrote: > On 1/1/11, Philippe Sigaud wrote: >> I'm not sure it's doable at >> compile-time right now: you need to have access to the module code, as >> text. Do imports work in CT-evaluable functions? >> >> Philippe >> > > You're gonna love this: > > mod

Re: Loop through all modules and module members?

2011-01-01 Thread Andrej Mitrovic
On 1/1/11, Philippe Sigaud wrote: > I'm not sure it's doable at > compile-time right now: you need to have access to the module code, as > text. Do imports work in CT-evaluable functions? > > Philippe > You're gonna love this: module mymodule; void main() { pragma(msg, import(.stringof[7..$

Re: Loop through all modules and module members?

2011-01-01 Thread Philippe Sigaud
On Sat, Jan 1, 2011 at 11:14, bearophile wrote: > %u: > >> I would like to perform compile-time reflection on a module (such as >> enumerating all the classes inside the module) and/or on all modules in the >> code -- are either of these possible? And if so, how? > > You may add your enhancement r

Re: Loop through all modules and module members?

2011-01-01 Thread bearophile
%u: > I would like to perform compile-time reflection on a module (such as > enumerating all the classes inside the module) and/or on all modules in the > code -- are either of these possible? And if so, how? You may add your enhancement requests here, explaining why you need them: http://d.purem

Loop through all modules and module members?

2010-12-31 Thread %u
Hi, I would like to perform compile-time reflection on a module (such as enumerating all the classes inside the module) and/or on all modules in the code -- are either of these possible? And if so, how? Thank you!