Thanks Krux02, I have tried it, it works as intended for strings and I couldn't make it to work for anything else. Names of the types is not sufficient indicator to determine whether it is enum, union, set and etc. What is probably I am after is compiler generates some useful file that python script can consume.
It is hard to believe no one has done it so far, I quickly reached the point where putting renderTree,typeToString and debug everywhere in Nim compiler no longer helps understanding what is going on. I don't see how one can contribute without solving the debugging dilemma.
