Index: pkg/analyzer/lib/analyzer.dart |
diff --git a/pkg/analyzer/lib/analyzer.dart b/pkg/analyzer/lib/analyzer.dart |
index c4642e8e8044d70aa98d30f34dac482d424a9368..59fea172ff8d0fc6bc19603f5a4af23b608cd572 100644 |
--- a/pkg/analyzer/lib/analyzer.dart |
+++ b/pkg/analyzer/lib/analyzer.dart |
@@ -14,6 +14,8 @@ import 'package:analyzer/src/generated/error.dart'; |
import 'package:analyzer/src/generated/parser.dart'; |
import 'package:analyzer/src/generated/source_io.dart'; |
import 'package:analyzer/src/string_source.dart'; |
+import 'package:analyzer/file_system/file_system.dart' hide File; |
+import 'package:analyzer/file_system/physical_file_system.dart'; |
import 'package:path/path.dart' as pathos; |
export 'package:analyzer/dart/ast/ast.dart'; |
@@ -50,7 +52,8 @@ CompilationUnit parseCompilationUnit(String contents, |
CompilationUnit parseDartFile(String path, |
{bool suppressErrors: false, bool parseFunctionBodies: true}) { |
String contents = new File(path).readAsStringSync(); |
- var sourceFactory = new SourceFactory([new FileUriResolver()]); |
+ var sourceFactory = new SourceFactory( |
+ [new ResourceUriResolver(PhysicalResourceProvider.INSTANCE)]); |
var absolutePath = pathos.absolute(path); |
var source = sourceFactory.forUri(pathos.toUri(absolutePath).toString()); |