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

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

Issue 11233061: Revert "Parts must start with 'part of'" and "Attempt to fix VM build" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 1 month 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 part of dart2js;
6
7 class TreeValidatorTask extends CompilerTask { 5 class TreeValidatorTask extends CompilerTask {
8 TreeValidatorTask(Compiler compiler) : super(compiler); 6 TreeValidatorTask(Compiler compiler) : super(compiler);
9 7
10 void validate(Node tree) { 8 void validate(Node tree) {
11 assert(check(tree)); 9 assert(check(tree));
12 } 10 }
13 11
14 bool check(Node tree) { 12 bool check(Node tree) {
15 List<InvalidNodeError> errors = []; 13 List<InvalidNodeError> errors = [];
16 void report(node, message) { 14 void report(node, message) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 final String message; 67 final String message;
70 InvalidNodeError(this.node, [this.message]); 68 InvalidNodeError(this.node, [this.message]);
71 69
72 toString() { 70 toString() {
73 String nodeString = node.toDebugString(); 71 String nodeString = node.toDebugString();
74 String result = 'invalid node: $nodeString'; 72 String result = 'invalid node: $nodeString';
75 if (message != null) result = '$result ($message)'; 73 if (message != null) result = '$result ($message)';
76 return result; 74 return result;
77 } 75 }
78 } 76 }
OLDNEW
« no previous file with comments | « dart/lib/compiler/implementation/tree/visitors.dart ('k') | dart/lib/compiler/implementation/typechecker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698