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

Unified Diff: pkg/front_end/lib/src/base/analysis_target.dart

Issue 2486923007: Create pkg/front_end/src/base and begin populating with general use classes. (Closed)
Patch Set: Fix formatting Created 4 years, 1 month 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/task/model.dart ('k') | pkg/front_end/lib/src/base/errors.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/lib/src/base/analysis_target.dart
diff --git a/pkg/front_end/lib/src/base/analysis_target.dart b/pkg/front_end/lib/src/base/analysis_target.dart
new file mode 100644
index 0000000000000000000000000000000000000000..ab50efd1a8caa37db740b2953b1769f39c6e284c
--- /dev/null
+++ b/pkg/front_end/lib/src/base/analysis_target.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:front_end/src/base/source.dart';
+
+/**
+ * An object with which an analysis result can be associated.
+ *
+ * Clients may implement this class when creating new kinds of targets.
+ * Instances of this type are used in hashed data structures, so subtypes are
+ * required to correctly implement [==] and [hashCode].
+ */
+abstract class AnalysisTarget {
+ /**
+ * If this target is associated with a library, return the source of the
+ * library's defining compilation unit; otherwise return `null`.
+ */
+ Source get librarySource;
+
+ /**
+ * Return the source associated with this target, or `null` if this target is
+ * not associated with a source.
+ */
+ Source get source;
+}
« no previous file with comments | « pkg/analyzer/lib/task/model.dart ('k') | pkg/front_end/lib/src/base/errors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698