cincheo / jsweet

A Java to JavaScript transpiler.
http://www.jsweet.org
Other
1.45k stars 160 forks source link

Question on "repurposing" the transpiler #621

Closed lwhite1 closed 3 years ago

lwhite1 commented 3 years ago

Apologies in advance as this question is off-topic, but I made it multiple choice so it shouldn't take too long. :)

I'm implementing a simple language for educational purpose. I'm writing the lexer and parser in java, and I'd like to transpile to Javascript.

What I'm considering is trying to use Jsweet as my transpiler. My thought was to walk my AST, translating to the Jsweet AST. Then ask Jsweet to compile. So would you say:

A. That's nuts. the compiler is tightly integrated and has to start from Java source. B. That's not entirely nuts, but it would be a heck-of-a lotta work. C. Don't bother unless you're an absolute master in both languages, and you're not. D. Sure, why not.

Thanks very much for any help/guidance.

lwhite1 commented 3 years ago

i've decided to try something a little different so i will close this. cheers.

renaudpawlak commented 3 years ago

A ;)

renaudpawlak commented 3 years ago

let's say A / B ;)