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

Unified Diff: pkg/analyzer/lib/src/dart/analysis/driver.dart

Issue 2654663005: Add DeclaredVariables to AnalysisDriver. (Closed)
Patch Set: Created 3 years, 11 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/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 0c9e8d8060a4b9d65832eb52123798ab1563c6c1..95a026a29a2ee3877651b67136857082dc655081 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -6,6 +6,7 @@ import 'dart:async';
import 'dart:collection';
import 'dart:typed_data';
+import 'package:analyzer/context/declared_variables.dart';
import 'package:analyzer/dart/ast/ast.dart';
import 'package:analyzer/dart/element/element.dart' show CompilationUnitElement;
import 'package:analyzer/error/error.dart';
@@ -121,6 +122,11 @@ class AnalysisDriver {
SourceFactory _sourceFactory;
/**
+ * The declared environment variables.
+ */
+ final DeclaredVariables declaredVariables = new DeclaredVariables();
+
+ /**
* The salt to mix into all hashes used as keys for serialized data.
*/
final Uint32List _salt = new Uint32List(1 + AnalysisOptions.signatureLength);
@@ -759,6 +765,7 @@ class AnalysisDriver {
AnalysisEngine.instance.createAnalysisContext();
analysisContext.useSdkCachePartition = false;
analysisContext.analysisOptions = _analysisOptions;
+ analysisContext.declaredVariables.addAll(declaredVariables);
analysisContext.sourceFactory = _sourceFactory.clone();
analysisContext.contentCache = new _ContentCacheWrapper(_fsState);
analysisContext.resultProvider =
« no previous file with comments | « pkg/analyzer/lib/context/declared_variables.dart ('k') | pkg/analyzer/test/generated/compile_time_error_code_driver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698