jiyinyiyong jiyinyiyong - 1 year ago 136
Javascript Question

What is JavaScript AST, how to play with it?

Abstract Syntax Tree.. I always heard that compile to SpiderMonkey AST on Github.

So, is that a actual standard of JS syntax tree? And there's V8, is V8 using the same kind of AST?

How can I play with that?

Answer Source

SpiderMonkey offers the parser api. This is probably the easiest way to get your hands on the syntax objects.

There's also open js-js parsers like Esprima (which is ECMAScript, really, but it's right up the alley)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download