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

Side by Side Diff: lib/compiler/implementation/scanner/class_element_parser.dart

Issue 11016027: Patch cleanup. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « lib/compiler/implementation/patch_parser.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) 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 class ClassElementParser extends PartialParser { 5 class ClassElementParser extends PartialParser {
6 ClassElementParser(Listener listener) : super(listener); 6 ClassElementParser(Listener listener) : super(listener);
7 7
8 Token parseClassBody(Token token) => fullParseClassBody(token); 8 Token parseClassBody(Token token) => fullParseClassBody(token);
9 } 9 }
10 10
(...skipping 29 matching lines...) Expand all
40 Parser parser = new ClassElementParser(listener); 40 Parser parser = new ClassElementParser(listener);
41 Token token = parser.parseTopLevelDeclaration(beginToken); 41 Token token = parser.parseTopLevelDeclaration(beginToken);
42 assert(token === endToken.next); 42 assert(token === endToken.next);
43 cachedNode = listener.popNode(); 43 cachedNode = listener.popNode();
44 assert(listener.nodes.isEmpty()); 44 assert(listener.nodes.isEmpty());
45 }); 45 });
46 compiler.patchParser.measure(() { 46 compiler.patchParser.measure(() {
47 if (isPatched) { 47 if (isPatched) {
48 // TODO(lrn): Perhaps extract functionality so it doesn't 48 // TODO(lrn): Perhaps extract functionality so it doesn't
49 // need compiler. 49 // need compiler.
50 ClassNode patchNode = compiler.patchParser.parsePatchClassNode(patch); 50 compiler.patchParser.parsePatchClassNode(patch);
51 Link<Element> patches = patch.localMembers;
52 compiler.applyContainerPatch(this, patches);
53 } 51 }
54 }); 52 });
55 }); 53 });
56 return cachedNode; 54 return cachedNode;
57 } 55 }
58 56
59 Token position() => beginToken; 57 Token position() => beginToken;
60 58
61 bool isInterface() => beginToken.stringValue === "interface"; 59 bool isInterface() => beginToken.stringValue === "interface";
62 60
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 } 191 }
194 192
195 void addMember(Element memberElement) { 193 void addMember(Element memberElement) {
196 for (Link link = metadata; !link.isEmpty(); link = link.tail) { 194 for (Link link = metadata; !link.isEmpty(); link = link.tail) {
197 memberElement.addMetadata(link.head); 195 memberElement.addMetadata(link.head);
198 } 196 }
199 metadata = const EmptyLink<MetadataAnnotation>(); 197 metadata = const EmptyLink<MetadataAnnotation>();
200 enclosingElement.addMember(memberElement, listener); 198 enclosingElement.addMember(memberElement, listener);
201 } 199 }
202 } 200 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/patch_parser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698