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

Unified Diff: frog/leg/scanner/class_element_parser.dart

Issue 9284022: Operators. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « frog/leg/resolver.dart ('k') | frog/leg/scanner/parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/leg/scanner/class_element_parser.dart
===================================================================
--- frog/leg/scanner/class_element_parser.dart (revision 3645)
+++ frog/leg/scanner/class_element_parser.dart (working copy)
@@ -64,12 +64,15 @@
Node methodName = method.name;
if (methodName.asSend() != null) {
Send send = methodName.asSend();
- // TODO(karlklose): find a better place for the construction of the name.
Identifier receiver = send.receiver.asIdentifier();
Identifier selector = send.selector.asIdentifier();
- SourceString className = receiver.source;
- SourceString constructorName = selector.source;
- name = new SourceString('$className.$constructorName');
+ if (selector.asOperator() != null) {
+ name = Elements.constructOperatorName(
+ receiver.source, selector.source);
+ } else {
+ name = Elements.constructConstructorName(
+ receiver.source, selector.source);
+ }
} else {
name = methodName.asIdentifier().source;
}
« no previous file with comments | « frog/leg/resolver.dart ('k') | frog/leg/scanner/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698