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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@1712 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 93132e1b
......@@ -732,7 +732,7 @@ void AstPrinter::PrintParameters(Scope* scope) {
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 @@ void AstPrinter::VisitProperty(Property* node) {
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());
}
......
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