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 #ifndef V8_PRETTYPRINTER_H_ | 5 #ifndef V8_PRETTYPRINTER_H_ |
6 #define V8_PRETTYPRINTER_H_ | 6 #define V8_PRETTYPRINTER_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/ast.h" | 9 #include "src/ast.h" |
10 | 10 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 virtual void PrintStatements(ZoneList<Statement*>* statements); | 46 virtual void PrintStatements(ZoneList<Statement*>* statements); |
47 void PrintLabels(ZoneList<const AstRawString*>* labels); | 47 void PrintLabels(ZoneList<const AstRawString*>* labels); |
48 virtual void PrintArguments(ZoneList<Expression*>* arguments); | 48 virtual void PrintArguments(ZoneList<Expression*>* arguments); |
49 void PrintLiteral(Handle<Object> value, bool quote); | 49 void PrintLiteral(Handle<Object> value, bool quote); |
50 void PrintLiteral(const AstRawString* value, bool quote); | 50 void PrintLiteral(const AstRawString* value, bool quote); |
51 void PrintParameters(Scope* scope); | 51 void PrintParameters(Scope* scope); |
52 void PrintDeclarations(ZoneList<Declaration*>* declarations); | 52 void PrintDeclarations(ZoneList<Declaration*>* declarations); |
53 void PrintFunctionLiteral(FunctionLiteral* function); | 53 void PrintFunctionLiteral(FunctionLiteral* function); |
54 void PrintCaseClause(CaseClause* clause); | 54 void PrintCaseClause(CaseClause* clause); |
| 55 void PrintObjectLiteralProperty(ObjectLiteralProperty* property); |
55 | 56 |
56 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); | 57 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); |
57 }; | 58 }; |
58 | 59 |
59 | 60 |
60 // Prints the AST structure | 61 // Prints the AST structure |
61 class AstPrinter: public PrettyPrinter { | 62 class AstPrinter: public PrettyPrinter { |
62 public: | 63 public: |
63 explicit AstPrinter(Zone* zone); | 64 explicit AstPrinter(Zone* zone); |
64 virtual ~AstPrinter(); | 65 virtual ~AstPrinter(); |
(...skipping 25 matching lines...) Expand all Loading... |
90 void dec_indent() { indent_--; } | 91 void dec_indent() { indent_--; } |
91 | 92 |
92 int indent_; | 93 int indent_; |
93 }; | 94 }; |
94 | 95 |
95 #endif // DEBUG | 96 #endif // DEBUG |
96 | 97 |
97 } } // namespace v8::internal | 98 } } // namespace v8::internal |
98 | 99 |
99 #endif // V8_PRETTYPRINTER_H_ | 100 #endif // V8_PRETTYPRINTER_H_ |
OLD | NEW |