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

Side by Side Diff: dart/pkg/compiler/lib/src/scanner/class_element_parser.dart

Issue 738743002: Incremental compilation of added class. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r41886 Created 6 years, 1 month 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 | « no previous file | dart/pkg/dart2js_incremental/lib/library_updater.dart » ('j') | 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 part of scanner; 5 part of scanner;
6 6
7 class ClassElementParser extends PartialParser { 7 class ClassElementParser extends PartialParser {
8 ClassElementParser(Listener listener) : super(listener); 8 ClassElementParser(Listener listener) : super(listener);
9 9
10 Token parseClassBody(Token token) => fullParseClassBody(token); 10 Token parseClassBody(Token token) => fullParseClassBody(token);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 return cachedNode; 66 return cachedNode;
67 } 67 }
68 68
69 Token get position => beginToken; 69 Token get position => beginToken;
70 70
71 // TODO(johnniwinther): Ensure that modifiers are always available. 71 // TODO(johnniwinther): Ensure that modifiers are always available.
72 Modifiers get modifiers => 72 Modifiers get modifiers =>
73 cachedNode != null ? cachedNode.modifiers : Modifiers.EMPTY; 73 cachedNode != null ? cachedNode.modifiers : Modifiers.EMPTY;
74 74
75 accept(ElementVisitor visitor) => visitor.visitClassElement(this); 75 accept(ElementVisitor visitor) => visitor.visitClassElement(this);
76
77 PartialClassElement copyWithEnclosing(CompilationUnitElement enclosing) {
78 return new PartialClassElement(name, beginToken, endToken, enclosing, id);
79 }
76 } 80 }
77 81
78 class MemberListener extends NodeListener { 82 class MemberListener extends NodeListener {
79 final ClassElement enclosingElement; 83 final ClassElement enclosingElement;
80 84
81 MemberListener(DiagnosticListener listener, 85 MemberListener(DiagnosticListener listener,
82 Element enclosingElement) 86 Element enclosingElement)
83 : this.enclosingElement = enclosingElement, 87 : this.enclosingElement = enclosingElement,
84 super(listener, enclosingElement.compilationUnit); 88 super(listener, enclosingElement.compilationUnit);
85 89
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 217
214 void endMetadata(Token beginToken, Token periodBeforeName, Token endToken) { 218 void endMetadata(Token beginToken, Token periodBeforeName, Token endToken) {
215 popNode(); // Discard arguments. 219 popNode(); // Discard arguments.
216 if (periodBeforeName != null) { 220 if (periodBeforeName != null) {
217 popNode(); // Discard name. 221 popNode(); // Discard name.
218 } 222 }
219 popNode(); // Discard node (Send or Identifier). 223 popNode(); // Discard node (Send or Identifier).
220 pushMetadata(new PartialMetadataAnnotation(beginToken, endToken)); 224 pushMetadata(new PartialMetadataAnnotation(beginToken, endToken));
221 } 225 }
222 } 226 }
OLDNEW
« no previous file with comments | « no previous file | dart/pkg/dart2js_incremental/lib/library_updater.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698