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

Unified Diff: lib/compiler/implementation/dart_backend/emitter.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 | « no previous file | lib/compiler/implementation/elements/elements.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/dart_backend/emitter.dart
diff --git a/lib/compiler/implementation/dart_backend/emitter.dart b/lib/compiler/implementation/dart_backend/emitter.dart
index 71b670b434150f5e34129413be7915c702d56d38..1232e189da07d8b0e04fac225067b61d7fdd5599 100644
--- a/lib/compiler/implementation/dart_backend/emitter.dart
+++ b/lib/compiler/implementation/dart_backend/emitter.dart
@@ -21,6 +21,14 @@ class Emitter {
sb.add(classElement.beginToken.slowToString()); // 'class' or 'interface'.
sb.add(' ');
sb.add(classElement.name.slowToString());
+ if (classElement.isInterface() && classElement.defaultClause !== null) {
+ sb.add(' default ');
+ sb.add(classElement.defaultClause.unparse());
+ }
+ if (!classElement.interfaces.isEmpty()) {
+ sb.add(' implements ');
+ classElement.interfaces.printOn(sb, ',');
+ }
sb.add('{');
innerElements.forEach((element) {
// TODO(smok): Filter out default constructors here.
« no previous file with comments | « no previous file | lib/compiler/implementation/elements/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698