Hi,

I don't think there are any current work on exposing the AST to external
tools, that is debuggers and the like. The internal AST has all kinds of
internal annotations, so it is not feasible for exposing directly. It might
be possible to experiment with serializing the AST as JSON for the
AfterCompile event. The pretty printer has some support for printing the AST
in JSON format, see class JsonAstBuilder in src/prettyprinter.*. This was
intiially added in http://codereview.chromium.org/131101.

There is work in progress on the parser in V8, which you can follow in the
tree, but that focuses mainly on making a better pre-parsing abilities.

Regards,
Søren

On Fri, Oct 22, 2010 at 06:43, mcot <[email protected]> wrote:

> I am looking to integrate with the parser or abstract syntax tree
> representation of some JS code.  Does anyone know if there any plans
> to make something like spidermonkey has:
>
> https://developer.mozilla.org/en/SpiderMonkey/Parser_API
>
> AST support through the debugger protocol would be the preferable way
> maybe as part of the AfterCompile event.
>
> --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
>

-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users

Reply via email to