OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // 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 import 'package:analyzer/src/generated/element.dart' | 5 import 'package:analyzer/dart/element/element.dart' |
6 show CompilationUnitElement, LibraryElement; | 6 show CompilationUnitElement, LibraryElement; |
7 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext; | 7 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext; |
8 import 'package:path/path.dart' as path; | 8 import 'package:path/path.dart' as path; |
9 | 9 |
10 import '../compiler.dart' show AbstractCompiler; | 10 import '../compiler.dart' show AbstractCompiler; |
11 import '../info.dart'; | 11 import '../info.dart'; |
12 import '../utils.dart' show canonicalLibraryName; | 12 import '../utils.dart' show canonicalLibraryName; |
13 import '../options.dart' show CodegenOptions; | 13 import '../options.dart' show CodegenOptions; |
14 | 14 |
15 abstract class CodeGenerator { | 15 abstract class CodeGenerator { |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 // Not a package. | 115 // Not a package. |
116 // TODO(leafp) These may need to be adjusted | 116 // TODO(leafp) These may need to be adjusted |
117 // relative to the import location | 117 // relative to the import location |
118 return new Uri(path: suffix); | 118 return new Uri(path: suffix); |
119 } | 119 } |
120 assert(index == 0); | 120 assert(index == 0); |
121 return new Uri( | 121 return new Uri( |
122 scheme: 'package', path: path.joinAll(parts.sublist(index + 1))); | 122 scheme: 'package', path: path.joinAll(parts.sublist(index + 1))); |
123 } | 123 } |
124 } | 124 } |
OLD | NEW |