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

Side by Side Diff: sdk/lib/uri/uri.dart

Issue 11369210: Make RegExp constructor non-const. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Clean up status files. 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 | « sdk/lib/svg/dartium/svg_dartium.dart ('k') | tests/co19/co19-compiler.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) 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 #library('dart:uri'); 5 #library('dart:uri');
6 6
7 #import('dart:math'); 7 #import('dart:math');
8 #import('dart:utf'); 8 #import('dart:utf');
9 9
10 #source('encode_decode.dart'); 10 #source('encode_decode.dart');
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 49
50 static int _parseIntOrZero(String val) { 50 static int _parseIntOrZero(String val) {
51 if (val != null && val != '') { 51 if (val != null && val != '') {
52 return int.parse(val); 52 return int.parse(val);
53 } else { 53 } else {
54 return 0; 54 return 0;
55 } 55 }
56 } 56 }
57 57
58 // NOTE: This code was ported from: closure-library/closure/goog/uri/utils.js 58 // NOTE: This code was ported from: closure-library/closure/goog/uri/utils.js
59 static const RegExp _splitRe = const RegExp( 59 static final RegExp _splitRe = new RegExp(
60 '^' 60 '^'
61 '(?:' 61 '(?:'
62 '([^:/?#.]+)' // scheme - ignore special characters 62 '([^:/?#.]+)' // scheme - ignore special characters
63 // used by other URL parts such as :, 63 // used by other URL parts such as :,
64 // ?, /, #, and . 64 // ?, /, #, and .
65 ':)?' 65 ':)?'
66 '(?://' 66 '(?://'
67 '(?:([^/?#]*)@)?' // userInfo 67 '(?:([^/?#]*)@)?' // userInfo
68 '([\\w\\d\\-\\u0100-\\uffff.%]*)' 68 '([\\w\\d\\-\\u0100-\\uffff.%]*)'
69 // domain - restrict to letters, 69 // domain - restrict to letters,
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 } 230 }
231 231
232 static void _addIfNonEmpty(StringBuffer sb, String test, 232 static void _addIfNonEmpty(StringBuffer sb, String test,
233 String first, String second) { 233 String first, String second) {
234 if ("" != test) { 234 if ("" != test) {
235 sb.add(first == null ? "null" : first); 235 sb.add(first == null ? "null" : first);
236 sb.add(second == null ? "null" : second); 236 sb.add(second == null ? "null" : second);
237 } 237 }
238 } 238 }
239 } 239 }
OLDNEW
« no previous file with comments | « sdk/lib/svg/dartium/svg_dartium.dart ('k') | tests/co19/co19-compiler.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698