Yeah, I saw this when I was studying the GCC code. Sad to say I actually understand their parser and object model now. :)
Looking at the code, they are just about to implement a new type inference system as well, in the EXTERNC compiler I am writing, the evaluate() method will soon take a ITypeRegistry which is the new type inference. I know two years ago in my ignorance, I poo pooed the compiler but now that I actually understand the source, it really is one of the best Javascript compilers around and whether people agree with how it does advanced optimizations, the parser itself is rock solid and totally being maintained and advanced. If this whole AS > JS thing takes off, it would also be worth changing all the JSDocEMitter stuff to use their JSDocInfoBuilder class, it is a builder that knows the exact jsdoc language for it's compiler and would make the code 100% more flexible. So Erik, are you saying that since it soon will fully support ES6, the FalconJX compiler should be able to emit ES6? Mike On Mon, Jun 15, 2015 at 4:38 AM, Erik de Bruin <e...@ixsoftware.nl> wrote: > Hi, > > While I'm sorry to say that I'm still knee deep in a work project and won't > have time to contribute for some time yet, this weekend I ran across > something that might be helpful for the project: > > The Closure Compiler has made large improvements over the past few > releases. One area is ECMASript 6 (JS.Next; Harmony) support. The GCC is > now able to take nearly all ES6 syntax and transpile it to ES3/ES5 before > optimizing it. > > Most interesting of the new JavaScript features is native support for > 'class' and 'extends'. Another is modules: 'import' and 'export'. > > Another interesting development is that the GCC is getting support for > TypeScript style type annotation. > > Taken together this means that the GCC is increasingly capable of parsing > JavaScript that eerily looks like Actionscript: > > <code> > import Hello from './Hello'; > > export default class ByeBye extends Hello { > > constructor () { > super(); > } > > sayHello(value:string):string { > return super('World') + ' again (by: ' + value + ')'; > } > > } > </code> > > I've uploaded [1] an example 'project' - including all features described > above, with latest GCC and ant build file with the proper GCC arguments - > to my personal Apache area [1] for you viewing and playing pleasure. > > Have fun! > > EdB > > 1: http://s.apache.org/6SZ > > > > -- > Ix Multimedia Software > > Jan Luykenstraat 27 > 3521 VB Utrecht > > T. 06-51952295 > I. www.ixsoftware.nl >