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

Side by Side Diff: utils/apidoc/html_diff.dart

Issue 9317040: Don't check for Member. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 10 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 | no next file » | 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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 script to assist in documenting the difference between the dart:html API 6 * A script to assist in documenting the difference between the dart:html API
7 * and the old DOM API. 7 * and the old DOM API.
8 */ 8 */
9 #library('html_diff'); 9 #library('html_diff');
10 10
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 var htmlType = htmlImplToHtmlType(implMember.declaringType); 160 var htmlType = htmlImplToHtmlType(implMember.declaringType);
161 if (htmlType == null) return null; 161 if (htmlType == null) return null;
162 162
163 bool getter, setter; 163 bool getter, setter;
164 if (implMember.isConstructor || implMember.isFactory) { 164 if (implMember.isConstructor || implMember.isFactory) {
165 var constructor = htmlType.constructors[implMember.name]; 165 var constructor = htmlType.constructors[implMember.name];
166 if (constructor != null) return constructor; 166 if (constructor != null) return constructor;
167 return htmlType.factories[implMember.name]; 167 return htmlType.factories[implMember.name];
168 } else if ((getter = implMember.name.startsWith('get:')) || 168 } else if ((getter = implMember.name.startsWith('get:')) ||
169 (setter = implMember.name.startsWith('set:'))) { 169 (setter = implMember.name.startsWith('set:'))) {
170 // Use getMember to follow interface inheritance chains. If it's a 170 // Use getMember to follow interface inheritance chains.
171 // Member, though, it's an implementation of some data structure
172 // and we don't care about it.
173 var htmlProperty = htmlType.getMember(implMember.name.substring(4)); 171 var htmlProperty = htmlType.getMember(implMember.name.substring(4));
174 if (htmlProperty != null && htmlProperty is! Member) { 172 if (htmlProperty != null) {
175 return getter ? htmlProperty.getter : htmlProperty.setter; 173 return getter ? htmlProperty.getter : htmlProperty.setter;
176 } else { 174 } else {
177 return null; 175 return null;
178 } 176 }
179 } else { 177 } else {
180 return htmlType.getMember(implMember.name); 178 return htmlType.getMember(implMember.name);
181 } 179 }
182 } 180 }
183 181
184 /** 182 /**
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 Map<String, String> _getTags(String comment) { 391 Map<String, String> _getTags(String comment) {
394 if (comment == null) return const <String>{}; 392 if (comment == null) return const <String>{};
395 final re = new RegExp("@([a-zA-Z]+) ([^;]+)(?:;|\$)"); 393 final re = new RegExp("@([a-zA-Z]+) ([^;]+)(?:;|\$)");
396 final tags = <String>{}; 394 final tags = <String>{};
397 for (var m in re.allMatches(comment.trim())) { 395 for (var m in re.allMatches(comment.trim())) {
398 tags[m[1]] = m[2]; 396 tags[m[1]] = m[2];
399 } 397 }
400 return tags; 398 return tags;
401 } 399 }
402 } 400 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698