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

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

Issue 70073003: Combine unmodifiable_collection package into collection_helpers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Remove references from other packages. Created 7 years, 1 month 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
« no previous file with comments | « pkg/args/lib/args.dart ('k') | pkg/args/pubspec.yaml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 library options; 1 library options;
2 2
3 import 'package:unmodifiable_collection/unmodifiable_collection.dart'; 3 import 'package:collection_helpers/wrappers.dart';
4 4
5 /** 5 /**
6 * 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 */ 7 */
8 class Option { 8 class Option {
9 final String name; 9 final String name;
10 final String abbreviation; 10 final String abbreviation;
11 final List<String> allowed; 11 final List<String> allowed;
12 final defaultValue; 12 final defaultValue;
13 final Function callback; 13 final Function callback;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 } 46 }
47 47
48 if (_invalidChars.hasMatch(abbreviation)) { 48 if (_invalidChars.hasMatch(abbreviation)) {
49 throw new ArgumentError('Abbreviation is an invalid character.'); 49 throw new ArgumentError('Abbreviation is an invalid character.');
50 } 50 }
51 } 51 }
52 } 52 }
53 53
54 static final _invalidChars = new RegExp(r'''[ \t\r\n"'\\/]'''); 54 static final _invalidChars = new RegExp(r'''[ \t\r\n"'\\/]''');
55 } 55 }
OLDNEW
« no previous file with comments | « pkg/args/lib/args.dart ('k') | pkg/args/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698