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

Side by Side Diff: lib/compiler/implementation/dart_backend/emitter.dart

Issue 10832129: Get back recording 'implements' and 'extends' keyword on NodeList (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 | « no previous file | lib/compiler/implementation/scanner/listener.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 /** 5 /**
6 * Dart backend helper for converting program IR back to source code. 6 * Dart backend helper for converting program IR back to source code.
7 */ 7 */
8 class Emitter { 8 class Emitter {
9 9
10 final Compiler compiler; 10 final Compiler compiler;
(...skipping 25 matching lines...) Expand all
36 sb.add(unparser.unparse(classNode.typeParameters)); 36 sb.add(unparser.unparse(classNode.typeParameters));
37 } 37 }
38 renamer.setContext(classElement); 38 renamer.setContext(classElement);
39 if (classNode.extendsKeyword !== null) { 39 if (classNode.extendsKeyword !== null) {
40 sb.add(' '); 40 sb.add(' ');
41 classNode.extendsKeyword.value.printOn(sb); 41 classNode.extendsKeyword.value.printOn(sb);
42 sb.add(' '); 42 sb.add(' ');
43 sb.add(unparser.unparse(classNode.superclass)); 43 sb.add(unparser.unparse(classNode.superclass));
44 } 44 }
45 if (!classNode.interfaces.isEmpty()) { 45 if (!classNode.interfaces.isEmpty()) {
46 sb.add(classElement.isInterface() ? ' extends ' : ' implements '); 46 sb.add(' ');
47 sb.add(unparser.unparse(classNode.interfaces)); 47 sb.add(unparser.unparse(classNode.interfaces));
48 } 48 }
49 if (classNode.defaultClause !== null) { 49 if (classNode.defaultClause !== null) {
50 sb.add(' default '); 50 sb.add(' default ');
51 sb.add(unparser.unparse(classNode.defaultClause)); 51 sb.add(unparser.unparse(classNode.defaultClause));
52 } 52 }
53 sb.add('{'); 53 sb.add('{');
54 innerElements.forEach((element) { 54 innerElements.forEach((element) {
55 // TODO(smok): Filter out default constructors here. 55 // TODO(smok): Filter out default constructors here.
56 outputElement(element); 56 outputElement(element);
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 if (!uri.startsWith('dart:')) continue; 90 if (!uri.startsWith('dart:')) continue;
91 final lib = libraries[uri]; 91 final lib = libraries[uri];
92 if (renamer.imports.containsKey(lib)) { 92 if (renamer.imports.containsKey(lib)) {
93 result.add('#import("$uri", prefix: "${renamer.imports[lib]}");'); 93 result.add('#import("$uri", prefix: "${renamer.imports[lib]}");');
94 } 94 }
95 } 95 }
96 result.add(sb); 96 result.add(sb);
97 return result.toString(); 97 return result.toString();
98 } 98 }
99 } 99 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/scanner/listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698