Clean up the AST pretty printer by adding some missing newlines and

indentation.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2105 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b918e64d
...@@ -693,10 +693,10 @@ void AstPrinter::PrintLabelsIndented(const char* info, ZoneStringList* labels) { ...@@ -693,10 +693,10 @@ void AstPrinter::PrintLabelsIndented(const char* info, ZoneStringList* labels) {
Print(" "); Print(" ");
} }
PrintLabels(labels); PrintLabels(labels);
Print("\n");
} else if (info != NULL) { } else if (info != NULL) {
PrintIndented(info); PrintIndented(info);
} }
Print("\n");
} }
...@@ -918,9 +918,8 @@ void AstPrinter::VisitLiteral(Literal* node) { ...@@ -918,9 +918,8 @@ void AstPrinter::VisitLiteral(Literal* node) {
void AstPrinter::VisitRegExpLiteral(RegExpLiteral* node) { void AstPrinter::VisitRegExpLiteral(RegExpLiteral* node) {
IndentedScope indent("REGEXP LITERAL"); IndentedScope indent("REGEXP LITERAL");
PrintLiteral(node->pattern(), false); PrintLiteralIndented("PATTERN", node->pattern(), false);
Print(","); PrintLiteralIndented("FLAGS", node->flags(), false);
PrintLiteral(node->flags(), false);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment