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

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

Issue 11856009: Undo changes to tools-scripts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « no previous file | tools/testing/dart/multitest.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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 _anyErrors = true; 98 _anyErrors = true;
99 return; 99 return;
100 } 100 }
101 101
102 fileFutures.add(_convertFile(file)); 102 fileFutures.add(_convertFile(file));
103 }; 103 };
104 104
105 105
106 // Combine all JSON objects 106 // Combine all JSON objects
107 lister.onDone = (_) { 107 lister.onDone = (_) {
108 Future.wait(fileFutures).then((jsonList) { 108 Futures.wait(fileFutures).then((jsonList) {
109 var convertedJson = {}; 109 var convertedJson = {};
110 jsonList.forEach((json) { 110 jsonList.forEach((json) {
111 final k = json.keys[0]; 111 final k = json.keys[0];
112 convertedJson.putIfAbsent(k, () => json[k]); 112 convertedJson.putIfAbsent(k, () => json[k]);
113 }); 113 });
114 completer.complete(convertedJson); 114 completer.complete(convertedJson);
115 }); 115 });
116 }; 116 };
117 117
118 // TODO(amouravski): add more error handling. 118 // TODO(amouravski): add more error handling.
(...skipping 189 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 | « no previous file | tools/testing/dart/multitest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698