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

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

Issue 10535054: fix unparsing "for in" statements (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 } 326 }
327 327
328 visitContinueStatement(ContinueStatement node) { 328 visitContinueStatement(ContinueStatement node) {
329 visitGotoStatement(node); 329 visitGotoStatement(node);
330 } 330 }
331 331
332 visitForIn(ForIn node) { 332 visitForIn(ForIn node) {
333 add(node.forToken.value); 333 add(node.forToken.value);
334 sb.add(' ('); 334 sb.add(' (');
335 visit(node.declaredIdentifier); 335 visit(node.declaredIdentifier);
336 sb.add(' ');
336 add(node.inToken.value); 337 add(node.inToken.value);
338 sb.add(' ');
337 visit(node.expression); 339 visit(node.expression);
338 sb.add(') '); 340 sb.add(') ');
339 visit(node.body); 341 visit(node.body);
340 } 342 }
341 343
342 visitLabel(Label node) { 344 visitLabel(Label node) {
343 visit(node.identifier); 345 visit(node.identifier);
344 add(node.colonToken.value); 346 add(node.colonToken.value);
345 } 347 }
346 348
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 sb.add(' '); 437 sb.add(' ');
436 } 438 }
437 visit(node.name); 439 visit(node.name);
438 if (node.typeParameters !== null) { 440 if (node.typeParameters !== null) {
439 visit(node.typeParameters); 441 visit(node.typeParameters);
440 } 442 }
441 visit(node.formals); 443 visit(node.formals);
442 add(node.endToken.value); 444 add(node.endToken.value);
443 } 445 }
444 } 446 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698