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

Unified Diff: lib/dartdoc/dartdoc.dart

Issue 10779010: Parameters with function types supported + Added features in mirrors implementation (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: lib/dartdoc/dartdoc.dart
diff --git a/lib/dartdoc/dartdoc.dart b/lib/dartdoc/dartdoc.dart
index 90e3b705329c7aaa5ae7c8ac930c373aa3c8dd19..e0165ed1850d3917cf470b69728524d71a842c66 100644
--- a/lib/dartdoc/dartdoc.dart
+++ b/lib/dartdoc/dartdoc.dart
@@ -1098,7 +1098,13 @@ class Dartdoc {
inOptionals = true;
}
- annotateType(enclosingType, parameter.type(), parameter.simpleName());
+ var paramName = parameter.simpleName();
+ if (paramName.startsWith('_') &&
floitsch 2012/07/17 18:53:04 It is probably not that easy. You need to check th
Johnni Winther 2012/07/18 13:32:50 Left out for now.
+ paramName != "_" &&
+ parameter.isInitializingFormal()) {
+ paramName = paramName.substring(1);
+ }
+ annotateType(enclosingType, parameter.type(), paramName);
// Show the default value for named optional parameters.
if (parameter.isOptional() && parameter.hasDefaultValue()) {
@@ -1263,6 +1269,11 @@ class Dartdoc {
write('void');
return;
}
+ if (type.isDynamic) {
+ // Do not generate links for Dynamic.
+ write('Dynamic');
+ return;
+ }
if (type.isTypeVariable) {
// If we're using a type parameter within the body of a generic class then

Powered by Google App Engine
This is Rietveld 408576698