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

Side by Side Diff: pkg/compiler/lib/src/tree/unparser.dart

Issue 912483005: Fix yield for dart2dart minified. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 part of tree; 5 part of tree;
6 6
7 String unparse(Node node, {minify: true}) { 7 String unparse(Node node, {minify: true}) {
8 Unparser unparser = new Unparser(minify: minify); 8 Unparser unparser = new Unparser(minify: minify);
9 unparser.unparse(node); 9 unparser.unparse(node);
10 return unparser.result; 10 return unparser.result;
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 if (node.beginToken.stringValue == '=>') space(); 401 if (node.beginToken.stringValue == '=>') space();
402 visit(node.expression); 402 visit(node.expression);
403 if (node.endToken != null) write(node.endToken.value); 403 if (node.endToken != null) write(node.endToken.value);
404 } 404 }
405 405
406 visitYield(Yield node) { 406 visitYield(Yield node) {
407 write(node.yieldToken.value); 407 write(node.yieldToken.value);
408 if (node.starToken != null) { 408 if (node.starToken != null) {
409 write(node.starToken.value); 409 write(node.starToken.value);
410 } 410 }
411 space(); 411 write(' ');
412 visit(node.expression); 412 visit(node.expression);
413 write(node.endToken.value); 413 write(node.endToken.value);
414 } 414 }
415 415
416 416
417 unparseSendReceiver(Send node, {bool spacesNeeded: false}) { 417 unparseSendReceiver(Send node, {bool spacesNeeded: false}) {
418 if (node.receiver == null) return; 418 if (node.receiver == null) return;
419 visit(node.receiver); 419 visit(node.receiver);
420 CascadeReceiver asCascadeReceiver = node.receiver.asCascadeReceiver(); 420 CascadeReceiver asCascadeReceiver = node.receiver.asCascadeReceiver();
421 if (asCascadeReceiver != null) { 421 if (asCascadeReceiver != null) {
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 } 840 }
841 841
842 visitStatement(Statement node) { 842 visitStatement(Statement node) {
843 throw 'internal error'; // Should not be called. 843 throw 'internal error'; // Should not be called.
844 } 844 }
845 845
846 visitStringNode(StringNode node) { 846 visitStringNode(StringNode node) {
847 throw 'internal error'; // Should not be called. 847 throw 'internal error'; // Should not be called.
848 } 848 }
849 } 849 }
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