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

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

Issue 10386104: Implement a getter for pattern to complete the Match interface. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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 | « no previous file | tests/co19/co19-runtime.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 for (int i = 0; i < groupsSpec.length; i++) { 43 for (int i = 0; i < groupsSpec.length; i++) {
44 groupsList[i] = group(groupsSpec[i]); 44 groupsList[i] = group(groupsSpec[i]);
45 } 45 }
46 return groupsList; 46 return groupsList;
47 } 47 }
48 48
49 int groupCount() { 49 int groupCount() {
50 return regexp._groupCount; 50 return regexp._groupCount;
51 } 51 }
52 52
53 String get pattern() => regexp.pattern;
54
53 final RegExp regexp; 55 final RegExp regexp;
54 final String str; 56 final String str;
55 final List<int> _match; 57 final List<int> _match;
56 static final int MATCH_PAIR = 2; 58 static final int MATCH_PAIR = 2;
57 } 59 }
58 60
59 61
60 class JSSyntaxRegExp implements RegExp { 62 class JSSyntaxRegExp implements RegExp {
61 const factory JSSyntaxRegExp( 63 const factory JSSyntaxRegExp(
62 String pattern, 64 String pattern,
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 112
111 bool get multiLine() native "JSSyntaxRegExp_multiLine"; 113 bool get multiLine() native "JSSyntaxRegExp_multiLine";
112 114
113 bool get ignoreCase() native "JSSyntaxRegExp_ignoreCase"; 115 bool get ignoreCase() native "JSSyntaxRegExp_ignoreCase";
114 116
115 int get _groupCount() native "JSSyntaxRegExp_getGroupCount"; 117 int get _groupCount() native "JSSyntaxRegExp_getGroupCount";
116 118
117 List _ExecuteMatch(String str, int start_index) 119 List _ExecuteMatch(String str, int start_index)
118 native "JSSyntaxRegExp_ExecuteMatch"; 120 native "JSSyntaxRegExp_ExecuteMatch";
119 } 121 }
OLDNEW
« no previous file with comments | « no previous file | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698