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

Side by Side Diff: frog/lib/string_implementation.dart

Issue 9963029: Fix some warnings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload (due to error messages during upload) Created 8 years, 8 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 | « frog/lib/date_implementation.dart ('k') | lib/dom/frog/dom_frog.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) 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 //String.prototype.get$length = function() { 5 //String.prototype.get$length = function() {
6 // return this.length; 6 // return this.length;
7 //} 7 //}
8 8
9 // TODO(jimhug): Unify with code from compiler/lib/implementation. 9 // TODO(jimhug): Unify with code from compiler/lib/implementation.
10 class StringImplementation implements String native "String" { 10 class StringImplementation implements String native "String" {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 if (pattern is RegExp) return _splitRegExp(pattern); 84 if (pattern is RegExp) return _splitRegExp(pattern);
85 throw "String.split(Pattern) unimplemented."; 85 throw "String.split(Pattern) unimplemented.";
86 } 86 }
87 87
88 List<String> _split(String pattern) native 88 List<String> _split(String pattern) native
89 "'use strict'; return this.split(pattern);"; 89 "'use strict'; return this.split(pattern);";
90 90
91 List<String> _splitRegExp(RegExp pattern) native 91 List<String> _splitRegExp(RegExp pattern) native
92 "'use strict'; return this.split(pattern.re);"; 92 "'use strict'; return this.split(pattern.re);";
93 93
94 Iterable<Match> allMatches(String str) {
95 throw "String.allMatches(String str) unimplemented.";
96 }
94 /* 97 /*
95 Iterable<Match> allMatches(String str) { 98 Iterable<Match> allMatches(String str) {
96 List<Match> result = []; 99 List<Match> result = [];
97 if (this.isEmpty()) return result; 100 if (this.isEmpty()) return result;
98 int length = this.length; 101 int length = this.length;
99 102
100 int ix = 0; 103 int ix = 0;
101 while (ix < str.length) { 104 while (ix < str.length) {
102 int foundIx = str.indexOf(this, ix); 105 int foundIx = str.indexOf(this, ix);
103 if (foundIx < 0) break; 106 if (foundIx < 0) break;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 result.add(group(g)); 175 result.add(group(g));
173 } 176 }
174 return result; 177 return result;
175 } 178 }
176 179
177 final int _start; 180 final int _start;
178 final String str; 181 final String str;
179 final String pattern; 182 final String pattern;
180 } 183 }
181 */ 184 */
OLDNEW
« no previous file with comments | « frog/lib/date_implementation.dart ('k') | lib/dom/frog/dom_frog.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698