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

Unified Diff: pkg/analyzer_experimental/lib/src/analyzer_impl.dart

Issue 16357010: Basic dart^2 analyzer tests running. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer_experimental/lib/src/analyzer_impl.dart
diff --git a/pkg/analyzer_experimental/lib/src/analyzer_impl.dart b/pkg/analyzer_experimental/lib/src/analyzer_impl.dart
index 84cfb8dc34358ccf1bcb0337924237e0366f8f43..4e46d616ba3a5f2e084884816446b771b23ad8ba 100644
--- a/pkg/analyzer_experimental/lib/src/analyzer_impl.dart
+++ b/pkg/analyzer_experimental/lib/src/analyzer_impl.dart
@@ -17,10 +17,12 @@ import 'generated/ast.dart';
import 'generated/element.dart';
import '../options.dart';
+
+DartSdk sdk;
+
/// Analyzes single library [File].
class AnalyzerImpl {
final CommandLineOptions options;
- DartSdk sdk;
ContentCache contentCache = new ContentCache();
SourceFactory sourceFactory;
@@ -33,7 +35,9 @@ class AnalyzerImpl {
final List<AnalysisErrorInfo> errorInfos = new List<AnalysisErrorInfo>();
AnalyzerImpl(CommandLineOptions this.options) {
- sdk = new DirectoryBasedDartSdk(new JavaFile(options.dartSdkPath));
+ if (sdk == null) {
+ sdk = new DirectoryBasedDartSdk(new JavaFile(options.dartSdkPath));
+ }
}
/**

Powered by Google App Engine
This is Rietveld 408576698