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

Side by Side Diff: runtime/observatory/lib/src/cli/command.dart

Issue 1076003004: Fix all Observatory warnings/errors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 | « no previous file | runtime/observatory/lib/src/debugger/source_location.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 part of cli; 5 part of cli;
6 6
7 // Splits a line into a list of string args. Each arg retains any 7 // Splits a line into a list of string args. Each arg retains any
8 // trailing whitespace so that we can reconstruct the original command 8 // trailing whitespace so that we can reconstruct the original command
9 // line from the pieces. 9 // line from the pieces.
10 List<String> _splitLine(String line) { 10 List<String> _splitLine(String line) {
11 line = line.trimLeft(); 11 line = line.trimLeft();
12 var args = []; 12 var args = [];
13 var codes = line.codeUnits;
14
15 int pos = 0; 13 int pos = 0;
16 while (pos < line.length) { 14 while (pos < line.length) {
17 int startPos = pos; 15 int startPos = pos;
18 16
19 // Advance to end of word. 17 // Advance to end of word.
20 for (; pos < line.length && line[pos] != ' '; pos++); 18 for (; pos < line.length && line[pos] != ' '; pos++);
21 19
22 // Advance to end of spaces. 20 // Advance to end of spaces.
23 for (; pos < line.length && line[pos] == ' '; pos++); 21 for (; pos < line.length && line[pos] == ' '; pos++);
24 22
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 if (_parent is RootCommand) { 240 if (_parent is RootCommand) {
243 return name; 241 return name;
244 } else { 242 } else {
245 Command parent = _parent; 243 Command parent = _parent;
246 return '${parent.fullName} $name'; 244 return '${parent.fullName} $name';
247 } 245 }
248 } 246 }
249 247
250 toString() => 'Command(${name})'; 248 toString() => 'Command(${name})';
251 } 249 }
OLDNEW
« no previous file with comments | « no previous file | runtime/observatory/lib/src/debugger/source_location.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698