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

Side by Side Diff: frog/leg/tree/unparser.dart

Issue 9863037: Generate prettier loops. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Adressed review comments. A few fixes. Created 8 years, 8 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 } 280 }
281 281
282 visitBreakStatement(BreakStatement node) { 282 visitBreakStatement(BreakStatement node) {
283 visitGotoStatement(node); 283 visitGotoStatement(node);
284 } 284 }
285 285
286 visitContinueStatement(ContinueStatement node) { 286 visitContinueStatement(ContinueStatement node) {
287 visitGotoStatement(node); 287 visitGotoStatement(node);
288 } 288 }
289 289
290 visitForInStatement(ForInStatement node) { 290 visitForIn(ForIn node) {
291 add(node.forToken.value); 291 add(node.forToken.value);
292 sb.add(' ('); 292 sb.add(' (');
293 visit(node.declaredIdentifier); 293 visit(node.declaredIdentifier);
294 add(node.inToken.value); 294 add(node.inToken.value);
295 visit(node.expression); 295 visit(node.expression);
296 sb.add(') '); 296 sb.add(') ');
297 visit(node.body); 297 visit(node.body);
298 } 298 }
299 299
300 visitLabeledStatement(LabeledStatement node) { 300 visitLabeledStatement(LabeledStatement node) {
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 sb.add(' '); 390 sb.add(' ');
391 } 391 }
392 visit(node.name); 392 visit(node.name);
393 if (node.typeParameters !== null) { 393 if (node.typeParameters !== null) {
394 visit(node.typeParameters); 394 visit(node.typeParameters);
395 } 395 }
396 visit(node.formals); 396 visit(node.formals);
397 add(node.endToken.value); 397 add(node.endToken.value);
398 } 398 }
399 } 399 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698