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 import 'dart:math' as math; | 8 import 'dart:math' as math; |
9 | 9 |
10 import 'package:analyzer/src/context/cache.dart'; | 10 import 'package:analyzer/src/context/cache.dart'; |
(...skipping 2708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2719 hasNonPartOfDirective = true; | 2719 hasNonPartOfDirective = true; |
2720 if (directive is UriBasedDirective) { | 2720 if (directive is UriBasedDirective) { |
2721 Source referencedSource = | 2721 Source referencedSource = |
2722 resolveDirective(context, source, directive, errorListener); | 2722 resolveDirective(context, source, directive, errorListener); |
2723 if (referencedSource != null) { | 2723 if (referencedSource != null) { |
2724 if (directive is ExportDirective) { | 2724 if (directive is ExportDirective) { |
2725 exportedSourceSet.add(referencedSource); | 2725 exportedSourceSet.add(referencedSource); |
2726 } else if (directive is ImportDirective) { | 2726 } else if (directive is ImportDirective) { |
2727 explicitlyImportedSourceSet.add(referencedSource); | 2727 explicitlyImportedSourceSet.add(referencedSource); |
2728 } else if (directive is PartDirective) { | 2728 } else if (directive is PartDirective) { |
2729 if (referencedSource != source) { | 2729 includedSourceSet.add(referencedSource); |
2730 includedSourceSet.add(referencedSource); | |
2731 } | |
2732 } else { | 2730 } else { |
2733 throw new AnalysisException( | 2731 throw new AnalysisException( |
2734 '$runtimeType failed to handle a ${directive.runtimeType}'); | 2732 '$runtimeType failed to handle a ${directive.runtimeType}'); |
2735 } | 2733 } |
2736 } | 2734 } |
2737 } | 2735 } |
2738 } | 2736 } |
2739 } | 2737 } |
2740 // | 2738 // |
2741 // Always include "dart:core" source. | 2739 // Always include "dart:core" source. |
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3526 @override | 3524 @override |
3527 bool moveNext() { | 3525 bool moveNext() { |
3528 if (_newSources.isEmpty) { | 3526 if (_newSources.isEmpty) { |
3529 return false; | 3527 return false; |
3530 } | 3528 } |
3531 currentTarget = _newSources.first; | 3529 currentTarget = _newSources.first; |
3532 _newSources.remove(currentTarget); | 3530 _newSources.remove(currentTarget); |
3533 return true; | 3531 return true; |
3534 } | 3532 } |
3535 } | 3533 } |
OLD | NEW |