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

Unified Diff: pkg/args/lib/args.dart

Issue 12545013: Added the continueParsing option to ArgParser. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Style + commentary. Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/args/lib/src/parser.dart » ('j') | pkg/args/test/parse_test.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/args/lib/args.dart
diff --git a/pkg/args/lib/args.dart b/pkg/args/lib/args.dart
index be1a6efa4d819550aee0c9a8819d7c361ac5c2a3..db21ed7baad04a158a7e15795e8e1036e1afd09c 100644
--- a/pkg/args/lib/args.dart
+++ b/pkg/args/lib/args.dart
@@ -314,9 +314,13 @@ 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 [continueParsing] is set, the parser will continue parsing even after it
+ * finds an argument that is not an option. This allows you to specify options
+ * after your command parameters.
*/
- ArgResults parse(List<String> args) =>
- new Parser(null, this, args.toList()).parse();
+ ArgResults parse(List<String> args, {bool continueParsing: false}) =>
+ new Parser(null, this, args.toList(), continueParsing).parse();
/**
* Generates a string displaying usage information for the defined options.
« no previous file with comments | « no previous file | pkg/args/lib/src/parser.dart » ('j') | pkg/args/test/parse_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698