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

Unified Diff: sdk/lib/_internal/pub/lib/src/utils.dart

Issue 1040563004: Make "pub run foo" run "pub run foo:foo" rather than "pub run bin/foo" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove bogus changes. Created 5 years, 9 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
Index: sdk/lib/_internal/pub/lib/src/utils.dart
diff --git a/sdk/lib/_internal/pub/lib/src/utils.dart b/sdk/lib/_internal/pub/lib/src/utils.dart
index 09575d7bf8e9e54d733ade12dfd87f3ab9adfc47..14d81a67a4138ea4e2c6aac75429c1a6cc05a132 100644
--- a/sdk/lib/_internal/pub/lib/src/utils.dart
+++ b/sdk/lib/_internal/pub/lib/src/utils.dart
@@ -23,6 +23,15 @@ import 'log.dart' as log;
export '../../asset/dart/utils.dart';
+/// A regular expression matching a Dart identifier.
+///
+/// This also matches a package name, since they must be Dart identifiers.
+final identifierRegExp = new RegExp(r"[a-zA-Z_][a-zA-Z0-9_]+");
+
+/// Like [identifierRegExp], but anchored so that it only matches strings that
+/// are *just* Dart identifiers.
+final onlyIdentifierRegExp = new RegExp("^${identifierRegExp.pattern}\$");
+
/// A pair of values.
class Pair<E, F> {
E first;
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/preprocess.dart ('k') | sdk/lib/_internal/pub/test/get/cache_transformed_dependency_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698