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

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

Issue 10789012: Record default clause for interfaces in parser. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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/elements/elements.dart ('k') | tests/compiler/dart2js/unparser_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/scanner/listener.dart
diff --git a/lib/compiler/implementation/scanner/listener.dart b/lib/compiler/implementation/scanner/listener.dart
index 7d18d4d8ed3ea36f354eb1bb7fb119a0ae8c23ac..d1fe3adcaba4d3ee31130a7a7d013ea803019087 100644
--- a/lib/compiler/implementation/scanner/listener.dart
+++ b/lib/compiler/implementation/scanner/listener.dart
@@ -590,15 +590,16 @@ class ElementListener extends Listener {
void endInterface(int supertypeCount, Token interfaceKeyword,
Token extendsKeyword, Token endToken) {
- // TODO(ahe): Record the defaultClause.
Node defaultClause = popNode();
NodeList supertypes =
makeNodeList(supertypeCount, extendsKeyword, null, ",");
NodeList typeParameters = popNode();
Identifier name = popNode();
int id = idGenerator();
- pushElement(new PartialClassElement(
- name.source, interfaceKeyword, endToken, compilationUnitElement, id));
+ ClassElement element = new PartialClassElement(
+ name.source, interfaceKeyword, endToken, compilationUnitElement, id);
+ pushElement(element);
+ if (defaultClause !== null) element.defaultClause = defaultClause;
}
void endFunctionTypeAlias(Token typedefKeyword, Token endToken) {
« no previous file with comments | « lib/compiler/implementation/elements/elements.dart ('k') | tests/compiler/dart2js/unparser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698