Skip to content
geekrelief edited this page Sep 13, 2010 · 20 revisions

as3tohaxe

An Actionscript 3 to haXe converter written in Haskell

It’s not a complete translator, and I’m not sure it ever will be. But the idea is to remove
a lot of tedium when converting source code.

Check out my blog for progress updates and more.

Translation Abilities

  • datatypes
  • function signatures
  • “as” casting to “cast()”
  • member variable initialization
  • get and set functions
  • for(;;) loops to while loops
  • package declarations
  • constructor declarations
  • SWF metadata tag to hxml file, comments out other metadata tags

I’ve added a Mac OSX binary compiled with ghc 6.8.3 on Leopard to the repo.

Compiling

To compile the converter you’ll need a copy of ghc and parsec3 installed.

Compile as3tohaxe.hs with ghc --make -O2 as3tohaxe.hs.
Then run as3tohaxe [dir | file].
The output will appear in the directory hx_output.

Clone this wiki locally