| OLD | NEW |
| 1 library angular.source_crawler_impl; | 1 library angular.source_crawler_impl; |
| 2 | 2 |
| 3 import 'dart:io'; | 3 import 'dart:io'; |
| 4 import 'package:analyzer/analyzer.dart'; | 4 import 'package:analyzer/analyzer.dart'; |
| 5 import 'source_crawler.dart'; | 5 import 'package:angular/tools/source_crawler.dart'; |
| 6 | 6 |
| 7 const String PACKAGE_PREFIX = 'package:'; | 7 const String PACKAGE_PREFIX = 'package:'; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * Dart source file crawler. As it crawls Dart source, it calls | 10 * Dart source file crawler. As it crawls Dart source, it calls |
| 11 * [CompilationUnitVisitor] on each file. | 11 * [CompilationUnitVisitor] on each file. |
| 12 */ | 12 */ |
| 13 class SourceCrawlerImpl implements SourceCrawler { | 13 class SourceCrawlerImpl implements SourceCrawler { |
| 14 final List<String> packageRoots; | 14 final List<String> packageRoots; |
| 15 | 15 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 } | 89 } |
| 90 | 90 |
| 91 String _packageUriResolver(String uri, String packageRoot) { | 91 String _packageUriResolver(String uri, String packageRoot) { |
| 92 var packagePath = uri.substring(PACKAGE_PREFIX.length); | 92 var packagePath = uri.substring(PACKAGE_PREFIX.length); |
| 93 if (!packageRoot.endsWith('/')) { | 93 if (!packageRoot.endsWith('/')) { |
| 94 packageRoot = packageRoot + '/'; | 94 packageRoot = packageRoot + '/'; |
| 95 } | 95 } |
| 96 return packageRoot + packagePath; | 96 return packageRoot + packagePath; |
| 97 } | 97 } |
| 98 } | 98 } |
| OLD | NEW |