static code generation

js.mdnq js_adddot+mdng at gmail.com
Sat Dec 15 14:30:45 PST 2012


On Saturday, 15 December 2012 at 19:09:25 UTC, r_m_r wrote:
> On 12/10/2012 01:24 AM, js.mdnq wrote:
>> which will fail or not be what I want, since I want to 
>> generate the
>> structs s1 and s1.
>
> how about this: http://dpaste.dzfl.pl/c0325def
>
> regards,
> r_m_r

Cool, That looks like a  step in the right direction.

Now, the next step is to be able to "insert" code into the 
struct! ;)

If we can get the template as a string then it can be parsed and 
code can be inserted, and we can also then do away with the alias 
and just change the name directly.

Also, maybe declaring the template as static would be better?


More information about the Digitalmars-d-learn mailing list