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

Side by Side Diff: lib/src/parser.dart

Issue 1575233006: Get rid of all the library tags. (Closed) Base URL: git@github.com:dart-lang/args@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « lib/src/option.dart ('k') | lib/src/usage.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library args.src.parser;
6
7 import 'arg_parser.dart'; 5 import 'arg_parser.dart';
8 import 'arg_results.dart'; 6 import 'arg_results.dart';
9 import 'option.dart'; 7 import 'option.dart';
10 8
11 final _SOLO_OPT = new RegExp(r'^-([a-zA-Z0-9])$'); 9 final _SOLO_OPT = new RegExp(r'^-([a-zA-Z0-9])$');
12 final _ABBR_OPT = new RegExp(r'^-([a-zA-Z0-9]+)(.*)$'); 10 final _ABBR_OPT = new RegExp(r'^-([a-zA-Z0-9]+)(.*)$');
13 final _LONG_OPT = new RegExp(r'^--([a-zA-Z\-_0-9]+)(=(.*))?$'); 11 final _LONG_OPT = new RegExp(r'^--([a-zA-Z\-_0-9]+)(=(.*))?$');
14 12
15 /// The actual argument parsing class. 13 /// The actual argument parsing class.
16 /// 14 ///
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 } 278 }
281 279
282 /// Validates that [value] is allowed as a value of [option]. 280 /// Validates that [value] is allowed as a value of [option].
283 void _validateAllowed(Option option, String value) { 281 void _validateAllowed(Option option, String value) {
284 if (option.allowed == null) return; 282 if (option.allowed == null) return;
285 283
286 validate(option.allowed.contains(value), 284 validate(option.allowed.contains(value),
287 '"$value" is not an allowed value for option "${option.name}".'); 285 '"$value" is not an allowed value for option "${option.name}".');
288 } 286 }
289 } 287 }
OLDNEW
« no previous file with comments | « lib/src/option.dart ('k') | lib/src/usage.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698