Someone on this site mentioned that it was possible to use frog to convert javascript to dart. I gave it a try but was unsuccessful.
what is the detailed procedure to convert javascript to dart with frog?
thanks
Florian Loitsch (from the Google Dart team) created a JavaScript to Dart parser at the recent London Dart Hackathon.
Code: http://code.google.com/p/jsparser/
Announcement (quoted below): https://groups.google.com/a/dartlang.org/group/misc/browse_frm/thread/4d7af7aec81f2ac4#
I spend a little bit of time during this weekend to make it more complete and usable, but don't expect a polished product. For example there are no tests, yet.
That said: I do think that the library is in a usable state. I also tried to keep the code simple (even if that sometimes meant sacrificing some speed), and I hope that this alone makes the library valuable.
My motivation for the parser was to help in (semi) automatic translations from JavaScript to Dart. Currently I don't have the time to continue on this path, but maybe somebody else wants to give it a try?
-Florian Loitsch
Update: turns out Florian from the Google Dart team made a proof of concept of a JavaScript-to-Dart converter.
This is not possible. What is (or soon will be) possible is for the Dart JavaScript compiler to self host, meaning that you could compile the compiler to JavaScript, embed it into a web page and compile Dart dynamically to JavaScript on the fly. This will also make the DartBoard much more interactive, unlike the current edition which executes your Dart code server side.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With