Saturday, October 29, 2011

First impressions of Roslyn CTP

I installed the CTP on my computer.
As you know the Microsoft Roslyn CTP enables the C# and Visual Basic compilers to be used as a service. Whereas today’s compilers are implemented in native C++, in Roslyn the compilers were rewritten from the ground up, implementing the C# compiler in C# and the Visual Basic compiler in Visual Basic. With these compiler rewrites, the Roslyn compilers become services exposed for general consumption, with all of that internal compiler-discovered knowledge made available for developers and their tools to harness. The stages of the compiler for parsing, for doing semantic analysis, for binding, and for IL emitting are all exposed to developers via rich managed APIs.
The Syntax Visualizer Tool is a Visual Studio Extension that enables inspection of 'live' Roslyn Syntax Trees for any C# code file that is open inside the Visual Studio IDE.

You can also see a graphical representation of the syntax tree. But you need Visual Studio 2010 Premium or Ultimate edition.