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

Side by Side Diff: pkg/args/args.dart

Issue 10919146: Get rid of a lot of () for getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « lib/utf/utf_core.dart ('k') | pkg/dartdoc/ast.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 /** 5 /**
6 * This library lets you define parsers for parsing raw command-line arguments 6 * This library lets you define parsers for parsing raw command-line arguments
7 * into a set of options and values using [GNU][] and [POSIX][] style options. 7 * into a set of options and values using [GNU][] and [POSIX][] style options.
8 * 8 *
9 * ## Defining options ## 9 * ## Defining options ##
10 * 10 *
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 operator [](String name) { 526 operator [](String name) {
527 if (!_options.containsKey(name)) { 527 if (!_options.containsKey(name)) {
528 throw new IllegalArgumentException( 528 throw new IllegalArgumentException(
529 'Could not find an option named "$name".'); 529 'Could not find an option named "$name".');
530 } 530 }
531 531
532 return _options[name]; 532 return _options[name];
533 } 533 }
534 534
535 /** Get the names of the options as a [Collection]. */ 535 /** Get the names of the options as a [Collection]. */
536 Collection<String> get options() => _options.getKeys(); 536 Collection<String> get options => _options.getKeys();
537 } 537 }
538 538
539 class _Option { 539 class _Option {
540 final String name; 540 final String name;
541 final String abbreviation; 541 final String abbreviation;
542 final List allowed; 542 final List allowed;
543 final defaultValue; 543 final defaultValue;
544 final Function callback; 544 final Function callback;
545 final String help; 545 final String help;
546 final Map<String, String> allowedHelp; 546 final Map<String, String> allowedHelp;
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 allowedBuffer.add(allowed); 765 allowedBuffer.add(allowed);
766 if (allowed == option.defaultValue) { 766 if (allowed == option.defaultValue) {
767 allowedBuffer.add(' (default)'); 767 allowedBuffer.add(' (default)');
768 } 768 }
769 first = false; 769 first = false;
770 } 770 }
771 allowedBuffer.add(']'); 771 allowedBuffer.add(']');
772 return allowedBuffer.toString(); 772 return allowedBuffer.toString();
773 } 773 }
774 } 774 }
OLDNEW
« no previous file with comments | « lib/utf/utf_core.dart ('k') | pkg/dartdoc/ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698