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

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

Issue 11337021: Change surroundingDeclaration to DeclarationMirror.owner (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 | « utils/apidoc/apidoc.dart ('k') | 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) 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 * 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 /** 116 /**
117 * Records the `@domName` to `dart:html` mapping for 117 * Records the `@domName` to `dart:html` mapping for
118 * [htmlMember] (from `dart:html`). [domTypes] are the 118 * [htmlMember] (from `dart:html`). [domTypes] are the
119 * `@domName` type values that correspond to [htmlMember]'s 119 * `@domName` type values that correspond to [htmlMember]'s
120 * defining type. 120 * defining type.
121 */ 121 */
122 void _addMemberDiff(MemberMirror htmlMember, List<String> domTypes) { 122 void _addMemberDiff(MemberMirror htmlMember, List<String> domTypes) {
123 var domMembers = htmlToDomMembers(htmlMember, domTypes); 123 var domMembers = htmlToDomMembers(htmlMember, domTypes);
124 if (htmlMember == null && !domMembers.isEmpty) { 124 if (htmlMember == null && !domMembers.isEmpty) {
125 warn('$HTML_LIBRARY_NAME member ' 125 warn('$HTML_LIBRARY_NAME member '
126 '${htmlMember.surroundingDeclaration.simpleName}.' 126 '${htmlMember.owner.simpleName}.'
127 '${htmlMember.simpleName} has no corresponding ' 127 '${htmlMember.simpleName} has no corresponding '
128 '$HTML_LIBRARY_NAME member.'); 128 '$HTML_LIBRARY_NAME member.');
129 } 129 }
130 130
131 if (htmlMember == null) return; 131 if (htmlMember == null) return;
132 if (!domMembers.isEmpty) { 132 if (!domMembers.isEmpty) {
133 htmlToDom[htmlMember.qualifiedName] = domMembers; 133 htmlToDom[htmlMember.qualifiedName] = domMembers;
134 } 134 }
135 } 135 }
136 136
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 Map<String, String> _getTags(String comment) { 229 Map<String, String> _getTags(String comment) {
230 if (comment == null) return const <String, String>{}; 230 if (comment == null) return const <String, String>{};
231 final re = const RegExp("@([a-zA-Z]+) ([^;]+)(?:;|\$)"); 231 final re = const RegExp("@([a-zA-Z]+) ([^;]+)(?:;|\$)");
232 final tags = <String, String>{}; 232 final tags = <String, String>{};
233 for (var m in re.allMatches(comment.trim())) { 233 for (var m in re.allMatches(comment.trim())) {
234 tags[m[1]] = m[2]; 234 tags[m[1]] = m[2];
235 } 235 }
236 return tags; 236 return tags;
237 } 237 }
238 } 238 }
OLDNEW
« no previous file with comments | « utils/apidoc/apidoc.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698