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

Side by Side Diff: compiler/lib/implementation/string.dart

Issue 8966029: Report errors and warnings for hiding elements, issue 572. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes for comments Created 9 years 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
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 StringImplementation implements String native "String" { 5 class StringImplementation implements String native "String" {
6 factory StringImplementation.fromValues(List<int> values) { 6 factory StringImplementation.fromValues(List<int> values) {
7 return _newFromValues(values); 7 return _newFromValues(values);
8 } 8 }
9 9
10 String operator[](int index) { 10 String operator[](int index) {
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 class _StringMatch implements Match { 207 class _StringMatch implements Match {
208 const _StringMatch(int this._start, 208 const _StringMatch(int this._start,
209 String this.str, 209 String this.str,
210 String this.pattern); 210 String this.pattern);
211 211
212 int start() => _start; 212 int start() => _start;
213 int end() => _start + pattern.length; 213 int end() => _start + pattern.length;
214 String operator[](int g) => group(g); 214 String operator[](int g) => group(g);
215 int groupCount() => 0; 215 int groupCount() => 0;
216 216
217 String group(int group) { 217 String group(int group_) {
218 if (group != 0) { 218 if (group_ != 0) {
219 throw new IndexOutOfRangeException(group); 219 throw new IndexOutOfRangeException(group_);
220 } 220 }
221 return pattern; 221 return pattern;
222 } 222 }
223 223
224 List<String> groups(List<int> groups) { 224 List<String> groups(List<int> groups_) {
225 List<String> result = new List<String>(); 225 List<String> result = new List<String>();
226 for (int g in groups) { 226 for (int g in groups_) {
227 result.add(group(g)); 227 result.add(group(g));
228 } 228 }
229 return result; 229 return result;
230 } 230 }
231 231
232 final int _start; 232 final int _start;
233 final String str; 233 final String str;
234 final String pattern; 234 final String pattern;
235 } 235 }
OLDNEW
« no previous file with comments | « compiler/lib/implementation/regexp.dart ('k') | corelib/src/implementation/dual_pivot_quicksort.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698