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

Side by Side Diff: runtime/lib/regexp_patch.dart

Issue 10910253: Change RegExp constructor to insist on proper named optional parameters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update co19/dart2js status. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/dartdoc/inline_parser.dart ('k') | samples/markdown/inline_parser.dart » ('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 class _JSRegExpMatch implements Match { 5 class _JSRegExpMatch implements Match {
6 _JSRegExpMatch(this.regexp, this.str, this._match); 6 _JSRegExpMatch(this.regexp, this.str, this._match);
7 7
8 int start() { 8 int start() {
9 return _start(0); 9 return _start(0);
10 } 10 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 final RegExp regexp; 55 final RegExp regexp;
56 final String str; 56 final String str;
57 final List<int> _match; 57 final List<int> _match;
58 static const int MATCH_PAIR = 2; 58 static const int MATCH_PAIR = 2;
59 } 59 }
60 60
61 61
62 patch class JSSyntaxRegExp { 62 patch class JSSyntaxRegExp {
63 /* patch */ const factory JSSyntaxRegExp( 63 /* patch */ const factory JSSyntaxRegExp(
64 String pattern, 64 String pattern,
65 [bool multiLine = false, 65 {bool multiLine: false,
66 bool ignoreCase = false]) native "JSSyntaxRegExp_factory"; 66 bool ignoreCase: false}) native "JSSyntaxRegExp_factory";
67 67
68 /* patch */ Match firstMatch(String str) { 68 /* patch */ Match firstMatch(String str) {
69 List match = _ExecuteMatch(str, 0); 69 List match = _ExecuteMatch(str, 0);
70 if (match === null) { 70 if (match === null) {
71 return null; 71 return null;
72 } 72 }
73 return new _JSRegExpMatch(this, str, match); 73 return new _JSRegExpMatch(this, str, match);
74 } 74 }
75 75
76 /* patch */ Iterable<Match> allMatches(String str) { 76 /* patch */ Iterable<Match> allMatches(String str) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 /* patch */ bool get multiLine native "JSSyntaxRegExp_multiLine"; 113 /* patch */ bool get multiLine native "JSSyntaxRegExp_multiLine";
114 114
115 /* patch */ bool get ignoreCase native "JSSyntaxRegExp_ignoreCase"; 115 /* patch */ bool get ignoreCase native "JSSyntaxRegExp_ignoreCase";
116 116
117 int get _groupCount native "JSSyntaxRegExp_getGroupCount"; 117 int get _groupCount native "JSSyntaxRegExp_getGroupCount";
118 118
119 List _ExecuteMatch(String str, int start_index) 119 List _ExecuteMatch(String str, int start_index)
120 native "JSSyntaxRegExp_ExecuteMatch"; 120 native "JSSyntaxRegExp_ExecuteMatch";
121 } 121 }
OLDNEW
« no previous file with comments | « pkg/dartdoc/inline_parser.dart ('k') | samples/markdown/inline_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698