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

Side by Side Diff: lib/src/arg_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/command_runner.dart ('k') | lib/src/arg_results.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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.arg_parser;
6
7 import 'dart:collection'; 5 import 'dart:collection';
8 6
9 import 'arg_results.dart'; 7 import 'arg_results.dart';
10 import 'option.dart'; 8 import 'option.dart';
11 import 'parser.dart'; 9 import 'parser.dart';
12 import 'usage.dart'; 10 import 'usage.dart';
13 11
14 /// A class for taking a list of raw command line arguments and parsing out 12 /// A class for taking a list of raw command line arguments and parsing out
15 /// options and flags from them. 13 /// options and flags from them.
16 class ArgParser { 14 class ArgParser {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 return options[option].defaultValue; 152 return options[option].defaultValue;
155 } 153 }
156 154
157 /// Finds the option whose abbreviation is [abbr], or `null` if no option has 155 /// Finds the option whose abbreviation is [abbr], or `null` if no option has
158 /// that abbreviation. 156 /// that abbreviation.
159 Option findByAbbreviation(String abbr) { 157 Option findByAbbreviation(String abbr) {
160 return options.values.firstWhere((option) => option.abbreviation == abbr, 158 return options.values.firstWhere((option) => option.abbreviation == abbr,
161 orElse: () => null); 159 orElse: () => null);
162 } 160 }
163 } 161 }
OLDNEW
« no previous file with comments | « lib/command_runner.dart ('k') | lib/src/arg_results.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698