Uncovering the black box information of .Net compiler, MS has come up with the Roslyn project which will expose all the rich knowledge and information produced during compilation.
The mail goal is to open up new opportunities to write powerful refactoring and language analysis tools and if you want to incorporate your custom parser on top of the existing ones – like XML or writing compiler extensions. 😉
Although, this is not part of existing VS 2010 editions but you still can download and dive into. Make sure you have VS 2010 with SP1 installed.
Download it from here.
Read more here.