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

Side by Side Diff: lib/compiler/implementation/tree_validator.dart

Issue 10456080: Remove printDebugInfo from Unparser (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: another PrettyPrinter interface Created 8 years, 6 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
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 class TreeValidatorTask extends CompilerTask { 5 class TreeValidatorTask extends CompilerTask {
6 TreeValidatorTask(Compiler compiler) : super(compiler); 6 TreeValidatorTask(Compiler compiler) : super(compiler);
7 7
8 void validate(Node tree) { 8 void validate(Node tree) {
9 assert(check(tree)); 9 assert(check(tree));
10 } 10 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 } 54 }
55 } 55 }
56 56
57 class InvalidNodeError { 57 class InvalidNodeError {
58 final Node node; 58 final Node node;
59 final String message; 59 final String message;
60 InvalidNodeError(this.node, [this.message]); 60 InvalidNodeError(this.node, [this.message]);
61 61
62 toString() { 62 toString() {
63 String nodeString = new Unparser(true).unparse(node); 63 String nodeString = new Unparser().unparse(node);
ahe 2012/06/08 13:05:18 I think this should be node.toDebugString().
Roman 2012/06/08 13:18:51 Done.
64 String result = 'invalid node: $nodeString'; 64 String result = 'invalid node: $nodeString';
65 if (message !== null) result = '$result ($message)'; 65 if (message !== null) result = '$result ($message)';
66 return result; 66 return result;
67 } 67 }
68 } 68 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/tree/unparser.dart ('k') | lib/compiler/implementation/unparse_validator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698