rusty-typescript icon indicating copy to clipboard operation
rusty-typescript copied to clipboard

OCaml

Open goodmind opened this issue 6 years ago • 4 comments

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

goodmind avatar May 01 '19 04:05 goodmind

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

lulu-berlin avatar May 01 '19 08:05 lulu-berlin

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

goodmind avatar May 01 '19 09:05 goodmind

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

goodmind avatar May 01 '19 09:05 goodmind

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.

lulu-berlin avatar May 01 '19 09:05 lulu-berlin