
Visual Basic Grammar
We’ve made great progress on the Visual Basic grammar over the past couple weeks that will be part of the SyntaxEditor .NET Languages Add-on for WPF and Silverlight. Here’s a screenshot of the VB language with full parsing capabilities in SyntaxEditor for Silverlight:

Parsing
It is using background threading to parse the document and returns an abstract syntax tree (AST) when complete, along with parse errors that were found. In this case, a type name was expected after the As keyword so a squiggle appears under the ). When we mouse over the squiggle, we get the parse error message in a quick info tip. Parse errors can easily be displayed in a ListBox too.
Intelligent Parse Error Reporting
As with the C# grammar described in a previous post, we’ve spent a lot of time to create intelligent parse errors. As you type, syntax errors will tell you exactly what is expected if your syntax isn’t correct.
Automatic Outlining
Also note the automatic outlining that is in effect in the editor. It examines the AST and determines what ranges to make collapsible. All this updates live as you type.
AST Classes
We have well over 100 distinct AST node classes defined for the add-on, most of which are shared between the C# and VB parsers.
Grammar Unit Tests
We have a complete set of unit tests that test the entire VB grammar and warn us if our AST output doesn’t match what we expect.
We also have unit tests that scan folders of VB code to make sure no parse errors are found.
Next Steps
We hope to offer up the VB language with parsing capabilities to our closed beta testers on Monday. After that we’ll do some more tweaks and cleanup and then will hope to get our public 2011.1 releases out, first for WPF, then for Silverlight.