| 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 1562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1573 | 1573 |
| 1574 | 1574 |
| 1575 void AstPrinter::VisitAssignment(Assignment* node) { | 1575 void AstPrinter::VisitAssignment(Assignment* node) { |
| 1576 IndentedScope indent(this, Token::Name(node->op()), node->position()); | 1576 IndentedScope indent(this, Token::Name(node->op()), node->position()); |
| 1577 Visit(node->target()); | 1577 Visit(node->target()); |
| 1578 Visit(node->value()); | 1578 Visit(node->value()); |
| 1579 } | 1579 } |
| 1580 | 1580 |
| 1581 | 1581 |
| 1582 void AstPrinter::VisitYield(Yield* node) { | 1582 void AstPrinter::VisitYield(Yield* node) { |
| 1583 IndentedScope indent(this, "YIELD", node->position()); | 1583 EmbeddedVector<char, 128> buf; |
| 1584 SNPrintF(buf, "YIELD (kind %d)", node->yield_kind()); |
| 1585 IndentedScope indent(this, buf.start(), node->position()); |
| 1584 Visit(node->expression()); | 1586 Visit(node->expression()); |
| 1585 } | 1587 } |
| 1586 | 1588 |
| 1587 | 1589 |
| 1588 void AstPrinter::VisitThrow(Throw* node) { | 1590 void AstPrinter::VisitThrow(Throw* node) { |
| 1589 IndentedScope indent(this, "THROW", node->position()); | 1591 IndentedScope indent(this, "THROW", node->position()); |
| 1590 Visit(node->exception()); | 1592 Visit(node->exception()); |
| 1591 } | 1593 } |
| 1592 | 1594 |
| 1593 | 1595 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1689 void AstPrinter::VisitRewritableAssignmentExpression( | 1691 void AstPrinter::VisitRewritableAssignmentExpression( |
| 1690 RewritableAssignmentExpression* node) { | 1692 RewritableAssignmentExpression* node) { |
| 1691 Visit(node->expression()); | 1693 Visit(node->expression()); |
| 1692 } | 1694 } |
| 1693 | 1695 |
| 1694 | 1696 |
| 1695 #endif // DEBUG | 1697 #endif // DEBUG |
| 1696 | 1698 |
| 1697 } // namespace internal | 1699 } // namespace internal |
| 1698 } // namespace v8 | 1700 } // namespace v8 |
| OLD | NEW |