Chromium Code Reviews| OLD | NEW |
|---|---|
| 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. | 7 // Splits a line into a list of string args. |
| 8 List<String> _splitLine(String line) { | 8 List<String> _splitLine(String line) { |
| 9 var args = line.split(' ').where((arg) { | 9 var args = line.split(' ').where((arg) { |
| 10 return arg != ' ' && arg != ''; | 10 return arg != ' ' && arg != ''; |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 183 | 183 |
| 184 // A node in the command tree. | 184 // A node in the command tree. |
| 185 abstract class Command extends _CommandBase { | 185 abstract class Command extends _CommandBase { |
| 186 Command(this.name, List<Command> children) : super(children); | 186 Command(this.name, List<Command> children) : super(children); |
| 187 | 187 |
| 188 final String name; | 188 final String name; |
| 189 String get fullName { | 189 String get fullName { |
| 190 if (_parent is RootCommand) { | 190 if (_parent is RootCommand) { |
| 191 return name; | 191 return name; |
| 192 } else { | 192 } else { |
| 193 return '${_parent.fullName} $name'; | 193 Command parent = _parent; |
|
Cutch
2015/02/13 19:30:52
var parent = _parent;
turnidge
2015/02/13 22:37:19
Acknowledged.
| |
| 194 return '${parent.fullName} $name'; | |
| 194 } | 195 } |
| 195 } | 196 } |
| 196 | 197 |
| 197 toString() => 'Command(${name})'; | 198 toString() => 'Command(${name})'; |
| 198 } | 199 } |
| OLD | NEW |