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

Side by Side Diff: tools/html_json_doc/lib/html_to_json.dart

Issue 11878015: Default constructor for dart:io Path now handles native Windows paths. Path() now does the same as… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Don't change tools/version.dart until the binaries are updated. Created 7 years, 11 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 | « tools/html_json_doc/bin/html_json_doc.dart ('k') | tools/html_json_doc/lib/json_to_html.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 * Library for extracting the documentation comments from files generated by 6 * Library for extracting the documentation comments from files generated by
7 * the HTML library. The comments are stored in a JSON file. 7 * the HTML library. The comments are stored in a JSON file.
8 * 8 *
9 * Comments must be in either the block style with leading *s: 9 * Comments must be in either the block style with leading *s:
10 * 10 *
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 var completer = new Completer(); 75 var completer = new Completer();
76 76
77 List<Future> fileFutures = []; 77 List<Future> fileFutures = [];
78 78
79 // Get a list of all HTML dart files. 79 // Get a list of all HTML dart files.
80 // TODO(amouravski): discriminate .dart files. 80 // TODO(amouravski): discriminate .dart files.
81 final htmlDir = new Directory.fromPath(htmlPath); 81 final htmlDir = new Directory.fromPath(htmlPath);
82 final lister = htmlDir.list(recursive: false); 82 final lister = htmlDir.list(recursive: false);
83 83
84 lister.onFile = (String path) { 84 lister.onFile = (String path) {
85 final name = new Path.fromNative(path).filename; 85 final name = new Path(path).filename;
86 86
87 // Ignore private classes. 87 // Ignore private classes.
88 if (name.startsWith('_')) return; 88 if (name.startsWith('_')) return;
89 89
90 // Ignore non-dart files. 90 // Ignore non-dart files.
91 if (!name.endsWith('.dart')) return; 91 if (!name.endsWith('.dart')) return;
92 92
93 File file = new File(path); 93 File file = new File(path);
94 94
95 // TODO(amouravski): Handle missing file. 95 // TODO(amouravski): Handle missing file.
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 '${prettyPrintJson(json[key], '$indentation ')}'); 308 '${prettyPrintJson(json[key], '$indentation ')}');
309 var recursiveOutput = Strings.join(mapList, ',\n'); 309 var recursiveOutput = Strings.join(mapList, ',\n');
310 output = '$indentation{\n' 310 output = '$indentation{\n'
311 '$recursiveOutput' 311 '$recursiveOutput'
312 '\n$indentation}'; 312 '\n$indentation}';
313 } else { 313 } else {
314 output = '$indentation${JSON.stringify(json)}'; 314 output = '$indentation${JSON.stringify(json)}';
315 } 315 }
316 return output; 316 return output;
317 } 317 }
OLDNEW
« no previous file with comments | « tools/html_json_doc/bin/html_json_doc.dart ('k') | tools/html_json_doc/lib/json_to_html.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698