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

Side by Side Diff: pkg/docgen/lib/docgen.dart

Issue 18237002: Failing gracefully (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 | « no previous file | 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) 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 /** 5 /**
6 * **docgen** is a tool for creating machine readable representations of Dart 6 * **docgen** is a tool for creating machine readable representations of Dart
7 * code metadata, including: classes, members, comments and annotations. 7 * code metadata, including: classes, members, comments and annotations.
8 * 8 *
9 * docgen is run on a `.dart` file or a directory containing `.dart` files. 9 * docgen is run on a `.dart` file or a directory containing `.dart` files.
10 * 10 *
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 Uri packageUri = null; 175 Uri packageUri = null;
176 if (packageRoot != null) { 176 if (packageRoot != null) {
177 packageUri = currentDirectory.resolve(appendSlash('$packageRoot')); 177 packageUri = currentDirectory.resolve(appendSlash('$packageRoot'));
178 } 178 }
179 List<Uri> librariesUri = <Uri>[]; 179 List<Uri> librariesUri = <Uri>[];
180 libraries.forEach((library) { 180 libraries.forEach((library) {
181 librariesUri.add(currentDirectory.resolve(library)); 181 librariesUri.add(currentDirectory.resolve(library));
182 }); 182 });
183 return dart2js.analyze(librariesUri, libraryUri, packageUri, 183 return dart2js.analyze(librariesUri, libraryUri, packageUri,
184 provider.readStringFromUri, diagnosticHandler, 184 provider.readStringFromUri, diagnosticHandler,
185 ['--preserve-comments', '--categories=Client,Server']); 185 ['--preserve-comments', '--categories=Client,Server'])
186 ..catchError((error) {
187 logger.severe('Error: Failed to create mirror system. ');
188 // To avoid printing the stack trace.
189 exit(1);
Andrei Mouravski 2013/06/28 22:57:34 I think you can actually extract the stack trace i
janicejl 2013/06/28 23:47:12 Have talked to Nathan. Dart2js analyze throws a
190 });
186 } 191 }
187 192
188 /** 193 /**
189 * Creates documentation for filtered libraries. 194 * Creates documentation for filtered libraries.
190 */ 195 */
191 void _documentLibraries(List<LibraryMirror> libraries) { 196 void _documentLibraries(List<LibraryMirror> libraries) {
192 libraries.forEach((lib) { 197 libraries.forEach((lib) {
193 // Files belonging to the SDK have a uri that begins with 'dart:'. 198 // Files belonging to the SDK have a uri that begins with 'dart:'.
194 if (includeSdk || !lib.uri.toString().startsWith('dart:')) { 199 if (includeSdk || !lib.uri.toString().startsWith('dart:')) {
195 var library = generateLibrary(lib); 200 var library = generateLibrary(lib);
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 parameterMap['qualifiedname'] = qualifiedName; 551 parameterMap['qualifiedname'] = qualifiedName;
547 parameterMap['optional'] = isOptional.toString(); 552 parameterMap['optional'] = isOptional.toString();
548 parameterMap['named'] = isNamed.toString(); 553 parameterMap['named'] = isNamed.toString();
549 parameterMap['default'] = hasDefaultValue.toString(); 554 parameterMap['default'] = hasDefaultValue.toString();
550 parameterMap['type'] = type; 555 parameterMap['type'] = type;
551 parameterMap['value'] = defaultValue; 556 parameterMap['value'] = defaultValue;
552 parameterMap['annotations'] = new List.from(annotations); 557 parameterMap['annotations'] = new List.from(annotations);
553 return parameterMap; 558 return parameterMap;
554 } 559 }
555 } 560 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698