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

Side by Side Diff: sdk/lib/_internal/dartdoc/bin/dartdoc.dart

Issue 12545013: Added the continueParsing option to ArgParser. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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
« pkg/args/test/parse_test.dart ('K') | « pkg/args/test/parse_test.dart ('k') | no next file » | 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 * To generate docs for a library, run this script with the path to an 6 * To generate docs for a library, run this script with the path to an
7 * entrypoint .dart file, like: 7 * entrypoint .dart file, like:
8 * 8 *
9 * $ dart dartdoc.dart foo.dart 9 * $ dart dartdoc.dart foo.dart
10 * 10 *
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 if (args.isEmpty) { 174 if (args.isEmpty) {
175 print('No arguments provided.'); 175 print('No arguments provided.');
176 print(USAGE); 176 print(USAGE);
177 print(argParser.getUsage()); 177 print(argParser.getUsage());
178 exit(1); 178 exit(1);
179 } 179 }
180 180
181 final entrypoints = <Path>[]; 181 final entrypoints = <Path>[];
182 try { 182 try {
183 final option = argParser.parse(args); 183 final option = argParser.parse(args, continueParsing: true);
184 184
185 // This checks to see if the root of all entrypoints is the same. 185 // This checks to see if the root of all entrypoints is the same.
186 // If it is not, then we display a warning, as package imports might fail. 186 // If it is not, then we display a warning, as package imports might fail.
187 var entrypointRoot; 187 var entrypointRoot;
188 for(final arg in option.rest) { 188 for(final arg in option.rest) {
189 var entrypoint = new Path(arg); 189 var entrypoint = new Path(arg);
190 entrypoints.add(entrypoint); 190 entrypoints.add(entrypoint);
191 191
192 if (entrypointRoot == null) { 192 if (entrypointRoot == null) {
193 entrypointRoot = entrypoint.directoryPath; 193 entrypointRoot = entrypoint.directoryPath;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 '${dartdoc.totalTypes} types, and ${dartdoc.totalMembers} ' 251 '${dartdoc.totalTypes} types, and ${dartdoc.totalMembers} '
252 'members.'); 252 'members.');
253 } 253 }
254 }); 254 });
255 }, onError: (AsyncError asyncError) { 255 }, onError: (AsyncError asyncError) {
256 print('Generation failed: ${asyncError.error}'); 256 print('Generation failed: ${asyncError.error}');
257 dartdoc.cleanup(); 257 dartdoc.cleanup();
258 exit(1); 258 exit(1);
259 }); 259 });
260 } 260 }
OLDNEW
« pkg/args/test/parse_test.dart ('K') | « pkg/args/test/parse_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698