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

Side by Side Diff: pkg/args/lib/src/options.dart

Issue 271183002: Modernize the docs for args. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 library options; 1 library options;
2 2
3 import 'package:collection/wrappers.dart'; 3 import 'package:collection/wrappers.dart';
4 4
5 /** 5 /// A command-line option. Includes both flags and options which take a value.
6 * A command-line option. Includes both flags and options which take a value.
7 */
8 class Option { 6 class Option {
9 final String name; 7 final String name;
10 final String abbreviation; 8 final String abbreviation;
11 final List<String> allowed; 9 final List<String> allowed;
12 final defaultValue; 10 final defaultValue;
13 final Function callback; 11 final Function callback;
14 final String help; 12 final String help;
15 final Map<String, String> allowedHelp; 13 final Map<String, String> allowedHelp;
16 final bool isFlag; 14 final bool isFlag;
17 final bool negatable; 15 final bool negatable;
(...skipping 28 matching lines...) Expand all
46 } 44 }
47 45
48 if (_invalidChars.hasMatch(abbreviation)) { 46 if (_invalidChars.hasMatch(abbreviation)) {
49 throw new ArgumentError('Abbreviation is an invalid character.'); 47 throw new ArgumentError('Abbreviation is an invalid character.');
50 } 48 }
51 } 49 }
52 } 50 }
53 51
54 static final _invalidChars = new RegExp(r'''[ \t\r\n"'\\/]'''); 52 static final _invalidChars = new RegExp(r'''[ \t\r\n"'\\/]''');
55 } 53 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698