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

Unified Diff: pkg/compiler/lib/src/scanner/class_element_parser.dart

Issue 1132783002: Add Accessor, Getter, and Setter elements. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 5 years, 7 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 | « pkg/compiler/lib/src/resolution/resolution.dart ('k') | pkg/compiler/lib/src/scanner/listener.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/scanner/class_element_parser.dart
diff --git a/pkg/compiler/lib/src/scanner/class_element_parser.dart b/pkg/compiler/lib/src/scanner/class_element_parser.dart
index 9bf1523feb9eb33ad2dcc7d8336fc32c806dffcf..0f49ad2ffbb64e047af87675736f93172ce441ce 100644
--- a/pkg/compiler/lib/src/scanner/class_element_parser.dart
+++ b/pkg/compiler/lib/src/scanner/class_element_parser.dart
@@ -166,15 +166,9 @@ class MemberListener extends NodeListener {
method.modifiers,
enclosingClass);
} else {
- ElementKind kind = ElementKind.FUNCTION;
- if (getOrSet != null) {
- kind = (identical(getOrSet.stringValue, 'get'))
- ? ElementKind.GETTER : ElementKind.SETTER;
- }
- memberElement =
- new PartialFunctionElement(name, beginToken, getOrSet, endToken,
- kind, method.modifiers, enclosingClass,
- !method.hasBody());
+ memberElement = new PartialFunctionElement(
+ name, beginToken, getOrSet, endToken,
+ method.modifiers, enclosingClass, hasBody: method.hasBody());
}
addMember(memberElement);
}
@@ -228,14 +222,14 @@ class MemberListener extends NodeListener {
pushNode(null);
}
- void addMetadata(Element memberElement) {
+ void addMetadata(ElementX memberElement) {
for (Link link = metadata; !link.isEmpty; link = link.tail) {
memberElement.addMetadata(link.head);
}
metadata = const Link<MetadataAnnotation>();
}
- void addMember(Element memberElement) {
+ void addMember(ElementX memberElement) {
addMetadata(memberElement);
enclosingClass.addMember(memberElement, listener);
}
« no previous file with comments | « pkg/compiler/lib/src/resolution/resolution.dart ('k') | pkg/compiler/lib/src/scanner/listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698