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

Side by Side Diff: lib/compiler/implementation/tree/unparser.dart

Issue 10389113: Make a single labeled statement hold all its labels. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 Unparser implements Visitor { 5 class Unparser implements Visitor {
6 StringBuffer sb; 6 StringBuffer sb;
7 final bool printDebugInfo; 7 final bool printDebugInfo;
8 8
9 Unparser([this.printDebugInfo = false]); 9 Unparser([this.printDebugInfo = false]);
10 10
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 sb.add(') '); 306 sb.add(') ');
307 visit(node.body); 307 visit(node.body);
308 } 308 }
309 309
310 visitLabel(Label node) { 310 visitLabel(Label node) {
311 visit(node.identifier); 311 visit(node.identifier);
312 add(node.colonToken.value); 312 add(node.colonToken.value);
313 } 313 }
314 314
315 visitLabeledStatement(LabeledStatement node) { 315 visitLabeledStatement(LabeledStatement node) {
316 visit(node.label); 316 visit(node.labels);
317 sb.add(' ');
318 visit(node.statement); 317 visit(node.statement);
319 } 318 }
320 319
321 visitLiteralMap(LiteralMap node) { 320 visitLiteralMap(LiteralMap node) {
322 // TODO(ahe): handle 'const'. 321 // TODO(ahe): handle 'const'.
323 if (node.typeArguments !== null) visit(node.typeArguments); 322 if (node.typeArguments !== null) visit(node.typeArguments);
324 visit(node.entries); 323 visit(node.entries);
325 } 324 }
326 325
327 visitLiteralMapEntry(LiteralMapEntry node) { 326 visitLiteralMapEntry(LiteralMapEntry node) {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 sb.add(' '); 403 sb.add(' ');
405 } 404 }
406 visit(node.name); 405 visit(node.name);
407 if (node.typeParameters !== null) { 406 if (node.typeParameters !== null) {
408 visit(node.typeParameters); 407 visit(node.typeParameters);
409 } 408 }
410 visit(node.formals); 409 visit(node.formals);
411 add(node.endToken.value); 410 add(node.endToken.value);
412 } 411 }
413 } 412 }
OLDNEW
« lib/compiler/implementation/resolver.dart ('K') | « lib/compiler/implementation/tree/nodes.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698