| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library backend_ast_nodes; | 5 library backend_ast_nodes; |
| 6 | 6 |
| 7 import '../constants/values.dart' as values; | 7 import '../constants/values.dart' as values; |
| 8 import '../dart_types.dart' as types; | 8 import '../dart_types.dart' as types; |
| 9 import '../elements/elements.dart' as elements; | 9 import '../elements/elements.dart' as elements; |
| 10 import '../tree/tree.dart' as tree; | 10 import '../tree/tree.dart' as tree; |
| (...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1040 }); | 1040 }); |
| 1041 } else if (e is This) { | 1041 } else if (e is This) { |
| 1042 write('this'); | 1042 write('this'); |
| 1043 } else { | 1043 } else { |
| 1044 throw "Unexpected expression: $e"; | 1044 throw "Unexpected expression: $e"; |
| 1045 } | 1045 } |
| 1046 } | 1046 } |
| 1047 | 1047 |
| 1048 void writeParameters(Parameters params) { | 1048 void writeParameters(Parameters params) { |
| 1049 write('('); | 1049 write('('); |
| 1050 bool first = true; | |
| 1051 writeEach(',', params.requiredParameters, (Parameter p) { | 1050 writeEach(',', params.requiredParameters, (Parameter p) { |
| 1052 if (p.type != null) { | 1051 if (p.type != null) { |
| 1053 writeType(p.type); | 1052 writeType(p.type); |
| 1054 write(' '); | 1053 write(' '); |
| 1055 } | 1054 } |
| 1056 write(p.name); | 1055 write(p.name); |
| 1057 if (p.parameters != null) { | 1056 if (p.parameters != null) { |
| 1058 writeParameters(p.parameters); | 1057 writeParameters(p.parameters); |
| 1059 } | 1058 } |
| 1060 }); | 1059 }); |
| (...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1569 class OpenStringChunk { | 1568 class OpenStringChunk { |
| 1570 final StringChunk previous; | 1569 final StringChunk previous; |
| 1571 final tree.StringQuoting quoting; | 1570 final tree.StringQuoting quoting; |
| 1572 num cost; | 1571 num cost; |
| 1573 | 1572 |
| 1574 OpenStringChunk(this.previous, this.quoting, this.cost); | 1573 OpenStringChunk(this.previous, this.quoting, this.cost); |
| 1575 | 1574 |
| 1576 StringChunk end(int endIndex) { | 1575 StringChunk end(int endIndex) { |
| 1577 return new StringChunk(previous, quoting, endIndex); | 1576 return new StringChunk(previous, quoting, endIndex); |
| 1578 } | 1577 } |
| 1579 } | 1578 } |
| OLD | NEW |