| Index: pkg/dartdoc/dartdoc.dart
|
| diff --git a/pkg/dartdoc/dartdoc.dart b/pkg/dartdoc/dartdoc.dart
|
| index d68f40abad88ed52ce1ba18d1c8ba75bf3e5123f..f2079785b86863c7fa6cec2d84516553b600f591 100644
|
| --- a/pkg/dartdoc/dartdoc.dart
|
| +++ b/pkg/dartdoc/dartdoc.dart
|
| @@ -779,6 +779,7 @@ class Dartdoc {
|
| // Document the types.
|
| final classes = <InterfaceMirror>[];
|
| final interfaces = <InterfaceMirror>[];
|
| + final typedefs = <TypedefMirror>[];
|
| final exceptions = <InterfaceMirror>[];
|
|
|
| for (InterfaceMirror type in orderByName(library.types.getValues())) {
|
| @@ -788,13 +789,18 @@ class Dartdoc {
|
| exceptions.add(type);
|
| } else if (type.isClass) {
|
| classes.add(type);
|
| - } else {
|
| + } else if (type.isInterface){
|
| interfaces.add(type);
|
| + } else if (type is TypedefMirror) {
|
| + typedefs.add(type);
|
| + } else {
|
| + throw new InternalError("internal error: unknown type $type.");
|
| }
|
| }
|
|
|
| docTypes(classes, 'Classes');
|
| docTypes(interfaces, 'Interfaces');
|
| + docTypes(typedefs, 'Typedefs');
|
| docTypes(exceptions, 'Exceptions');
|
|
|
| writeFooter();
|
| @@ -807,7 +813,7 @@ class Dartdoc {
|
| }
|
| }
|
|
|
| - void docTypes(List<InterfaceMirror> types, String header) {
|
| + void docTypes(List types, String header) {
|
| if (types.length == 0) return;
|
|
|
| writeln('<h3>$header</h3>');
|
| @@ -989,14 +995,11 @@ class Dartdoc {
|
| writeln('<span class="show-code">Code</span>');
|
| }
|
|
|
| - if (type.definition !== null) {
|
| - // TODO(johnniwinther): Implement [:TypedefMirror.definition():].
|
| - write('typedef ');
|
| - annotateType(type, type.definition, type.simpleName);
|
| + write('typedef ');
|
| + annotateType(type, type.definition, type.simpleName);
|
|
|
| - write(''' <a class="anchor-link" href="#${type.simpleName}"
|
| - title="Permalink to ${type.simpleName}">#</a>''');
|
| - }
|
| + write(''' <a class="anchor-link" href="#${type.simpleName}"
|
| + title="Permalink to ${type.simpleName}">#</a>''');
|
| writeln('</h4>');
|
|
|
| docCode(type.location, null, showCode: true);
|
|
|