Chromium Code Reviews| Index: runtime/lib/regexp.dart |
| diff --git a/runtime/lib/regexp.dart b/runtime/lib/regexp.dart |
| index e2f777e9ad5319301e855eb3cd85c489fba206be..fb49db99bf74be6572868fc3f7bf44addec4c4ea 100644 |
| --- a/runtime/lib/regexp.dart |
| +++ b/runtime/lib/regexp.dart |
| @@ -13,26 +13,26 @@ class JSRegExpMatch implements Match { |
| return _end(0); |
| } |
| - int _start(int group) { |
| - return _match[(group * _kMatchPair)]; |
| + int _start(int groupIdx) { |
|
Ivan Posva
2012/03/14 05:34:05
What is the warning here?
zundel
2012/03/14 12:56:21
parameter 'group' shadows the method 'group' in th
|
| + return _match[(groupIdx * _kMatchPair)]; |
| } |
| - int _end(int group) { |
| - return _match[(group * _kMatchPair) + 1]; |
| + int _end(int groupIdx) { |
| + return _match[(groupIdx * _kMatchPair) + 1]; |
| } |
| - String group(int group) { |
| - return str.substringUnchecked_(_start(group), _end(group)); |
| + String group(int groupIdx) { |
| + return str.substringUnchecked_(_start(groupIdx), _end(groupIdx)); |
| } |
| - String operator [](int group) { |
| - return str.substringUnchecked_(_start(group), _end(group)); |
| + String operator [](int groupIdx) { |
| + return str.substringUnchecked_(_start(groupIdx), _end(groupIdx)); |
| } |
| - List<String> groups(List<int> groups) { |
| - var groupsList = new List<String>(groups.length); |
| - for (int i = 0; i < groups.length; i++) { |
| - int grp_idx = groups[i]; |
| + List<String> groups(List<int> groupsSpec) { |
| + var groupsList = new List<String>(groupsSpec.length); |
| + for (int i = 0; i < groupsSpec.length; i++) { |
| + int grp_idx = groupsSpec[i]; |
| groupsList[i] = str.substringUnchecked_(_start(grp_idx), _end(grp_idx)); |
| } |
| return groupsList; |