| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/ast/prettyprinter.h" | 5 #include "src/ast/prettyprinter.h" |
| 6 | 6 |
| 7 #include <stdarg.h> | 7 #include <stdarg.h> |
| 8 | 8 |
| 9 #include "src/ast/ast-value-factory.h" | 9 #include "src/ast/ast-value-factory.h" |
| 10 #include "src/ast/scopes.h" | 10 #include "src/ast/scopes.h" |
| (...skipping 1591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1602 | 1602 |
| 1603 | 1603 |
| 1604 void AstPrinter::VisitAssignment(Assignment* node) { | 1604 void AstPrinter::VisitAssignment(Assignment* node) { |
| 1605 IndentedScope indent(this, Token::Name(node->op()), node->position()); | 1605 IndentedScope indent(this, Token::Name(node->op()), node->position()); |
| 1606 Visit(node->target()); | 1606 Visit(node->target()); |
| 1607 Visit(node->value()); | 1607 Visit(node->value()); |
| 1608 } | 1608 } |
| 1609 | 1609 |
| 1610 | 1610 |
| 1611 void AstPrinter::VisitYield(Yield* node) { | 1611 void AstPrinter::VisitYield(Yield* node) { |
| 1612 IndentedScope indent(this, "YIELD", node->position()); | 1612 EmbeddedVector<char, 128> buf; |
| 1613 SNPrintF(buf, "YIELD id %d", node->yield_id()); |
| 1614 IndentedScope indent(this, buf.start(), node->position()); |
| 1613 Visit(node->expression()); | 1615 Visit(node->expression()); |
| 1614 } | 1616 } |
| 1615 | 1617 |
| 1616 | 1618 |
| 1617 void AstPrinter::VisitThrow(Throw* node) { | 1619 void AstPrinter::VisitThrow(Throw* node) { |
| 1618 IndentedScope indent(this, "THROW", node->position()); | 1620 IndentedScope indent(this, "THROW", node->position()); |
| 1619 Visit(node->exception()); | 1621 Visit(node->exception()); |
| 1620 } | 1622 } |
| 1621 | 1623 |
| 1622 | 1624 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1719 | 1721 |
| 1720 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { | 1722 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { |
| 1721 Visit(node->expression()); | 1723 Visit(node->expression()); |
| 1722 } | 1724 } |
| 1723 | 1725 |
| 1724 | 1726 |
| 1725 #endif // DEBUG | 1727 #endif // DEBUG |
| 1726 | 1728 |
| 1727 } // namespace internal | 1729 } // namespace internal |
| 1728 } // namespace v8 | 1730 } // namespace v8 |
| OLD | NEW |