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

Side by Side Diff: runtime/bin/process_impl.dart

Issue 10977027: Update all occurrences of raw strings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Don't disable just yet. Created 8 years, 2 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
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 _exit(int status) native "Exit"; 5 _exit(int status) native "Exit";
6 6
7 class _ProcessStartStatus { 7 class _ProcessStartStatus {
8 int _errorCode; // Set to OS error code if process start failed. 8 int _errorCode; // Set to OS error code if process start failed.
9 String _errorMessage; // Set to OS error message if process start failed. 9 String _errorMessage; // Set to OS error message if process start failed.
10 } 10 }
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 var quotePos = argument.indexOf('"', nextPos); 91 var quotePos = argument.indexOf('"', nextPos);
92 while (quotePos != -1) { 92 while (quotePos != -1) {
93 var numBackslash = 0; 93 var numBackslash = 0;
94 var pos = quotePos - 1; 94 var pos = quotePos - 1;
95 while (pos >= 0 && argument.charCodeAt(pos) == backslash) { 95 while (pos >= 0 && argument.charCodeAt(pos) == backslash) {
96 numBackslash++; 96 numBackslash++;
97 pos--; 97 pos--;
98 } 98 }
99 sb.add(argument.substring(nextPos, quotePos - numBackslash)); 99 sb.add(argument.substring(nextPos, quotePos - numBackslash));
100 for (var i = 0; i < numBackslash; i++) { 100 for (var i = 0; i < numBackslash; i++) {
101 sb.add(@'\\'); 101 sb.add(r'\\');
102 } 102 }
103 sb.add(@'\"'); 103 sb.add(r'\"');
104 nextPos = quotePos + 1; 104 nextPos = quotePos + 1;
105 quotePos = argument.indexOf('"', nextPos); 105 quotePos = argument.indexOf('"', nextPos);
106 } 106 }
107 sb.add(argument.substring(nextPos, argument.length)); 107 sb.add(argument.substring(nextPos, argument.length));
108 result = sb.toString(); 108 result = sb.toString();
109 109
110 // Add '"' at the beginning and end and replace all '\' at 110 // Add '"' at the beginning and end and replace all '\' at
111 // the end with two '\'. 111 // the end with two '\'.
112 sb = new StringBuffer('"'); 112 sb = new StringBuffer('"');
113 sb.add(result); 113 sb.add(result);
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 390
391 class _ProcessResult implements ProcessResult { 391 class _ProcessResult implements ProcessResult {
392 const _ProcessResult(int this.exitCode, 392 const _ProcessResult(int this.exitCode,
393 String this.stdout, 393 String this.stdout,
394 String this.stderr); 394 String this.stderr);
395 395
396 final int exitCode; 396 final int exitCode;
397 final String stdout; 397 final String stdout;
398 final String stderr; 398 final String stderr;
399 } 399 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698