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

Unified Diff: pkg/analyzer/lib/src/generated/source_io.dart

Issue 103233003: New analyzer snapshot. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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/generated/source.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/src/generated/source_io.dart
diff --git a/pkg/analyzer/lib/src/generated/source_io.dart b/pkg/analyzer/lib/src/generated/source_io.dart
index e2ea6be6e854ed454deb40c244ebb811d12c63e2..60bc5573c82fa6f72453552234c23c2749b3733a 100644
--- a/pkg/analyzer/lib/src/generated/source_io.dart
+++ b/pkg/analyzer/lib/src/generated/source_io.dart
@@ -10,6 +10,50 @@ import 'engine.dart' show AnalysisContext, AnalysisEngine;
export 'source.dart';
/**
+ * Instances of interface `LocalSourcePredicate` are used to determine if the given
+ * [Source] is "local" in some sense, so can be updated.
+ *
+ * @coverage dart.engine.source
+ */
+abstract class LocalSourcePredicate {
+ /**
+ * Instance of [LocalSourcePredicate] that always returns `false`.
+ */
+ static final LocalSourcePredicate _FALSE = new LocalSourcePredicate_15();
+
+ /**
+ * Instance of [LocalSourcePredicate] that always returns `true`.
+ */
+ static final LocalSourcePredicate _TRUE = new LocalSourcePredicate_16();
+
+ /**
+ * Instance of [LocalSourcePredicate] that returns `true` for all [Source]s
+ * except of SDK.
+ */
+ static final LocalSourcePredicate _NOT_SDK = new LocalSourcePredicate_17();
+
+ /**
+ * Determines if the given [Source] is local.
+ *
+ * @param source the [Source] to analyze
+ * @return `true` if the given [Source] is local
+ */
+ bool isLocal(Source source);
+}
+
+class LocalSourcePredicate_15 implements LocalSourcePredicate {
+ bool isLocal(Source source) => false;
+}
+
+class LocalSourcePredicate_16 implements LocalSourcePredicate {
+ bool isLocal(Source source) => true;
+}
+
+class LocalSourcePredicate_17 implements LocalSourcePredicate {
+ bool isLocal(Source source) => source.uriKind != UriKind.DART_URI;
+}
+
+/**
* Instances of the class `FileBasedSource` implement a source that represents a file.
*
* @coverage dart.engine.source
« no previous file with comments | « pkg/analyzer/lib/src/generated/source.dart ('k') | pkg/analyzer/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698