Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(634)

Side by Side Diff: runtime/vm/ast_printer.h

Issue 510033002: Print function scopes with indents. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: add newline before first parameter Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/vm/ast_printer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_AST_PRINTER_H_ 5 #ifndef VM_AST_PRINTER_H_
6 #define VM_AST_PRINTER_H_ 6 #define VM_AST_PRINTER_H_
7 7
8 #include "vm/ast.h" 8 #include "vm/ast.h"
9 #include "vm/growable_array.h" 9 #include "vm/growable_array.h"
10 10
(...skipping 11 matching lines...) Expand all
22 #define DECLARE_VISITOR_FUNCTION(BaseName) \ 22 #define DECLARE_VISITOR_FUNCTION(BaseName) \
23 virtual void Visit##BaseName##Node(BaseName##Node* node); 23 virtual void Visit##BaseName##Node(BaseName##Node* node);
24 24
25 FOR_EACH_NODE(DECLARE_VISITOR_FUNCTION) 25 FOR_EACH_NODE(DECLARE_VISITOR_FUNCTION)
26 #undef DECLARE_VISITOR_FUNCTION 26 #undef DECLARE_VISITOR_FUNCTION
27 27
28 private: 28 private:
29 AstPrinter(); 29 AstPrinter();
30 ~AstPrinter(); 30 ~AstPrinter();
31 31
32 static const int kScopeIndent = 2;
33
32 static void PrintLocalScopeVariable(const LocalScope* scope, 34 static void PrintLocalScopeVariable(const LocalScope* scope,
33 LocalVariable* var); 35 LocalVariable* var,
34 static void PrintLocalScope(const LocalScope* scope, int variable_index); 36 int indent = 0);
37 static void PrintLocalScope(const LocalScope* scope,
38 int variable_index,
39 int indent = 0);
35 40
36 void VisitGenericAstNode(AstNode* node); 41 void VisitGenericAstNode(AstNode* node);
37 void VisitGenericLocalNode(AstNode* node, const LocalVariable& local); 42 void VisitGenericLocalNode(AstNode* node, const LocalVariable& local);
38 void VisitGenericFieldNode(AstNode* node, const Field& field); 43 void VisitGenericFieldNode(AstNode* node, const Field& field);
39 44
40 DISALLOW_COPY_AND_ASSIGN(AstPrinter); 45 DISALLOW_COPY_AND_ASSIGN(AstPrinter);
41 }; 46 };
42 47
43 } // namespace dart 48 } // namespace dart
44 49
45 #endif // VM_AST_PRINTER_H_ 50 #endif // VM_AST_PRINTER_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/ast_printer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698