Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Side by Side Diff: sdk/lib/_internal/dartdoc/lib/dartdoc.dart

Issue 12086062: Rename mappedBy to map. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Undo change to test-script. Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/codegen.dart ('k') | sdk/lib/async/stream.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 docIndex(); 350 docIndex();
351 for (final library in _sortedLibraries) { 351 for (final library in _sortedLibraries) {
352 docLibrary(library); 352 docLibrary(library);
353 } 353 }
354 354
355 if (generateAppCache) { 355 if (generateAppCache) {
356 generateAppCacheManifest(); 356 generateAppCacheManifest();
357 } 357 }
358 358
359 startFile("apidoc.json"); 359 startFile("apidoc.json");
360 var libraries = _sortedLibraries.mappedBy( 360 var libraries = _sortedLibraries.map(
361 (lib) => new LibraryElement(lib.qualifiedName, lib)) 361 (lib) => new LibraryElement(lib.qualifiedName, lib))
362 .toList(); 362 .toList();
363 write(json_serializer.serialize(libraries)); 363 write(json_serializer.serialize(libraries));
364 endFile(); 364 endFile();
365 } 365 }
366 366
367 void startFile(String path) { 367 void startFile(String path) {
368 _filePath = new Path(path); 368 _filePath = new Path(path);
369 _file = new StringBuffer(); 369 _file = new StringBuffer();
370 } 370 }
(...skipping 1322 matching lines...) Expand 10 before | Expand all | Expand 10 after
1693 return type.simpleName; 1693 return type.simpleName;
1694 } 1694 }
1695 final params = Strings.join(typeParams, ', '); 1695 final params = Strings.join(typeParams, ', ');
1696 return '${type.simpleName}<$params>'; 1696 return '${type.simpleName}<$params>';
1697 } 1697 }
1698 1698
1699 // See if it's an instantiation of a generic type. 1699 // See if it's an instantiation of a generic type.
1700 final typeArgs = type.typeArguments; 1700 final typeArgs = type.typeArguments;
1701 if (typeArgs.length > 0) { 1701 if (typeArgs.length > 0) {
1702 final args = 1702 final args =
1703 Strings.join(typeArgs.mappedBy((arg) => typeName(arg)), ', '); 1703 Strings.join(typeArgs.map((arg) => typeName(arg)), ', ');
1704 return '${type.originalDeclaration.simpleName}<$args>'; 1704 return '${type.originalDeclaration.simpleName}<$args>';
1705 } 1705 }
1706 1706
1707 // Regular type. 1707 // Regular type.
1708 return type.simpleName; 1708 return type.simpleName;
1709 } 1709 }
1710 1710
1711 /** 1711 /**
1712 * Remove leading indentation to line up with first line. 1712 * Remove leading indentation to line up with first line.
1713 */ 1713 */
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
1906 final ClassMirror inheritedFrom; 1906 final ClassMirror inheritedFrom;
1907 1907
1908 DocComment(this.text, [this.inheritedFrom = null]) { 1908 DocComment(this.text, [this.inheritedFrom = null]) {
1909 assert(text != null && !text.trim().isEmpty); 1909 assert(text != null && !text.trim().isEmpty);
1910 } 1910 }
1911 1911
1912 String get html => md.markdownToHtml(text); 1912 String get html => md.markdownToHtml(text);
1913 1913
1914 String toString() => text; 1914 String toString() => text;
1915 } 1915 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/codegen.dart ('k') | sdk/lib/async/stream.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698