Mono Compiler as Service or Microsoft Roselyn for a vb parser -
i want analyze vb code parse roselyn or mcs, want c sharp code want analyze in vb code.
i have seen in both frameworks, can pass code , gives syntax tree, example if writting in c sharp, 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 if can done mcs mono or microsoft roslyn?
yes, can that. need use types namespace roslyn.compilers.visualbasic
(in assembly same name) instead of types roslyn.compilers.csharp
.
Comments
Post a Comment