OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 import 'dart:io'; | 5 import 'dart:io'; |
6 | 6 |
7 import 'dart:isolate'; | 7 import 'dart:isolate'; |
8 | 8 |
9 import 'package:yaml/yaml.dart' show loadYaml; | 9 import 'package:yaml/yaml.dart' show loadYaml; |
10 | 10 |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 98 |
99 case "#uri": | 99 case "#uri": |
100 parameters.add("Uri uri_"); | 100 parameters.add("Uri uri_"); |
101 conversions.add("String uri = relativizeUri(uri_);"); | 101 conversions.add("String uri = relativizeUri(uri_);"); |
102 arguments.add("'uri': uri_"); | 102 arguments.add("'uri': uri_"); |
103 break; | 103 break; |
104 | 104 |
105 case "#uri2": | 105 case "#uri2": |
106 parameters.add("Uri uri2_"); | 106 parameters.add("Uri uri2_"); |
107 conversions.add("String uri2 = relativizeUri(uri2_);"); | 107 conversions.add("String uri2 = relativizeUri(uri2_);"); |
108 arguments.add("'uri': uri2_"); | 108 arguments.add("'uri2': uri2_"); |
109 break; | 109 break; |
110 | 110 |
111 default: | 111 default: |
112 throw "Unhandled placeholder in template: ${match[0]}"; | 112 throw "Unhandled placeholder in template: ${match[0]}"; |
113 } | 113 } |
114 } | 114 } |
115 | 115 |
116 String interpolate(String name, String text) { | 116 String interpolate(String name, String text) { |
117 return "$name: " | 117 return "$name: " |
118 "\"\"\"${text.replaceAll(r'$', r'\$').replaceAll('#', '\$')}\"\"\""; | 118 "\"\"\"${text.replaceAll(r'$', r'\$').replaceAll('#', '\$')}\"\"\""; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 | 174 |
175 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. | 175 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE. |
176 Message _withArguments$name(${parameters.join(', ')}) { | 176 Message _withArguments$name(${parameters.join(', ')}) { |
177 ${conversions.join('\n ')} | 177 ${conversions.join('\n ')} |
178 return new Message( | 178 return new Message( |
179 code$name, | 179 code$name, |
180 ${messageArguments.join(', ')}); | 180 ${messageArguments.join(', ')}); |
181 } | 181 } |
182 """; | 182 """; |
183 } | 183 } |
OLD | NEW |