Hi,

I'm currently working on Frank's version of the AMD emitter. Now that he has got his source code updated in the GIT project, I had some things to go off of.

Currently I have the following being produced for his class A. There are a lot of edge cases and other things to be ironed out but, it looks like the heavy lifting was done back when this framework was written. ;-)

I'm happy with the success of simplicity outputting multiple JavaScript targets. Who knows, we could see another target eventually, we can have options.

I have about 1/3 more to go to get this output looking verbatim of that in his Jangaroo production.


define(["exports", "AS3"], function($exports, AS3) {
        "use strict";
        AS3.compilationUnit($exports, function($primaryDeclaration){
                function A(msg) {
                        this.msg = msg;
                }
                $primaryDeclaration(AS3.class_({
                        package_: "com.acme",
                        class_: "A",
                        members: {
                                constructor: A,
                                _msg$1:{
                                        value:0,
                                        writable:true
                                },
                                msg:{
                                        get: function msg$get() {
                                                return String(this._msg$1);
                                        },
                                        set: function msg$set(value) {
                                                this._msg$1 = parseInt(value, 
10);
                                        }
                                },
                                secret$1:function secret(n) {
                                        return msg + n;
                                },
                                foo:function foo(x) {
                                        return this.secret(A.bar(x));
                                },
                                baz:function baz() {
                                        var tmp = this.secret;
                                        return tmp("-bound");
                                }
                        }
                }));
        });
});


Looks like we will have two prototype emitters working decently by the end of the week.


Mike


--
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com

Reply via email to