Is there any simple ready-to-use JS-parser (node.js) of C# syntax?
The only choice I found so far is ANTLR4, but it requires Java to build JS-parser, has very complicated API and finally I wasn't able to successfully build JS-parser with it. It generated JS-files with incorrect syntax.
In specific. I have a bunch of files of C# source files.
let src = {
'file1.cs': 'src...',
'file2.cs': 'src...'
};
I need something like
let parser = require('magic-csharp-parser');
for (let fileName in src) {
let ast = parser.parse(src[fileName]); // traversable syntax tree
}
Comments
Post a Comment