If my application is using C# and VB.NET exclusively, can you describe the differences between using the AlterNET Roslyn parser and the Advanced C# and VB.NET parsers? Do they have all the same features? Why would someone pick one over the other?
Hi Walter,
Advanced C# and VB parsers are use hard-coded algorithms for syntax parsing, these parsers were developed by us, they might lack some very recent language constructs (C# 6 features for example), and there are other imperfections - such as code completion for LINQ is not implemented.
Roslyn parsers on the other hand are based on Microsoft Code Compiler technology, which is now used in Visual Studio itself. With these parsers you can have pretty much the same experience with code editing comparing to Visual Studio. Unlike advanced parsers, which perform only syntax analysis of the text only, roslyn-based parsers do semantic analysis as well, which allows features like highlighting known types with different color, red-lining semantic errors and warnings (i.e. identifier not found, or variable not used); and provide better code completion.
So, Roslyn-based parsers are more solid and robust as they're based on industry-grade technology and if you have a choice between using them and advanced parsers, I would definitely go with Roslyn.
Do you support all the same features for VB.NET and C# in your Roslyn parsers?
I'm learning that the Roslyn API doesn't seem to completely support VB.NET. For example, this works on C# script but not VB.NET:
var tree = Parser.Repository.Document.GetSyntaxTreeAsync().Result;

var root = tree.GetRoot();

var classes = root.DescendantNodes().OfType();
Or maybe I misunderstood. I see now that I need to include Microsoft.CodeAnalysis.VisualBasic as well...