Skip to content
This repository was archived by the owner on Nov 20, 2024. It is now read-only.

Don't use "yield" in AnalysisDriver._getAllUnitSources(). #54

Merged
merged 1 commit into from
Mar 17, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions lib/src/analysis.dart
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,11 @@ class AnalysisDriver {
/// Yield the sources for all the compilation units constituting
/// [librarySource] (including the defining compilation unit).
Iterable<Source> _getAllUnitSources(
AnalysisContext context, Source librarySource) sync* {
yield librarySource;
yield* context.getLibraryElement(librarySource).parts
.map((CompilationUnitElement e) => e.source);
AnalysisContext context, Source librarySource) {
List<Source> result = <Source>[librarySource];
result.addAll(context.getLibraryElement(librarySource).parts
.map((CompilationUnitElement e) => e.source));
return result;
}
}

Expand Down