| OLD | NEW |
| 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 #library("builtin"); | 5 #library("builtin"); |
| 6 | 6 |
| 7 void print(arg) { | 7 void print(arg) { |
| 8 _Logger._printString(arg.toString()); | 8 _Logger._printString(arg.toString()); |
| 9 } | 9 } |
| 10 | 10 |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 var wrong = 'package://$path'; | 126 var wrong = 'package://$path'; |
| 127 | 127 |
| 128 throw "URIs using the 'package:' scheme should look like " + | 128 throw "URIs using the 'package:' scheme should look like " + |
| 129 "'$right', not '$wrong'."; | 129 "'$right', not '$wrong'."; |
| 130 } | 130 } |
| 131 | 131 |
| 132 var path = _entrypoint.resolve('packages/${uri.path}').path; | 132 var path = _entrypoint.resolve('packages/${uri.path}').path; |
| 133 _logResolution("# Package: $path"); | 133 _logResolution("# Package: $path"); |
| 134 return path; | 134 return path; |
| 135 } | 135 } |
| 136 | |
| 137 String _filePathFromPackageUri(Uri uri) { | |
| 138 if (uri.domain != '') { | |
| 139 var path = (uri.path != '') ? '${uri.domain}${uri.path}' : uri.domain; | |
| 140 var right = 'package:$path'; | |
| 141 var wrong = 'package://$path'; | |
| 142 | |
| 143 throw "URIs using the 'package:' scheme should look like " + | |
| 144 "'$right', not '$wrong'."; | |
| 145 } | |
| 146 | |
| 147 var path = _entrypoint.resolve('packages/${uri.path}').path; | |
| 148 _logResolution("# Package: $path"); | |
| 149 return path; | |
| 150 } | |
| OLD | NEW |