OLD | NEW |
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 * |
11 * This will create a "docs" directory with the docs for your libraries. To | 11 * This will create a "docs" directory with the docs for your libraries. To |
12 * create these beautiful docs, dartdoc parses your library and every library | 12 * create these beautiful docs, dartdoc parses your library and every library |
13 * it imports (recursively). From each library, it parses all classes and | 13 * it imports (recursively). From each library, it parses all classes and |
14 * members, finds the associated doc comments and builds crosslinked docs from | 14 * members, finds the associated doc comments and builds crosslinked docs from |
15 * them. | 15 * them. |
16 */ | 16 */ |
17 #library('dartdoc'); | 17 #library('dartdoc'); |
18 | 18 |
19 #import('dart:io'); | 19 #import('dart:io'); |
| 20 #import('dart:math'); |
20 #import('dart:uri'); | 21 #import('dart:uri'); |
21 #import('dart:json'); | 22 #import('dart:json'); |
22 #import('mirrors/mirrors.dart'); | 23 #import('mirrors/mirrors.dart'); |
23 #import('mirrors/mirrors_util.dart'); | 24 #import('mirrors/mirrors_util.dart'); |
24 #import('mirrors/dart2js_mirror.dart', prefix: 'dart2js'); | 25 #import('mirrors/dart2js_mirror.dart', prefix: 'dart2js'); |
25 #import('classify.dart'); | 26 #import('classify.dart'); |
26 #import('markdown.dart', prefix: 'md'); | 27 #import('markdown.dart', prefix: 'md'); |
27 #import('../../lib/compiler/implementation/scanner/scannerlib.dart', | 28 #import('../../lib/compiler/implementation/scanner/scannerlib.dart', |
28 prefix: 'dart2js'); | 29 prefix: 'dart2js'); |
29 #import('../../lib/compiler/implementation/library_map.dart'); | 30 #import('../../lib/compiler/implementation/library_map.dart'); |
(...skipping 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1588 } | 1589 } |
1589 | 1590 |
1590 /** | 1591 /** |
1591 * Returns [:true:] if [type] should be regarded as an exception. | 1592 * Returns [:true:] if [type] should be regarded as an exception. |
1592 */ | 1593 */ |
1593 bool isException(TypeMirror type) { | 1594 bool isException(TypeMirror type) { |
1594 return type.simpleName.endsWith('Exception'); | 1595 return type.simpleName.endsWith('Exception'); |
1595 } | 1596 } |
1596 } | 1597 } |
1597 | 1598 |
OLD | NEW |