xxxxxxxxxx
string dump(string exprs)()
{
import std.algorithm, std.conv;
auto args = exprs.splitter(";").map!q{ "\"" ~ a ~ " = \"," ~ a }.joiner(",'\t',").to!string;
return "import std.stdio; writeln(" ~ args ~ ");";
}
void main()
{
auto x = 123;
auto y = [[1, 2], [3, 4]];
mixin(dump!q{x+45;y}); // x+45 = 168 y = [[1, 2], [3, 4]]
}