A library for translating/converting cs into js, using Roslyn.
$ dotnet add package CSharpToJavaScriptNuget package | CLI | Website | Try it online!
This library is a "core" where all the "magic" happens for translating/converting cs into js, using Roslyn. You should use the CLI/dotnet tool, it behaves more or less like dotnet cli, tsc cli, meson. Look for the implementation in CLI, BWA app or simple "Hello world" below.
test262-parser(master): Only JS part (code is not public, yet. ES5 implemented) Total tests: 5363 | Passed: 2824 (52 %) | Failed: 2539
test262(es5 branch): Total tests: 11725 | Passed: 1272 (10 %)** | Failed: 10453
**Note: Tests run with "UseVarOverLet" option, using Jint as an engine.
FileData file = new()
{
SourceStr = @"Console.WriteLine(""Hello world."");"
};
file = CSTOJS.Translate(file);
Console.WriteLine(file.TranslatedStr);
console.log("Hello world.");
FileData file = new()
{
OptionsForFile = new(){ Debug = true },
...
};
...