Hi. On Mon, Sep 16, 2013 at 02:47:10PM -0700, Ivan P. wrote: > Yes, I know, but this is what I'm asking about - does anyone could get it > out from the deep inside of v8 and make use of it? I might be doing something related that involves me having to inspect the AST.
> In other worlds, what needs to be done to instantiate v8's parser object, > run parsing and achieve AST? Any examples of the code? What I just did was to hook into MakeCode of compiler.cc. I put my own AST traversal class in this chain, somewhere before GenerateCode: return Rewriter::Rewrite(info) && Scope::Analyze(info) && GenerateCode(info); As there doesn't seem to be a generic AST traversal class, I just copied the prettyprinter and replaced the printing logic with my own. HTH, Tobi -- -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
