OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 q// Copyright (c) 2015, 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 @deprecated | 5 @deprecated |
6 library analyzer.source.embedder; | 6 library analyzer.source.embedder; |
7 | 7 |
8 import 'dart:collection' show HashMap; | 8 import 'dart:collection' show HashMap; |
9 import 'dart:core'; | 9 import 'dart:core'; |
10 import 'dart:io' as io; | 10 import 'dart:io' as io; |
11 | 11 |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 @override | 176 @override |
177 Uri restoreAbsolute(Source source) { | 177 Uri restoreAbsolute(Source source) { |
178 String path = source.fullName; | 178 String path = source.fullName; |
179 if (path.length > 3 && path[1] == ':' && path[2] == '\\') { | 179 if (path.length > 3 && path[1] == ':' && path[2] == '\\') { |
180 path = '/${path[0]}:${path.substring(2).replaceAll('\\', '/')}'; | 180 path = '/${path[0]}:${path.substring(2).replaceAll('\\', '/')}'; |
181 } | 181 } |
182 Source sdkSource = dartSdk.fromFileUri(Uri.parse('file://$path')); | 182 Source sdkSource = dartSdk.fromFileUri(Uri.parse('file://$path')); |
183 return sdkSource?.uri; | 183 return sdkSource?.uri; |
184 } | 184 } |
185 } | 185 } |
OLD | NEW |