| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 use it, from this directory, run: | 6 * To use it, from this directory, run: |
| 7 * | 7 * |
| 8 * $ ./dartdoc <path to .dart file> | 8 * $ ./dartdoc <path to .dart file> |
| 9 * | 9 * |
| 10 * This will create a "docs" directory with the docs for your libraries. To | 10 * This will create a "docs" directory with the docs for your libraries. To |
| 11 * create these beautiful docs, dartdoc parses your library and every library | 11 * create these beautiful docs, dartdoc parses your library and every library |
| 12 * it imports (recursively). From each library, it parses all classes and | 12 * it imports (recursively). From each library, it parses all classes and |
| 13 * members, finds the associated doc comments and builds crosslinked docs from | 13 * members, finds the associated doc comments and builds crosslinked docs from |
| 14 * them. | 14 * them. |
| 15 */ | 15 */ |
| 16 #library('dartdoc'); | 16 #library('dartdoc'); |
| 17 | 17 |
| 18 #import('../../frog/lang.dart'); | 18 #import('../../frog/lang.dart'); |
| 19 #import('../../frog/file_system.dart'); | 19 #import('../../frog/file_system.dart'); |
| 20 #import('../../frog/file_system_node.dart'); | 20 #import('../../frog/file_system_node.dart'); |
| 21 #import('../markdown/lib.dart', prefix: 'md'); | 21 #import('markdown.dart', prefix: 'md'); |
| 22 | 22 |
| 23 #source('classify.dart'); | 23 #source('classify.dart'); |
| 24 #source('comment_map.dart'); | 24 #source('comment_map.dart'); |
| 25 #source('files.dart'); | 25 #source('files.dart'); |
| 26 #source('utils.dart'); | 26 #source('utils.dart'); |
| 27 | 27 |
| 28 /** | 28 /** |
| 29 * Run this from the `utils/dartdoc` directory. | 29 * Run this from the `utils/dartdoc` directory. |
| 30 */ | 30 */ |
| 31 void main() { | 31 void main() { |
| (...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 | 782 |
| 783 return new md.Element.text('code', name); | 783 return new md.Element.text('code', name); |
| 784 } | 784 } |
| 785 | 785 |
| 786 // TODO(rnystrom): Move into SourceSpan? | 786 // TODO(rnystrom): Move into SourceSpan? |
| 787 int getSpanColumn(SourceSpan span) { | 787 int getSpanColumn(SourceSpan span) { |
| 788 final line = span.file.getLine(span.start); | 788 final line = span.file.getLine(span.start); |
| 789 return span.file.getColumn(line, span.start); | 789 return span.file.getColumn(line, span.start); |
| 790 } | 790 } |
| 791 } | 791 } |
| OLD | NEW |