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

Side by Side Diff: pkg/docgen/lib/docgen.dart

Issue 151693002: Fix missing .mirror. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | « no previous file | no next file » | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 /// **docgen** is a tool for creating machine readable representations of Dart 5 /// **docgen** is a tool for creating machine readable representations of Dart
6 /// code metadata, including: classes, members, comments and annotations. 6 /// code metadata, including: classes, members, comments and annotations.
7 /// 7 ///
8 /// docgen is run on a `.dart` file or a directory containing `.dart` files. 8 /// docgen is run on a `.dart` file or a directory containing `.dart` files.
9 /// 9 ///
10 /// $ dart docgen.dart [OPTIONS] [FILE/DIR] 10 /// $ dart docgen.dart [OPTIONS] [FILE/DIR]
(...skipping 1561 matching lines...) Expand 10 before | Expand all | Expand 10 after
1572 // can get for their inherited versions the comments. 1572 // can get for their inherited versions the comments.
1573 methods.forEach((qualifiedName, method) { 1573 methods.forEach((qualifiedName, method) {
1574 if (!method.mirror.isConstructor) method.ensureCommentFor(method); 1574 if (!method.mirror.isConstructor) method.ensureCommentFor(method);
1575 }); 1575 });
1576 } 1576 }
1577 1577
1578 /// If a class extends a private superclass, find the closest public 1578 /// If a class extends a private superclass, find the closest public
1579 /// superclass of the private superclass. 1579 /// superclass of the private superclass.
1580 String validSuperclass() { 1580 String validSuperclass() {
1581 if (superclass == null) return 'dart.core.Object'; 1581 if (superclass == null) return 'dart.core.Object';
1582 if (superclass._isVisible) return dart2js_util.qualifiedNameOf(superclass); 1582 if (superclass._isVisible) {
1583 return dart2js_util.qualifiedNameOf(superclass.mirror);
Johnni Winther 2014/01/31 19:19:45 Maybe this should just be `return superclass.quali
floitsch 2014/02/01 02:01:15 Seattle (Emily and Alan) agreed to fix this.
1584 }
1583 return superclass.validSuperclass(); 1585 return superclass.validSuperclass();
1584 } 1586 }
1585 1587
1586 /// Generates a map describing the [Class] object. 1588 /// Generates a map describing the [Class] object.
1587 Map toMap() => { 1589 Map toMap() => {
1588 'name': name, 1590 'name': name,
1589 'qualifiedName': qualifiedName, 1591 'qualifiedName': qualifiedName,
1590 'comment': comment, 1592 'comment': comment,
1591 'isAbstract' : isAbstract, 1593 'isAbstract' : isAbstract,
1592 'superclass': validSuperclass(), 1594 'superclass': validSuperclass(),
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
1991 .map((e) => originalMirror.getField(e.simpleName).reflectee) 1993 .map((e) => originalMirror.getField(e.simpleName).reflectee)
1992 .where((e) => e != null) 1994 .where((e) => e != null)
1993 .toList(); 1995 .toList();
1994 } 1996 }
1995 1997
1996 Map toMap() => { 1998 Map toMap() => {
1997 'name': Indexable.getDocgenObject(mirror, owningLibrary).docName, 1999 'name': Indexable.getDocgenObject(mirror, owningLibrary).docName,
1998 'parameters': parameters 2000 'parameters': parameters
1999 }; 2001 };
2000 } 2002 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698