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

Unified Diff: utils/pub/version.dart

Issue 10981031: Convert raw strings in pub (and apidoc) to new syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Respond to review. Created 8 years, 3 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 | « utils/pub/hosted_source.dart ('k') | utils/pub/yaml/composer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/version.dart
diff --git a/utils/pub/version.dart b/utils/pub/version.dart
index a917f23c105f6572d90233ad4dabaa22753e3421..9b0197b6cc597c4ae78976b7aa8f3e169c6699ab 100644
--- a/utils/pub/version.dart
+++ b/utils/pub/version.dart
@@ -19,11 +19,11 @@ class Version implements Comparable, Hashable, VersionConstraint {
static Version get none => new Version(0, 0, 0);
static const _PARSE_REGEX = const RegExp(
- @'^' // Start at beginning.
- @'(\d+).(\d+).(\d+)' // Version number.
- @'(-([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?' // Pre-release.
- @'(\+([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?' // Build.
- @'$'); // Consume entire string.
+ r'^' // Start at beginning.
+ r'(\d+).(\d+).(\d+)' // Version number.
+ r'(-([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?' // Pre-release.
+ r'(\+([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?' // Build.
+ r'$'); // Consume entire string.
/** The major version number: "1" in "1.2.3". */
final int major;
@@ -411,7 +411,7 @@ class _VersionConstraintFactory {
// unfortunately meaningful in YAML, requiring it to be quoted in a
// pubspec.
// See if it's a comparison operator followed by a version, like ">1.2.3".
- var match = const RegExp(@"^([<>]=?)?(.*)$").firstMatch(text);
+ var match = const RegExp(r"^([<>]=?)?(.*)$").firstMatch(text);
if (match != null) {
var comparison = match[1];
var version = new Version.parse(match[2]);
« no previous file with comments | « utils/pub/hosted_source.dart ('k') | utils/pub/yaml/composer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698