Index: pkg/analyzer/lib/src/dart/analysis/driver.dart |
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart |
index 1a3ae73c395e5e0f4fd03e0462d4acdcd1057219..b4143ac00619b43ca3dd9c65c9a8bdf5fa17797d 100644 |
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart |
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart |
@@ -228,7 +228,18 @@ class AnalysisDriver { |
continue; |
} |
- // TODO(scheglov) analyze requested files |
+ // Analyze a requested file. |
+ if (_requestedFiles.isNotEmpty) { |
+ String path = _requestedFiles.keys.first; |
+ AnalysisResult result = _computeAnalysisResult(path, withUnit: true); |
+ _requestedFiles.remove(path).forEach((completer) { |
+ completer.complete(result); |
+ }); |
+ yield result; |
+ // Repeat the processing loop. |
+ _hasWork.notify(); |
+ continue; |
+ } |
// Analyze a priority file. |
if (_priorityFiles.isNotEmpty) { |