i want to analyze vb code with a parse like roselyn or mcs, but i want to do it with c sharp but the code i want to analyze is in vb code.
I have seen that in both frameworks, you can pass the code and gives you the syntax tree, but for example if your writting it in c sharp, it can parser visual basic code?
SyntaxTree tree = SyntaxTree.ParseCompilationUnit(@"Imports System
Imports System.Collections
Imports System.Linq
Imports System.Text
Namespace HelloWorld
Module Program
Sub Main(args As String())
Console.WriteLine(“Hello, World!”)
End Sub
End Module
End Namespace");
var root = (CompilationUnitSyntax)tree.GetRoot();
My question is if the can be done with the mcs from mono or with microsoft roslyn?