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

Unified Diff: pkg/dartdoc/lib/dartdoc.dart

Issue 11339056: Cleanup run on DartDoc from Dart Editor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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
« no previous file with comments | « pkg/dartdoc/lib/classify.dart ('k') | pkg/dartdoc/lib/markdown.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dartdoc/lib/dartdoc.dart
diff --git a/pkg/dartdoc/lib/dartdoc.dart b/pkg/dartdoc/lib/dartdoc.dart
index 5f6913fda1d7bfc09c97aa6c96a629aabebbafe9..15f668f23a6baadb83ce62d090f4dc0768afb0f8 100644
--- a/pkg/dartdoc/lib/dartdoc.dart
+++ b/pkg/dartdoc/lib/dartdoc.dart
@@ -14,27 +14,26 @@
* members, finds the associated doc comments and builds crosslinked docs from
* them.
*/
-#library('dartdoc');
+library dartdoc;
-#import('dart:io');
-#import('dart:math');
-#import('dart:uri');
-#import('dart:json');
+import 'dart:io';
+import 'dart:math';
+import 'dart:uri';
+import 'dart:json';
// TODO(rnystrom): Use "package:" URL (#4968).
-#import('mirrors.dart');
-#import('mirrors_util.dart');
-#import('src/mirrors/dart2js_mirror.dart', prefix: 'dart2js');
-#import('classify.dart');
-#import('markdown.dart', prefix: 'md');
-#import('../../../lib/compiler/implementation/scanner/scannerlib.dart',
- prefix: 'dart2js');
-#import('../../../lib/_internal/libraries.dart');
+import 'mirrors.dart';
+import 'mirrors_util.dart';
+import 'src/mirrors/dart2js_mirror.dart' as dart2js;
+import 'classify.dart';
+import 'markdown.dart' as md;
+import '../../../lib/compiler/implementation/scanner/scannerlib.dart' as dart2js;
+import '../../../lib/_internal/libraries.dart';
// TODO(rnystrom): Use "package:" URL (#4968).
-#source('src/dartdoc/comment_map.dart');
-#source('src/dartdoc/nav.dart');
-#source('src/dartdoc/utils.dart');
+part 'src/dartdoc/comment_map.dart';
+part 'src/dartdoc/nav.dart';
+part 'src/dartdoc/utils.dart';
/**
* Generates completely static HTML containing everything you need to browse
@@ -1051,7 +1050,7 @@ class Dartdoc {
if (!showPrivate && member.isPrivate) return;
bool inherit = true;
- if (type !== host) {
+ if (type != host) {
if (member.isPrivate) {
// Don't inherit private members.
inherit = false;
@@ -1169,7 +1168,7 @@ class Dartdoc {
} else {
DocComment getterComment = getMemberComment(getter);
DocComment setterComment = getMemberComment(setter);
- if (getter.owner !== setter.owner ||
+ if (getter.owner != setter.owner ||
getterComment != null && setterComment != null) {
// Both have comments or are not declared in the same class
// => Documents separately.
@@ -1423,7 +1422,7 @@ class Dartdoc {
void docComment(ObjectMirror host, DocComment comment) {
if (comment != null) {
- if (comment.inheritedFrom !== null) {
+ if (comment.inheritedFrom != null) {
writeln('<div class="inherited">');
writeln(comment.html);
write('<div class="docs-inherited-from">docs inherited from ');
@@ -1552,7 +1551,7 @@ class Dartdoc {
* Creates a hyperlink. Handles turning the [href] into an appropriate
* relative path from the current file.
*/
- String a(String href, String contents, [String css]) {
+ String a(String href, String contents, {String css}) {
gram 2012/10/30 22:30:04 Why use a named parameter here? Usually you would
Andrei Mouravski 2012/10/31 15:08:00 Done.
// Mark outgoing external links, mainly so we can style them.
final rel = isAbsolute(href) ? ' ref="external"' : '';
final cssClass = css == null ? '' : ' class="$css"';
@@ -1567,12 +1566,12 @@ class Dartdoc {
[String paramName = null]) {
// Don't bother explicitly displaying Dynamic.
if (type.isDynamic) {
- if (paramName !== null) write(paramName);
+ if (paramName != null) write(paramName);
return;
}
// For parameters, handle non-typedefed function types.
- if (paramName !== null && type is FunctionTypeMirror) {
+ if (paramName != null && type is FunctionTypeMirror) {
annotateType(enclosingType, type.returnType);
write(paramName);
@@ -1583,7 +1582,7 @@ class Dartdoc {
linkToType(enclosingType, type);
write(' ');
- if (paramName !== null) write(paramName);
+ if (paramName != null) write(paramName);
}
/** Writes a link to a human-friendly string representation for a type. */
« no previous file with comments | « pkg/dartdoc/lib/classify.dart ('k') | pkg/dartdoc/lib/markdown.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698