Author: [email protected]
Date: Wed Apr 15 00:41:04 2009
New Revision: 1712

Modified:
    branches/bleeding_edge/src/prettyprinter.cc

Log:
A few small changes to --print-ast behavior:

* Remove two horizontal spaces per indent
* Don't print an extra space between "VAR" and "(" for parameters
* Call the name on named property accesses "NAME"

Review URL: http://codereview.chromium.org/67124

Modified: branches/bleeding_edge/src/prettyprinter.cc
==============================================================================
--- branches/bleeding_edge/src/prettyprinter.cc (original)
+++ branches/bleeding_edge/src/prettyprinter.cc Wed Apr 15 00:41:04 2009
@@ -646,7 +646,7 @@

  void AstPrinter::PrintIndented(const char* txt) {
    for (int i = 0; i < indent_; i++) {
-    Print(".   ");
+    Print(". ");
    }
    Print(txt);
  }
@@ -732,7 +732,7 @@
    if (scope->num_parameters() > 0) {
      IndentedScope indent("PARAMS");
      for (int i = 0; i < scope->num_parameters(); i++) {
-      PrintLiteralWithModeIndented("VAR ", scope->parameter(i),
+      PrintLiteralWithModeIndented("VAR", scope->parameter(i),
                                     scope->parameter(i)->name(),
                                     scope->parameter(i)->type());
      }
@@ -1024,7 +1024,7 @@
    Visit(node->obj());
    Literal* literal = node->key()->AsLiteral();
    if (literal != NULL && literal->handle()->IsSymbol()) {
-    PrintLiteralIndented("LITERAL", literal->handle(), false);
+    PrintLiteralIndented("NAME", literal->handle(), false);
    } else {
      PrintIndentedVisit("KEY", node->key());
    }

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

Reply via email to