Awesome, Mike! Now you've gone and created a reason for me to waste a considerable amount of the holidays on getting to know this code and "finish" the conversion table ;-)
Have a very merry Xmas, EdB On Sat, Dec 22, 2012 at 1:00 AM, Michael Schmalle <apa...@teotigraphix.com> wrote: > > Hi, > > Well I busted my A$$ before I hit vacation, Erik you can look at > TestGoogEmiter and the JSGoogEmitter to see the black majik I whipped up > today. > > Basically with the NEW FalconJx (BTW I'm starting to like this name now, the > "x" with Fle"X"), cross compiler is doing this all. I know there are missing > "this, super" etc etc etc, but this things is working! > > And all that little stuff is easy to add now. Like I said in my commits, I > have package down to expressions working and it creates valid AS3 source > code from the AST. > > Now it's just work filling in all the holes you have listed in the as->js > conversion table. > > Frank, I'm sure you could look at my code and take the JSGoogEmitter as an > example and create a prototype JSRequireEmitter with the pattern I have > setup. > > I'm still refactoring but it's looking good. > > Peace and happy new year, > Mike > > > ---------------------------------------------------------------------------- > AS Code > > package com.example.components > { > > import org.apache.flex.html.staticControls.TextButton; > > public class MyTextButton extends TextButton > { > public function MyTextButton() > { > if (foo() != 42) { > bar(); > } > } > > private var _privateVar:String = "do "; > > public var publicProperty:Number = 100; > > public function myFunction(value: String): String > { > return "Don't " + _privateVar + value; > } > } > } > > > > ---------------------------------------------------------------------------- > JS Code > > > > goog.provide('com.example.components.MyTextButton'); > > goog.require('org.apache.flex.html.staticControls.TextButton'); > > /** > * @constructor > */ > com.example.components.MyTextButton = function() { > if (foo() != 42) { > bar(); > } > } > > /** > * @type {String} > */ > com.example.components.MyTextButton.prototype._privateVar = "do "; > > /** > * @type {Number} > */ > com.example.components.MyTextButton.prototype.publicProperty = 100; > > /** > * @this {com.example.components.MyTextButton} > * @param {String} value > * @return {String} > */ > com.example.components.MyTextButton = function(value:String) { > return "Don't " + _privateVar + value; > } > > > > -- > Michael Schmalle - Teoti Graphix, LLC > http://www.teotigraphix.com > http://blog.teotigraphix.com > -- Ix Multimedia Software Jan Luykenstraat 27 3521 VB Utrecht T. 06-51952295 I. www.ixsoftware.nl