A patch is available for the V8 engine which enables: JSON.AST.parse(|js source code|) -> |AST JsonML String|
At: http://code.google.com/p/ecmascript-ast/ On Sat, Oct 17, 2009 at 2:47 PM, Kevin Curtis <[email protected]> wrote: > DSH - very interesting. > > Is the idea eventually (for say ES6) to have something like like the > Python ast module, where the AST (in JsonML format) can be executed? > Or just js source to source roundtripping. e.g js -> JsonML AST -> js > > I'm working on an experiment utilizing the V8 engine - using the JSON > object as a (temporary) namespace: > > var source = "var x = 3; if (x > 2) print('hello world');"; > > var astStr = JSON.AST.parse(source); // returns the AST in a JsonML string > > JSON.AST.execute(astStr); > >> hello world > _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

