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

Side by Side Diff: lib/src/js/printer.dart

Issue 1243503007: fixes #221, initial sync*, async, async* implementation (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « lib/src/js/nodes.dart ('k') | lib/src/js/template.dart » ('j') | 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 js_ast; 5 part of js_ast;
6 6
7 7
8 class JavaScriptPrintingOptions { 8 class JavaScriptPrintingOptions {
9 final bool shouldCompressOutput; 9 final bool shouldCompressOutput;
10 final bool minifyLocalVariables; 10 final bool minifyLocalVariables;
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after
774 default: 774 default:
775 out(op); 775 out(op);
776 } 776 }
777 visitNestedExpression(unary.argument, unary.precedenceLevel, 777 visitNestedExpression(unary.argument, unary.precedenceLevel,
778 newInForInit: inForInit, newAtStatementBegin: false); 778 newInForInit: inForInit, newAtStatementBegin: false);
779 } 779 }
780 780
781 visitSpread(Spread unary) => visitPrefix(unary); 781 visitSpread(Spread unary) => visitPrefix(unary);
782 782
783 visitYield(Yield yield) { 783 visitYield(Yield yield) {
784 out(yield.star ? "yield* " : "yield "); 784 out(yield.star ? "yield*" : "yield");
785 if (yield.value == null) return;
786 out(" ");
785 visitNestedExpression(yield.value, yield.precedenceLevel, 787 visitNestedExpression(yield.value, yield.precedenceLevel,
786 newInForInit: inForInit, newAtStatementBegin: false); 788 newInForInit: inForInit, newAtStatementBegin: false);
787 } 789 }
788 790
789 visitPostfix(Postfix postfix) { 791 visitPostfix(Postfix postfix) {
790 visitNestedExpression(postfix.argument, LEFT_HAND_SIDE, 792 visitNestedExpression(postfix.argument, LEFT_HAND_SIDE,
791 newInForInit: inForInit, 793 newInForInit: inForInit,
792 newAtStatementBegin: atStatementBegin); 794 newAtStatementBegin: atStatementBegin);
793 out(postfix.op); 795 out(postfix.op);
794 } 796 }
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
1476 declare(node.name); 1478 declare(node.name);
1477 node.function.accept(this); 1479 node.function.accept(this);
1478 } 1480 }
1479 1481
1480 visitClassExpression(ClassExpression node) { 1482 visitClassExpression(ClassExpression node) {
1481 declare(node.name); 1483 declare(node.name);
1482 if (node.heritage != null) node.heritage.accept(this); 1484 if (node.heritage != null) node.heritage.accept(this);
1483 for (Method element in node.methods) element.accept(this); 1485 for (Method element in node.methods) element.accept(this);
1484 } 1486 }
1485 } 1487 }
OLDNEW
« no previous file with comments | « lib/src/js/nodes.dart ('k') | lib/src/js/template.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698