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

Side by Side Diff: sdk/lib/core/regexp.dart

Issue 12310103: Small cleanups in RegExp to avoid generating lots of code just because there is a try/catch in our … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/collection/collections.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.core; 5 part of dart.core;
6 6
7 /** 7 /**
8 * [Match] contains methods to manipulate a regular expression match. 8 * [Match] contains methods to manipulate a regular expression match.
9 * 9 *
10 * Iterables of [Match] objects are returned from [RegExp] matching methods. 10 * Iterables of [Match] objects are returned from [RegExp] matching methods.
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 * a string. 87 * a string.
88 * 88 *
89 * RegExp exp = new RegExp(r"(\w+)"); 89 * RegExp exp = new RegExp(r"(\w+)");
90 * String str = "Parse my string"; 90 * String str = "Parse my string";
91 * Iterable<Match> matches = exp.allMatches(str); 91 * Iterable<Match> matches = exp.allMatches(str);
92 */ 92 */
93 abstract class RegExp implements Pattern { 93 abstract class RegExp implements Pattern {
94 /** 94 /**
95 * Constructs a regular expression. The default implementation of a 95 * Constructs a regular expression. The default implementation of a
96 * [RegExp] sets [multiLine] to false and [caseSensitive] to true. 96 * [RegExp] sets [multiLine] to false and [caseSensitive] to true.
97 * Throws a [FormatException] if [pattern] is not a valid regular
98 * exression pattern.
97 */ 99 */
98 external factory RegExp(String pattern, {bool multiLine: false, 100 external factory RegExp(String pattern, {bool multiLine: false,
99 bool caseSensitive: true}); 101 bool caseSensitive: true});
100 102
101 /** 103 /**
102 * Searches for the first match of the regular expression 104 * Searches for the first match of the regular expression
103 * in the string [str]. Returns `null` if there is no match. 105 * in the string [str]. Returns `null` if there is no match.
104 */ 106 */
105 Match firstMatch(String str); 107 Match firstMatch(String str);
106 108
(...skipping 22 matching lines...) Expand all
129 /** 131 /**
130 * Whether this regular expression matches multiple lines. 132 * Whether this regular expression matches multiple lines.
131 */ 133 */
132 bool get isMultiLine; 134 bool get isMultiLine;
133 135
134 /** 136 /**
135 * Whether this regular expression is case insensitive. 137 * Whether this regular expression is case insensitive.
136 */ 138 */
137 bool get isCaseSensitive; 139 bool get isCaseSensitive;
138 } 140 }
OLDNEW
« no previous file with comments | « sdk/lib/collection/collections.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698