| 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 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 994 void docMembers(ObjectMirror host) { | 994 void docMembers(ObjectMirror host) { |
| 995 // Collect the different kinds of members. | 995 // Collect the different kinds of members. |
| 996 final staticMethods = []; | 996 final staticMethods = []; |
| 997 final staticFields = []; | 997 final staticFields = []; |
| 998 final memberMap = new Map<String,MemberMirror>(); | 998 final memberMap = new Map<String,MemberMirror>(); |
| 999 final instanceMethods = []; | 999 final instanceMethods = []; |
| 1000 final instanceFields = []; | 1000 final instanceFields = []; |
| 1001 | 1001 |
| 1002 host.declaredMembers.forEach((_, MemberMirror member) { | 1002 host.declaredMembers.forEach((_, MemberMirror member) { |
| 1003 if (member.isPrivate) return; | 1003 if (member.isPrivate) return; |
| 1004 if (member.isStatic) { | 1004 if (host is LibraryMirror || member.isStatic) { |
| 1005 if (member.isMethod) { | 1005 if (member.isMethod) { |
| 1006 staticMethods.add(member); | 1006 staticMethods.add(member); |
| 1007 } else if (member.isField) { | 1007 } else if (member.isField) { |
| 1008 staticFields.add(member); | 1008 staticFields.add(member); |
| 1009 } | 1009 } |
| 1010 } | 1010 } |
| 1011 }); | 1011 }); |
| 1012 | 1012 |
| 1013 if (host is InterfaceMirror) { | 1013 if (host is InterfaceMirror) { |
| 1014 var iterable = new HierarchyIterable(host, includeType: true); | 1014 var iterable = new HierarchyIterable(host, includeType: true); |
| (...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1639 final InterfaceMirror inheritedFrom; | 1639 final InterfaceMirror inheritedFrom; |
| 1640 | 1640 |
| 1641 DocComment(this.text, [this.inheritedFrom = null]) { | 1641 DocComment(this.text, [this.inheritedFrom = null]) { |
| 1642 assert(text != null && !text.trim().isEmpty()); | 1642 assert(text != null && !text.trim().isEmpty()); |
| 1643 } | 1643 } |
| 1644 | 1644 |
| 1645 String get html => md.markdownToHtml(text); | 1645 String get html => md.markdownToHtml(text); |
| 1646 | 1646 |
| 1647 String toString() => text; | 1647 String toString() => text; |
| 1648 } | 1648 } |
| OLD | NEW |