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

Unified Diff: pkg/analyzer/lib/task/dart.dart

Issue 1082913007: Move LibraryUnitTarget into API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/task/dart.dart
diff --git a/pkg/analyzer/lib/task/dart.dart b/pkg/analyzer/lib/task/dart.dart
index 819554965f0341d546e326401f689c42fc7d4585..42191a4aa0637b84e6c0cff5dc87c5d390911a27 100644
--- a/pkg/analyzer/lib/task/dart.dart
+++ b/pkg/analyzer/lib/task/dart.dart
@@ -9,6 +9,7 @@ import 'package:analyzer/src/generated/element.dart';
import 'package:analyzer/src/generated/error.dart';
import 'package:analyzer/src/generated/scanner.dart';
import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/generated/utilities_general.dart';
import 'package:analyzer/task/model.dart';
/**
@@ -120,3 +121,28 @@ final ResultDescriptor<Token> TOKEN_STREAM =
*/
final ListResultDescriptor<Source> UNITS =
new ListResultDescriptor<Source>('UNITS', Source.EMPTY_ARRAY);
+
+/**
+ * A pair of a library [Source] and a unit [Source] in this library.
Brian Wilkerson 2015/04/15 21:41:37 Perhaps: A specific compilation unit in a specifi
scheglov 2015/04/15 23:27:51 Done.
+ */
+class LibraryUnitTarget implements AnalysisTarget {
Brian Wilkerson 2015/04/15 21:41:37 I'd prefer a more meaningful name, but I'm having
scheglov 2015/04/15 23:27:51 Done.
+ final Source library;
Brian Wilkerson 2015/04/15 21:41:37 This needs a comment. Even something as simple as
scheglov 2015/04/15 23:27:51 Done.
+ final Source unit;
Brian Wilkerson 2015/04/15 21:41:37 This needs a comment.
scheglov 2015/04/15 23:27:51 Done.
+
+ LibraryUnitTarget(this.library, this.unit);
Brian Wilkerson 2015/04/15 21:41:37 This needs a comment.
scheglov 2015/04/15 23:27:51 Done.
+
+ @override
+ int get hashCode {
+ return JenkinsSmiHash.combine(library.hashCode, unit.hashCode);
+ }
+
+ @override
+ Source get source => unit;
+
+ @override
+ bool operator ==(other) {
+ return other is LibraryUnitTarget &&
+ other.library == library &&
+ other.unit == unit;
+ }
+}
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | pkg/analyzer/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698