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

Side by Side Diff: frog/member.dart

Issue 8771054: Add a script to generate HTML and DOM docs with cross-links to one another. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Various fixes to get htmldoc running again. Created 9 years 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 | « frog/library.dart ('k') | frog/type.dart » ('j') | frog/type.dart » ('J')
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 /** A formal parameter to a [Method]. */ 5 /** A formal parameter to a [Method]. */
6 class Parameter { 6 class Parameter {
7 FormalNode definition; 7 FormalNode definition;
8 Member method; 8 Member method;
9 9
10 String name; 10 String name;
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 String get generatedFactoryName() { 190 String get generatedFactoryName() {
191 assert(this.isFactory); 191 assert(this.isFactory);
192 String prefix = '${declaringType.jsname}.${constructorName}\$'; 192 String prefix = '${declaringType.jsname}.${constructorName}\$';
193 if (name == '') { 193 if (name == '') {
194 return '${prefix}factory'; 194 return '${prefix}factory';
195 } else { 195 } else {
196 return '${prefix}$name\$factory'; 196 return '${prefix}$name\$factory';
197 } 197 }
198 } 198 }
199 199
200 int hashCode() => (declaringType.hashCode() << 4) ^ name.hashCode(); 200 int hashCode() {
201 final typeCode = declaringType == null ? 1 : declaringType.hashCode();
202 final nameCode = isConstructor ? constructorName.hashCode() : name.hashCode( );
Siggi Cherem (dart-lang) 2011/12/07 21:16:13 80
nweiz 2011/12/07 22:09:11 Done.
203 return (typeCode << 4) ^ nameCode;
204 }
205
206 bool operator ==(other) {
207 return other is Member && isConstructor == other.isConstructor &&
208 declaringType == other.declaringType && (isConstructor ?
209 constructorName == other.constructorName : name == other.name);
210 }
201 } 211 }
202 212
203 213
204 /** 214 /**
205 * Types are treated as first class members of their library's top type. 215 * Types are treated as first class members of their library's top type.
206 */ 216 */
207 // TODO(jmesserly): perhaps Type should extend Member, but that can get 217 // TODO(jmesserly): perhaps Type should extend Member, but that can get
208 // complicated. 218 // complicated.
209 class TypeMember extends Member { 219 class TypeMember extends Member {
210 final DefinedType type; 220 final DefinedType type;
(...skipping 1525 matching lines...) Expand 10 before | Expand all | Expand 10 after
1736 } 1746 }
1737 1747
1738 void forEach(void f(Member member)) { 1748 void forEach(void f(Member member)) {
1739 factories.forEach((_, Map constructors) { 1749 factories.forEach((_, Map constructors) {
1740 constructors.forEach((_, Member member) { 1750 constructors.forEach((_, Member member) {
1741 f(member); 1751 f(member);
1742 }); 1752 });
1743 }); 1753 });
1744 } 1754 }
1745 } 1755 }
OLDNEW
« no previous file with comments | « frog/library.dart ('k') | frog/type.dart » ('j') | frog/type.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698