| OLD | NEW |
| 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.task.dart; | 5 library analyzer.src.task.dart; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/visitor.dart'; | 10 import 'package:analyzer/dart/ast/visitor.dart'; |
| (...skipping 3533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3544 } | 3544 } |
| 3545 } | 3545 } |
| 3546 } | 3546 } |
| 3547 } | 3547 } |
| 3548 // | 3548 // |
| 3549 // Always include "dart:core" source. | 3549 // Always include "dart:core" source. |
| 3550 // | 3550 // |
| 3551 HashSet<Source> importedSourceSet = | 3551 HashSet<Source> importedSourceSet = |
| 3552 new HashSet.from(explicitlyImportedSourceSet); | 3552 new HashSet.from(explicitlyImportedSourceSet); |
| 3553 Source coreLibrarySource = context.sourceFactory.forUri(DartSdk.DART_CORE); | 3553 Source coreLibrarySource = context.sourceFactory.forUri(DartSdk.DART_CORE); |
| 3554 if (coreLibrarySource == null) { |
| 3555 String message; |
| 3556 DartSdk sdk = context.sourceFactory.dartSdk; |
| 3557 if (sdk == null) { |
| 3558 message = 'Could not resolve "dart:core": SDK not defined'; |
| 3559 } else { |
| 3560 message = 'Could not resolve "dart:core": SDK incorrectly configured'; |
| 3561 } |
| 3562 throw new AnalysisException(message); |
| 3563 } |
| 3554 importedSourceSet.add(coreLibrarySource); | 3564 importedSourceSet.add(coreLibrarySource); |
| 3555 // | 3565 // |
| 3556 // Compute kind. | 3566 // Compute kind. |
| 3557 // | 3567 // |
| 3558 SourceKind sourceKind = SourceKind.LIBRARY; | 3568 SourceKind sourceKind = SourceKind.LIBRARY; |
| 3559 if (modificationTime == -1) { | 3569 if (modificationTime == -1) { |
| 3560 sourceKind = SourceKind.UNKNOWN; | 3570 sourceKind = SourceKind.UNKNOWN; |
| 3561 } else if (hasPartOfDirective && !hasNonPartOfDirective) { | 3571 } else if (hasPartOfDirective && !hasNonPartOfDirective) { |
| 3562 sourceKind = SourceKind.PART; | 3572 sourceKind = SourceKind.PART; |
| 3563 } | 3573 } |
| (...skipping 1882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5446 | 5456 |
| 5447 @override | 5457 @override |
| 5448 bool moveNext() { | 5458 bool moveNext() { |
| 5449 if (_newSources.isEmpty) { | 5459 if (_newSources.isEmpty) { |
| 5450 return false; | 5460 return false; |
| 5451 } | 5461 } |
| 5452 currentTarget = _newSources.removeLast(); | 5462 currentTarget = _newSources.removeLast(); |
| 5453 return true; | 5463 return true; |
| 5454 } | 5464 } |
| 5455 } | 5465 } |
| OLD | NEW |