Roslyn brings the concept of the compiler as a service to the C# and VB languages. See here for the history of Roslyn and its motivations.
RoslynP (P for Portable) is a Roslyn subset allowing Roslyn core concepts to be used to build tooling for any language, not just C# and VB. RoslynP brings Roslyn's goodness everywhere.
This project is currently experimental.
Currently RoslynP includes functionality for:
- Syntax trees (with immutability via red/green trees): SyntaxTree, SyntaxNode, SyntaxToken, SyntaxTrivia, etc.
- Source code text: SourceText, TextSpan, Location, etc.
- Diagnostics (errors/warnings/info): Diagnostic, DiagnosticSeverity, etc.
- Compilation driver: Compilation (much simplified from normal Roslyn)
RoslynP is about 1/5th the size of Roslyn. Some of what's excluded:
- Everything C# or VB specific
- Semantic model (
I*Symbol
classes) - we might add this in the future, but it's less generally useful than syntax tree support - Support for emitting code (IL) - RoslynP is intended to build the language front end; back end support needs are less general
RoslynP adopts the philosophy of starting small-ish and adding more Roslyn-style functionality as needs dictate. That makes the project more manageable. We will bring more from Roslyn to RoslynP as there's a need, if at least one client wants it
Perhaps one day. But note that the projects serve different needs - Roslyn is about having a first class C# and VB experience, with the Roslyn team focused on that. RoslynP is for other languages, maintained by its users.
RoslynP was forked off the release/dev16.1
Roslyn release. It will get occasional updates with Roslyn changes, though the forked code doesn't change often.
- Roslyn Overview
- Tutorial articles by Alex Turner in MSDN Magazine
- Samples and Walkthroughs
- Documentation
- Analyzer documentation
- Syntax Visualizer Tool
- Syntax Quoter Tool
- FAQ
- Roslyn Wiki Home