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

Side by Side Diff: runtime/lib/regexp_patch.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/webdriver/lib/webdriver.dart ('k') | samples/markdown/block_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 get start => _start(0); 8 int get start => _start(0);
9 int get end => _end(0); 9 int get end => _end(0);
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 String get pattern => regexp.pattern; 47 String get pattern => regexp.pattern;
48 48
49 final RegExp regexp; 49 final RegExp regexp;
50 final String str; 50 final String str;
51 final List<int> _match; 51 final List<int> _match;
52 static const int MATCH_PAIR = 2; 52 static const int MATCH_PAIR = 2;
53 } 53 }
54 54
55 55
56 patch class JSSyntaxRegExp { 56 patch class JSSyntaxRegExp {
57 /* patch */ factory JSSyntaxRegExp( 57 /* patch */ const factory JSSyntaxRegExp(
58 String pattern, 58 String pattern,
59 {bool multiLine: false, 59 {bool multiLine: false,
60 bool ignoreCase: false}) native "JSSyntaxRegExp_factory"; 60 bool ignoreCase: false}) native "JSSyntaxRegExp_factory";
61 61
62 /* patch */ Match firstMatch(String str) { 62 /* patch */ Match firstMatch(String str) {
63 List match = _ExecuteMatch(str, 0); 63 List match = _ExecuteMatch(str, 0);
64 if (match == null) { 64 if (match == null) {
65 return null; 65 return null;
66 } 66 }
67 return new _JSRegExpMatch(this, str, match); 67 return new _JSRegExpMatch(this, str, match);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 /* patch */ bool get multiLine native "JSSyntaxRegExp_multiLine"; 108 /* patch */ bool get multiLine native "JSSyntaxRegExp_multiLine";
109 109
110 /* patch */ bool get ignoreCase native "JSSyntaxRegExp_ignoreCase"; 110 /* patch */ bool get ignoreCase native "JSSyntaxRegExp_ignoreCase";
111 111
112 int get _groupCount native "JSSyntaxRegExp_getGroupCount"; 112 int get _groupCount native "JSSyntaxRegExp_getGroupCount";
113 113
114 List _ExecuteMatch(String str, int start_index) 114 List _ExecuteMatch(String str, int start_index)
115 native "JSSyntaxRegExp_ExecuteMatch"; 115 native "JSSyntaxRegExp_ExecuteMatch";
116 } 116 }
OLDNEW
« no previous file with comments | « pkg/webdriver/lib/webdriver.dart ('k') | samples/markdown/block_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698