OLD | NEW |
(Empty) | |
| 1 >>> (indent 2) |
| 2 Iterable<DeclarationMirror> _sortedLibraryDeclarations(LibraryMirror lib) => |
| 3 lib.declarations.values |
| 4 .where((d) => d is ClassMirror || d is MethodMirror) |
| 5 .toList() |
| 6 ..sort((a, b) { |
| 7 if (a.runtimeType == b.runtimeType) { |
| 8 return _declarationName(a).compareTo(_declarationName(b)); |
| 9 } |
| 10 if (a is MethodMirror && b is ClassMirror) return -1; |
| 11 if (a is ClassMirror && b is MethodMirror) return 1; |
| 12 return 0; |
| 13 }); |
| 14 <<< |
| 15 Iterable<DeclarationMirror> _sortedLibraryDeclarations(LibraryMirror lib) => |
| 16 lib.declarations.values |
| 17 .where((d) => d is ClassMirror || d is MethodMirror) |
| 18 .toList() |
| 19 ..sort((a, b) { |
| 20 if (a.runtimeType == b.runtimeType) { |
| 21 return _declarationName(a).compareTo(_declarationName(b)); |
| 22 } |
| 23 if (a is MethodMirror && b is ClassMirror) return -1; |
| 24 if (a is ClassMirror && b is MethodMirror) return 1; |
| 25 return 0; |
| 26 }); |
OLD | NEW |