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 1575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1586 | 1586 |
1587 | 1587 |
1588 void AstPrinter::VisitAssignment(Assignment* node) { | 1588 void AstPrinter::VisitAssignment(Assignment* node) { |
1589 IndentedScope indent(this, Token::Name(node->op()), node->position()); | 1589 IndentedScope indent(this, Token::Name(node->op()), node->position()); |
1590 Visit(node->target()); | 1590 Visit(node->target()); |
1591 Visit(node->value()); | 1591 Visit(node->value()); |
1592 } | 1592 } |
1593 | 1593 |
1594 | 1594 |
1595 void AstPrinter::VisitYield(Yield* node) { | 1595 void AstPrinter::VisitYield(Yield* node) { |
1596 EmbeddedVector<char, 128> buf; | 1596 IndentedScope indent(this, "YIELD", node->position()); |
1597 SNPrintF(buf, "YIELD (kind %d)", node->yield_kind()); | |
1598 IndentedScope indent(this, buf.start(), node->position()); | |
1599 Visit(node->expression()); | 1597 Visit(node->expression()); |
1600 } | 1598 } |
1601 | 1599 |
1602 | 1600 |
1603 void AstPrinter::VisitThrow(Throw* node) { | 1601 void AstPrinter::VisitThrow(Throw* node) { |
1604 IndentedScope indent(this, "THROW", node->position()); | 1602 IndentedScope indent(this, "THROW", node->position()); |
1605 Visit(node->exception()); | 1603 Visit(node->exception()); |
1606 } | 1604 } |
1607 | 1605 |
1608 | 1606 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1705 | 1703 |
1706 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { | 1704 void AstPrinter::VisitRewritableExpression(RewritableExpression* node) { |
1707 Visit(node->expression()); | 1705 Visit(node->expression()); |
1708 } | 1706 } |
1709 | 1707 |
1710 | 1708 |
1711 #endif // DEBUG | 1709 #endif // DEBUG |
1712 | 1710 |
1713 } // namespace internal | 1711 } // namespace internal |
1714 } // namespace v8 | 1712 } // namespace v8 |
OLD | NEW |