parsing again
Saaa
empty at needmail.com
Thu Jul 2 11:16:05 PDT 2009
Kisses Ary:
It seems you can't mixin cases separately, you need to mixin the whole
switch (bug?)
string CasesString(int depth)
{
string res;
res ~= `switch( depth ){`;
for (int i = 0; i < depth; ++i)
{
res ~= `case `~ctToString(i)~`:`~
` if( temp`~ indexString(i) ~`.length < index[`~ctToString(i)~`] )
temp`~ indexString(i) ~`.length = temp`~ indexString(i) ~`.length * 2 ;`~
`break;`;
}
res ~= `default:assert(false);break;}`;
return res;
}
mixin ( CasesString(Depth!(T)) );
More information about the Digitalmars-d-learn
mailing list