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

Unified Diff: utils/pub/version.dart

Issue 11312203: "Reverting 14829-14832" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | « utils/pub/io.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 b6e8e8f078733439fd6acb55cc6cf7c82bc91672..a7b6b3a575d015dcca5b8e3f1f78c1a0d042cc77 100644
--- a/utils/pub/version.dart
+++ b/utils/pub/version.dart
@@ -18,7 +18,7 @@ class Version implements Comparable, VersionConstraint {
/** No released version: i.e. "0.0.0". */
static Version get none => new Version(0, 0, 0);
- static final _PARSE_REGEX = new RegExp(
+ static const _PARSE_REGEX = const RegExp(
r'^' // Start at beginning.
r'(\d+).(\d+).(\d+)' // Version number.
r'(-([0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*))?' // Pre-release.
@@ -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 = new RegExp(r"^([<>]=?)?(.*)$").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/io.dart ('k') | utils/pub/yaml/composer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698