| 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 * |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 | 225 |
| 226 int _totalLibraries = 0; | 226 int _totalLibraries = 0; |
| 227 int _totalTypes = 0; | 227 int _totalTypes = 0; |
| 228 int _totalMembers = 0; | 228 int _totalMembers = 0; |
| 229 | 229 |
| 230 int get totalLibraries => _totalLibraries; | 230 int get totalLibraries => _totalLibraries; |
| 231 int get totalTypes => _totalTypes; | 231 int get totalTypes => _totalTypes; |
| 232 int get totalMembers => _totalMembers; | 232 int get totalMembers => _totalMembers; |
| 233 | 233 |
| 234 Dartdoc() | 234 Dartdoc() |
| 235 : _comments = new CommentMap(), | 235 : _comments = new CommentMap() { |
| 236 dartdocPath = scriptDir { | |
| 237 // Patch in support for [:...:]-style code to the markdown parser. | 236 // Patch in support for [:...:]-style code to the markdown parser. |
| 238 // TODO(rnystrom): Markdown already has syntax for this. Phase this out? | 237 // TODO(rnystrom): Markdown already has syntax for this. Phase this out? |
| 239 md.InlineParser.syntaxes.insertRange(0, 1, | 238 md.InlineParser.syntaxes.insertRange(0, 1, |
| 240 new md.CodeSyntax(@'\[\:((?:.|\n)*?)\:\]')); | 239 new md.CodeSyntax(@'\[\:((?:.|\n)*?)\:\]')); |
| 241 | 240 |
| 242 md.setImplicitLinkResolver((name) => resolveNameReference(name, | 241 md.setImplicitLinkResolver((name) => resolveNameReference(name, |
| 243 currentLibrary: _currentLibrary, currentType: _currentType, | 242 currentLibrary: _currentLibrary, currentType: _currentType, |
| 244 currentMember: _currentMember)); | 243 currentMember: _currentMember)); |
| 245 } | 244 } |
| 246 | 245 |
| (...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1568 | 1567 |
| 1569 /** | 1568 /** |
| 1570 * Used to report an unexpected error in the DartDoc tool or the | 1569 * Used to report an unexpected error in the DartDoc tool or the |
| 1571 * underlying data | 1570 * underlying data |
| 1572 */ | 1571 */ |
| 1573 class InternalError { | 1572 class InternalError { |
| 1574 final String message; | 1573 final String message; |
| 1575 const InternalError(this.message); | 1574 const InternalError(this.message); |
| 1576 String toString() => "InternalError: '$message'"; | 1575 String toString() => "InternalError: '$message'"; |
| 1577 } | 1576 } |
| OLD | NEW |