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

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

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

Powered by Google App Engine
This is Rietveld 408576698