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

Side by Side Diff: tools/dom/docs/lib/docs.dart

Issue 14333011: Make source mirror ObjectMirror.getField synchronous (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 | « tests/compiler/dart2js/mirrors_test.dart ('k') | utils/apidoc/html_diff.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) 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 /** 5 /**
6 * A library for extracting the documentation from the various HTML libraries 6 * A library for extracting the documentation from the various HTML libraries
7 * ([dart:html], [dart:svg], [dart:web_audio], [dart:indexed_db]) and saving 7 * ([dart:html], [dart:svg], [dart:web_audio], [dart:indexed_db]) and saving
8 * those documentation comments to a JSON file. 8 * those documentation comments to a JSON file.
9 */ 9 */
10 10
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 return out; 174 return out;
175 } 175 }
176 176
177 /// Given the class mirror, returns the names found or an empty list. 177 /// Given the class mirror, returns the names found or an empty list.
178 List<String> domNames(DeclarationMirror mirror) { 178 List<String> domNames(DeclarationMirror mirror) {
179 var domNameMetadata = findMetadata(mirror.metadata, 'DomName'); 179 var domNameMetadata = findMetadata(mirror.metadata, 'DomName');
180 180
181 if (domNameMetadata != null) { 181 if (domNameMetadata != null) {
182 var domNames = <String>[]; 182 var domNames = <String>[];
183 var tags = deprecatedFutureValue(domNameMetadata.getField('name')); 183 var tags = domNameMetadata.getField('name');
Andrei Mouravski 2013/04/24 22:32:40 Yay!
184 for (var s in tags.reflectee.split(',')) { 184 for (var s in tags.reflectee.split(',')) {
185 domNames.add(s.trim()); 185 domNames.add(s.trim());
186 } 186 }
187 187
188 if (domNames.length == 1 && domNames[0] == 'none') return <String>[]; 188 if (domNames.length == 1 && domNames[0] == 'none') return <String>[];
189 return domNames; 189 return domNames;
190 } else { 190 } else {
191 return <String>[]; 191 return <String>[];
192 } 192 }
193 } 193 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/mirrors_test.dart ('k') | utils/apidoc/html_diff.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698