Skip to content

Directly implementing Roslyn AST to JavaScript is quite complex. Converting Roslyn AST → ESTree AST → JavaScript might be a better approach. #1

@devhxj

Description

@devhxj

It’s great to see someone working on the same thing. My implementation is a bit different from yours, though. I convert Roslyn AST to Acornima ESTree AST, and then transform it into an ES6 module. I use IIncrementalGenerator + Target to compile and convert JS files. I’ve also written an analyzer to restrict the syntax that can be used. However, my code is still quite a mess. I’ll release it once I’ve tidied it up. Looking forward to progressing together.
Initially, I implemented a CSharpSyntaxWalker to handle AST conversion (not fully completed). Later research revealed that combining CSharpSyntaxWalker with OperationWalker could achieve more precise semantic matching.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions