Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(399)

Side by Side Diff: lib/src/analyzer/multi_package_resolver.dart

Issue 1879373004: Implement modular compilation (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 'package:analyzer/src/generated/java_io.dart'; 7 import 'package:analyzer/src/generated/java_io.dart';
8 import 'package:analyzer/src/generated/source.dart'; 8 import 'package:analyzer/src/generated/source.dart';
9 import 'package:analyzer/src/generated/source_io.dart'; 9 import 'package:analyzer/src/generated/source_io.dart';
10 import 'package:path/path.dart' show join; 10 import 'package:path/path.dart' show join;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 /// Expand `uri.path`, replacing dots in the package name with slashes. 44 /// Expand `uri.path`, replacing dots in the package name with slashes.
45 List<String> _expandPath(Uri uri) { 45 List<String> _expandPath(Uri uri) {
46 if (uri.scheme != 'package') return null; 46 if (uri.scheme != 'package') return null;
47 var path = uri.path; 47 var path = uri.path;
48 var slashPos = path.indexOf('/'); 48 var slashPos = path.indexOf('/');
49 var packagePath = path.substring(0, slashPos).replaceAll(".", "/"); 49 var packagePath = path.substring(0, slashPos).replaceAll(".", "/");
50 var filePath = path.substring(slashPos + 1); 50 var filePath = path.substring(slashPos + 1);
51 return ['$packagePath/lib/$filePath', '$packagePath/$filePath']; 51 return ['$packagePath/lib/$filePath', '$packagePath/$filePath'];
52 } 52 }
53 } 53 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698