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

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

Issue 23913009: Add support for hidden options to pkg/args. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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/options.dart » ('j') | no next file with comments »
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 0b877cd86003b5c7a366e52f8752671ef439274a..ff5256eff66e7a3ccb283ff3c5e5ce88374e4948 100644
--- a/pkg/args/lib/args.dart
+++ b/pkg/args/lib/args.dart
@@ -334,15 +334,17 @@ class ArgParser {
*/
void addOption(String name, {String abbr, String help, List<String> allowed,
Map<String, String> allowedHelp, String defaultsTo,
- void callback(value), bool allowMultiple: false}) {
+ void callback(value), bool allowMultiple: false,
+ bool isHidden: false}) {
Bob Nystrom 2013/09/24 20:57:07 Let's do "hide" for the named parameter.
nweiz 2013/09/24 21:01:17 Done.
_addOption(name, abbr, help, allowed, allowedHelp, defaultsTo,
- callback, isFlag: false, allowMultiple: allowMultiple);
+ callback, isFlag: false, allowMultiple: allowMultiple,
+ isHidden: isHidden);
}
void _addOption(String name, String abbr, String help, List<String> allowed,
Map<String, String> allowedHelp, defaultsTo,
void callback(value), {bool isFlag, bool negatable: false,
- bool allowMultiple: false}) {
+ bool allowMultiple: false, bool isHidden: false}) {
// Make sure the name isn't in use.
if (_options.containsKey(name)) {
throw new ArgumentError('Duplicate option "$name".');
@@ -359,7 +361,7 @@ class ArgParser {
_options[name] = new Option(name, abbr, help, allowed, allowedHelp,
defaultsTo, callback, isFlag: isFlag, negatable: negatable,
- allowMultiple: allowMultiple);
+ allowMultiple: allowMultiple, isHidden: isHidden);
}
/**
« no previous file with comments | « no previous file | pkg/args/lib/src/options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698