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

Unified Diff: sdk/lib/core/regexp.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 | « sdk/lib/core/date.dart ('k') | sdk/lib/coreimpl/regexp.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/regexp.dart
diff --git a/sdk/lib/core/regexp.dart b/sdk/lib/core/regexp.dart
index c5b1b5b6106c1c857920ae85e681d62a36ef78d4..99f8befa6e63a7104eacffe3fd33b0544fd69276 100644
--- a/sdk/lib/core/regexp.dart
+++ b/sdk/lib/core/regexp.dart
@@ -10,7 +10,7 @@
* The following example finds all matches of a [RegExp] in a [String]
* and iterates through the returned iterable of [Match] objects.
*
- * RegExp exp = new RegExp(r"(\w+)");
+ * RegExp exp = const RegExp(r"(\w+)");
* String str = "Parse my string";
* Iterable<Match> matches = exp.allMatches(str);
* for (Match m in matches) {
@@ -84,7 +84,7 @@ abstract class Match {
* The following example finds all matches of a regular expression in
* a string.
*
- * RegExp exp = new RegExp(r"(\w+)");
+ * RegExp exp = const RegExp(r"(\w+)");
* String str = "Parse my string";
* Iterable<Match> matches = exp.allMatches(str);
*/
@@ -93,8 +93,8 @@ interface RegExp extends Pattern default JSSyntaxRegExp {
* Constructs a regular expression. The default implementation of a
* [RegExp] sets [multiLine] and [ignoreCase] to false.
*/
- RegExp(String pattern, {bool multiLine: false,
- bool ignoreCase: false});
+ const RegExp(String pattern, {bool multiLine: false,
+ bool ignoreCase: false});
/**
* Searches for the first match of the regular expression
« no previous file with comments | « sdk/lib/core/date.dart ('k') | sdk/lib/coreimpl/regexp.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698