 Chromium Code Reviews
 Chromium Code Reviews Issue 12545013:
  Added the continueParsing option to ArgParser.  (Closed) 
  Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
    
  
    Issue 12545013:
  Added the continueParsing option to ArgParser.  (Closed) 
  Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart| Index: pkg/args/lib/args.dart | 
| diff --git a/pkg/args/lib/args.dart b/pkg/args/lib/args.dart | 
| index 9e6252a5a2b681ffba321741056ddd25183cc852..e9e39dbdb969db4903c9a0b56b73c03867514bc4 100644 | 
| --- a/pkg/args/lib/args.dart | 
| +++ b/pkg/args/lib/args.dart | 
| @@ -347,9 +347,20 @@ class ArgParser { | 
| /** | 
| * Parses [args], a list of command-line arguments, matches them against the | 
| * flags and options defined by this parser, and returns the result. | 
| + * | 
| + * If [parseAllOptions] is set, the parser will continue parsing even after it | 
| 
Bob Nystrom
2013/06/20 00:33:36
How about "allowTrailingOptions"?
 
Andrei Mouravski
2013/06/22 00:54:02
Done.
 | 
| + * finds an argument that is neither an option nor a command. This allows | 
| + * options to be specified after command parameters. | 
| + * | 
| + * [parseAllOptions] is false by default, so when a non-option, non-command | 
| + * argument is encountered, it and any remaining arguments are passed to the | 
| + * leafmost command. | 
| 
Bob Nystrom
2013/06/20 00:33:36
"any remaining arguments are passed to the leafmos
 
Andrei Mouravski
2013/06/22 00:54:02
Done.
 | 
| + * | 
| + * An argument that looks like an option, but does not match any option will | 
| + * throw a [FormatException], regardless of the value of [parseAllOptions]. | 
| */ | 
| - ArgResults parse(List<String> args) => | 
| - new Parser(null, this, args.toList()).parse(); | 
| + ArgResults parse(List<String> args, {bool parseAllOptions: false}) => | 
| 
Bob Nystrom
2013/06/20 00:33:36
Instead of using a default here, initialize the de
 
Andrei Mouravski
2013/06/22 00:54:02
Done.
 | 
| + new Parser(null, this, args.toList(), parseAllOptions).parse(); | 
| /** | 
| * Generates a string displaying usage information for the defined options. |