Initial implementation of printing the AST as a JSON string. This
authorkmillikin@chromium.org <kmillikin@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 12 Oct 2009 15:06:28 +0000 (15:06 +0000)
committerkmillikin@chromium.org <kmillikin@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 12 Oct 2009 15:06:28 +0000 (15:06 +0000)
commita563800b4c0afe265a992498884e7c963ddc1a95
treee672793d7f197a069eccf4af58482b227e3494cc
parentb6a215700ed9ed91a408f0a60e3ac87688560b4f
Initial implementation of printing the AST as a JSON string.  This
implementation is not yet complete (it prints only the node name for
some AST constructs) and does not serialize everything needed to
reconstitute the AST.

It is motivated by a desire to prototype source-to-source
transformations in JavaScript itself (or anything else that can grok
JSON), but it should have other uses too.

Feedback is welcome.
Review URL: http://codereview.chromium.org/131101

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3051 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/ast.cc
src/ast.h
src/codegen.cc
src/flag-definitions.h
src/prettyprinter.cc
src/prettyprinter.h