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

Unified Diff: lib/compiler/implementation/scanner/class_element_parser.dart

Issue 10696147: Patch methods in classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Small type/typo fixes Created 8 years, 5 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 | « lib/compiler/implementation/patch_parser.dart ('k') | lib/compiler/implementation/scanner/listener.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/scanner/class_element_parser.dart
diff --git a/lib/compiler/implementation/scanner/class_element_parser.dart b/lib/compiler/implementation/scanner/class_element_parser.dart
index e958c67b2b413a7214423871c4c873828032e777..74e0a76f0d0452625543354b2e9a36a866c8f551 100644
--- a/lib/compiler/implementation/scanner/class_element_parser.dart
+++ b/lib/compiler/implementation/scanner/class_element_parser.dart
@@ -91,7 +91,7 @@ class MemberListener extends NodeListener {
Element memberElement =
new PartialFunctionElement(name, beginToken, getOrSet, endToken,
kind, method.modifiers, enclosingElement);
- enclosingElement.addMember(memberElement, listener);
+ addMember(memberElement);
}
void endFactoryMethod(Token factoryKeyword, Token periodBeforeName,
@@ -104,7 +104,7 @@ class MemberListener extends NodeListener {
Element memberElement =
new PartialFunctionElement(name, factoryKeyword, null, endToken,
kind, method.modifiers, enclosingElement);
- enclosingElement.addMember(memberElement, listener);
+ addMember(memberElement);
}
void endFields(int count, Token beginToken, Token endToken) {
@@ -115,7 +115,7 @@ class MemberListener extends NodeListener {
void buildFieldElement(SourceString name, Element fields) {
Element element = new VariableElement(
name, fields, ElementKind.FIELD, enclosingElement);
- enclosingElement.addMember(element, listener);
+ addMember(element);
}
buildFieldElements(modifiers, variableDefinitions.definitions,
enclosingElement,
@@ -131,4 +131,8 @@ class MemberListener extends NodeListener {
void endInitializers(int count, Token beginToken, Token endToken) {
pushNode(null);
}
+
+ void addMember(Element memberElement) {
+ enclosingElement.addMember(memberElement, listener);
+ }
}
« no previous file with comments | « lib/compiler/implementation/patch_parser.dart ('k') | lib/compiler/implementation/scanner/listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698