OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 /** | 5 /** |
6 * Parser support for transforming raw command-line arguments into a set | 6 * Parser support for transforming raw command-line arguments into a set |
7 * of options and values. | 7 * of options and values. |
8 * | 8 * |
9 * This library supports [GNU][] and [POSIX][] style options, and it works | 9 * This library supports [GNU][] and [POSIX][] style options, and it works |
10 * in both server-side and client-side apps. | 10 * in both server-side and client-side apps. |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 * | 254 * |
255 * To assist the formatting of the usage help, single-line help text is | 255 * To assist the formatting of the usage help, single-line help text is |
256 * followed by a single new line. Options with multi-line help text are | 256 * followed by a single new line. Options with multi-line help text are |
257 * followed by two new lines. This provides spatial diversity between options. | 257 * followed by two new lines. This provides spatial diversity between options. |
258 * | 258 * |
259 * [posix]: http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.h
tml#tag_12_02 | 259 * [posix]: http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.h
tml#tag_12_02 |
260 * [gnu]: http://www.gnu.org/prep/standards/standards.html#Command_002dLine-Inte
rfaces | 260 * [gnu]: http://www.gnu.org/prep/standards/standards.html#Command_002dLine-Inte
rfaces |
261 */ | 261 */ |
262 library args; | 262 library args; |
263 | 263 |
264 import 'package:collection_helpers/wrappers.dart'; | 264 import 'package:collection/wrappers.dart'; |
265 | 265 |
266 import 'src/parser.dart'; | 266 import 'src/parser.dart'; |
267 import 'src/usage.dart'; | 267 import 'src/usage.dart'; |
268 import 'src/options.dart'; | 268 import 'src/options.dart'; |
269 export 'src/options.dart'; | 269 export 'src/options.dart'; |
270 | 270 |
271 /** | 271 /** |
272 * A class for taking a list of raw command line arguments and parsing out | 272 * A class for taking a list of raw command line arguments and parsing out |
273 * options and flags from them. | 273 * options and flags from them. |
274 */ | 274 */ |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
446 'Could not find an option named "$name".'); | 446 'Could not find an option named "$name".'); |
447 } | 447 } |
448 | 448 |
449 return _options[name]; | 449 return _options[name]; |
450 } | 450 } |
451 | 451 |
452 /** Get the names of the options as an [Iterable]. */ | 452 /** Get the names of the options as an [Iterable]. */ |
453 Iterable<String> get options => _options.keys; | 453 Iterable<String> get options => _options.keys; |
454 } | 454 } |
455 | 455 |
OLD | NEW |