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

Side by Side Diff: pkg/analyzer/lib/src/context/context.dart

Issue 2627093010: Report errors like IMPORT_OF_NON_LIBRARY with the new analysis driver. (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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library analyzer.src.context.context; 5 library analyzer.src.context.context;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
(...skipping 1229 matching lines...) Expand 10 before | Expand all | Expand 10 after
1240 setValue(SOURCE_KIND, SourceKind.LIBRARY); 1240 setValue(SOURCE_KIND, SourceKind.LIBRARY);
1241 entry.setState(TOKEN_STREAM, CacheState.FLUSHED); 1241 entry.setState(TOKEN_STREAM, CacheState.FLUSHED);
1242 setValue(UNITS, <Source>[librarySource]); 1242 setValue(UNITS, <Source>[librarySource]);
1243 1243
1244 LibrarySpecificUnit unit = 1244 LibrarySpecificUnit unit =
1245 new LibrarySpecificUnit(librarySource, librarySource); 1245 new LibrarySpecificUnit(librarySource, librarySource);
1246 entry = getCacheEntry(unit); 1246 entry = getCacheEntry(unit);
1247 setValue(HINTS, AnalysisError.NO_ERRORS); 1247 setValue(HINTS, AnalysisError.NO_ERRORS);
1248 setValue(LINTS, AnalysisError.NO_ERRORS); 1248 setValue(LINTS, AnalysisError.NO_ERRORS);
1249 setValue(LIBRARY_UNIT_ERRORS, AnalysisError.NO_ERRORS); 1249 setValue(LIBRARY_UNIT_ERRORS, AnalysisError.NO_ERRORS);
1250 setValue(RESOLVE_DIRECTIVES_ERRORS, AnalysisError.NO_ERRORS);
1250 setValue(RESOLVE_TYPE_NAMES_ERRORS, AnalysisError.NO_ERRORS); 1251 setValue(RESOLVE_TYPE_NAMES_ERRORS, AnalysisError.NO_ERRORS);
1251 setValue(RESOLVE_UNIT_ERRORS, AnalysisError.NO_ERRORS); 1252 setValue(RESOLVE_UNIT_ERRORS, AnalysisError.NO_ERRORS);
1252 entry.setState(RESOLVED_UNIT, CacheState.FLUSHED); 1253 entry.setState(RESOLVED_UNIT, CacheState.FLUSHED);
1253 entry.setState(RESOLVED_UNIT1, CacheState.FLUSHED); 1254 entry.setState(RESOLVED_UNIT1, CacheState.FLUSHED);
1254 entry.setState(RESOLVED_UNIT2, CacheState.FLUSHED); 1255 entry.setState(RESOLVED_UNIT2, CacheState.FLUSHED);
1255 entry.setState(RESOLVED_UNIT3, CacheState.FLUSHED); 1256 entry.setState(RESOLVED_UNIT3, CacheState.FLUSHED);
1256 entry.setState(RESOLVED_UNIT4, CacheState.FLUSHED); 1257 entry.setState(RESOLVED_UNIT4, CacheState.FLUSHED);
1257 entry.setState(RESOLVED_UNIT5, CacheState.FLUSHED); 1258 entry.setState(RESOLVED_UNIT5, CacheState.FLUSHED);
1258 entry.setState(RESOLVED_UNIT6, CacheState.FLUSHED); 1259 entry.setState(RESOLVED_UNIT6, CacheState.FLUSHED);
1259 entry.setState(RESOLVED_UNIT7, CacheState.FLUSHED); 1260 entry.setState(RESOLVED_UNIT7, CacheState.FLUSHED);
(...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after
2263 } 2264 }
2264 DartSdk sdk = factory.dartSdk; 2265 DartSdk sdk = factory.dartSdk;
2265 if (sdk == null) { 2266 if (sdk == null) {
2266 throw new ArgumentError( 2267 throw new ArgumentError(
2267 "The source factory for an SDK analysis context must have a DartUriRes olver"); 2268 "The source factory for an SDK analysis context must have a DartUriRes olver");
2268 } 2269 }
2269 return new AnalysisCache( 2270 return new AnalysisCache(
2270 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]); 2271 <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]);
2271 } 2272 }
2272 } 2273 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698