| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |