| 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 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1244 | 1244 |
| 1245 writeln('<div class="method${inherited ? ' inherited': ''}">' | 1245 writeln('<div class="method${inherited ? ' inherited': ''}">' |
| 1246 '<h4 id="${memberAnchor(member)}">'); | 1246 '<h4 id="${memberAnchor(member)}">'); |
| 1247 | 1247 |
| 1248 if (showCode) { | 1248 if (showCode) { |
| 1249 writeln('<button class="show-code">Code</button>'); | 1249 writeln('<button class="show-code">Code</button>'); |
| 1250 } | 1250 } |
| 1251 | 1251 |
| 1252 if (member is MethodMirror) { | 1252 if (member is MethodMirror) { |
| 1253 if (member.isConstructor) { | 1253 if (member.isConstructor) { |
| 1254 if (member.isFactory) { | 1254 if (member.isFactoryConstructor) { |
| 1255 write('factory '); | 1255 write('factory '); |
| 1256 } else { | 1256 } else { |
| 1257 write(member.isConst ? 'const ' : 'new '); | 1257 write(member.isConstConstructor ? 'const ' : 'new '); |
| 1258 } | 1258 } |
| 1259 } else if (member.isAbstract) { | 1259 } else if (member.isAbstract) { |
| 1260 write('abstract '); | 1260 write('abstract '); |
| 1261 } | 1261 } |
| 1262 | 1262 |
| 1263 if (!member.isConstructor) { | 1263 if (!member.isConstructor) { |
| 1264 annotateType(host, member.returnType); | 1264 annotateType(host, member.returnType); |
| 1265 } | 1265 } |
| 1266 } else { | 1266 } else { |
| 1267 assert(member is VariableMirror); | 1267 assert(member is VariableMirror); |
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1857 final ClassMirror inheritedFrom; | 1857 final ClassMirror inheritedFrom; |
| 1858 | 1858 |
| 1859 DocComment(this.text, [this.inheritedFrom = null]) { | 1859 DocComment(this.text, [this.inheritedFrom = null]) { |
| 1860 assert(text != null && !text.trim().isEmpty); | 1860 assert(text != null && !text.trim().isEmpty); |
| 1861 } | 1861 } |
| 1862 | 1862 |
| 1863 String get html => md.markdownToHtml(text); | 1863 String get html => md.markdownToHtml(text); |
| 1864 | 1864 |
| 1865 String toString() => text; | 1865 String toString() => text; |
| 1866 } | 1866 } |
| OLD | NEW |