lulu-berlin / rusty-typescript

A TypeScript compiler written in Rust
https://twitter.com/TypescriptRusty
Apache License 2.0
235 stars 6 forks source link

OCaml #33

Open goodmind opened 5 years ago

goodmind commented 5 years ago

It would be very cool if it would be easy to port this to OCaml, at least lexer and parser

lulu-berlin commented 5 years ago

Port the Rust code? What's the use case? I think we should first finish porting it from TypeScript to Rust.

goodmind commented 5 years ago

@yever yeah, or bindings to OCaml with C interface. It is just impossible to use TypeScript parser in other languages

goodmind commented 5 years ago

Use case is to merge TypeScript into Flow 😳 Aka write AST-to-AST converter directly in Flow typechecker for .ts file, this is just mad idea I had. It would be lossy conversion of course

lulu-berlin commented 5 years ago

Well, part of the idea here, as I tried to outline in #24 is to create a Rust library for compiling TypeScript separately from the WebAssembly target. This Rust library could then have bindings to whichever language you want. Additionally, the WebAssembly target can be integrated anywhere you have a browser or nodejs.