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

Side by Side Diff: pkg/kernel/lib/text/ast_to_text.dart

Issue 2701313006: Fix ast_to_text output to pass tests. (Closed)
Patch Set: Created 3 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
« 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 library kernel.ast_to_text; 4 library kernel.ast_to_text;
5 5
6 import '../ast.dart'; 6 import '../ast.dart';
7 import '../import_table.dart'; 7 import '../import_table.dart';
8 import '../type_propagation/type_propagation.dart'; 8 import '../type_propagation/type_propagation.dart';
9 9
10 class Namer<T> { 10 class Namer<T> {
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 endLine(); 492 endLine();
493 ++indentation; 493 ++indentation;
494 writeIndentation(); 494 writeIndentation();
495 writeComma(':'); 495 writeComma(':');
496 writeList(initializers, writeNode); 496 writeList(initializers, writeNode);
497 --indentation; 497 --indentation;
498 } 498 }
499 if (function.asyncMarker != AsyncMarker.Sync) { 499 if (function.asyncMarker != AsyncMarker.Sync) {
500 writeSpaced(getAsyncMarkerKeyword(function.asyncMarker)); 500 writeSpaced(getAsyncMarkerKeyword(function.asyncMarker));
501 } 501 }
502 if (function.dartAsyncMarker != AsyncMarker.Sync) { 502 if (function.dartAsyncMarker != AsyncMarker.Sync &&
503 function.dartAsyncMarker != function.asyncMarker) {
503 writeSpaced("/* originally"); 504 writeSpaced("/* originally");
504 writeSpaced(getAsyncMarkerKeyword(function.dartAsyncMarker)); 505 writeSpaced(getAsyncMarkerKeyword(function.dartAsyncMarker));
505 writeSpaced("*/"); 506 writeSpaced("*/");
506 } 507 }
507 if (function.body != null) { 508 if (function.body != null) {
508 writeFunctionBody(function.body, terminateLine: terminateLine); 509 writeFunctionBody(function.body, terminateLine: terminateLine);
509 } else if (terminateLine) { 510 } else if (terminateLine) {
510 endLine(';'); 511 endLine(';');
511 } 512 }
512 } 513 }
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
1591 } 1592 }
1592 throw 'illegal ProcedureKind: $kind'; 1593 throw 'illegal ProcedureKind: $kind';
1593 } 1594 }
1594 1595
1595 class ExpressionPrinter { 1596 class ExpressionPrinter {
1596 final Printer writeer; 1597 final Printer writeer;
1597 final int minimumPrecedence; 1598 final int minimumPrecedence;
1598 1599
1599 ExpressionPrinter(this.writeer, this.minimumPrecedence); 1600 ExpressionPrinter(this.writeer, this.minimumPrecedence);
1600 } 1601 }
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