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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/tree/unparser.dart

Issue 27300003: Change "typedef" to "class" in core library and related tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update some dart2js tests and unparser. Created 7 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 | « sdk/lib/_collection_dev/list.dart ('k') | sdk/lib/async/stream_controller.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 part of tree; 5 part of tree;
6 6
7 String unparse(Node node) { 7 String unparse(Node node) {
8 Unparser unparser = new Unparser(); 8 Unparser unparser = new Unparser();
9 unparser.unparse(node); 9 unparser.unparse(node);
10 return unparser.result; 10 return unparser.result;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 unparseClassWithBody(node, node.body.nodes); 77 unparseClassWithBody(node, node.body.nodes);
78 } 78 }
79 79
80 visitMixinApplication(MixinApplication node) { 80 visitMixinApplication(MixinApplication node) {
81 visit(node.superclass); 81 visit(node.superclass);
82 sb.write(' with '); 82 sb.write(' with ');
83 visit(node.mixins); 83 visit(node.mixins);
84 } 84 }
85 85
86 visitNamedMixinApplication(NamedMixinApplication node) { 86 visitNamedMixinApplication(NamedMixinApplication node) {
87 sb.write('typedef '); 87 if (!node.modifiers.nodes.isEmpty) {
88 visit(node.modifiers);
89 sb.write(' ');
90 }
91 sb.write('class ');
88 visit(node.name); 92 visit(node.name);
89 if (node.typeParameters != null) { 93 if (node.typeParameters != null) {
90 visit(node.typeParameters); 94 visit(node.typeParameters);
91 } 95 }
92 sb.write(' = '); 96 sb.write(' = ');
93 if (!node.modifiers.nodes.isEmpty) {
94 visit(node.modifiers);
95 sb.write(' ');
96 }
97 visit(node.mixinApplication); 97 visit(node.mixinApplication);
98 if (node.interfaces != null) { 98 if (node.interfaces != null) {
99 sb.write(' implements '); 99 sb.write(' implements ');
100 visit(node.interfaces); 100 visit(node.interfaces);
101 } 101 }
102 sb.write(';'); 102 sb.write(';');
103 } 103 }
104 104
105 visitConditional(Conditional node) { 105 visitConditional(Conditional node) {
106 visit(node.condition); 106 visit(node.condition);
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 } 606 }
607 607
608 visitStatement(Statement node) { 608 visitStatement(Statement node) {
609 throw 'internal error'; // Should not be called. 609 throw 'internal error'; // Should not be called.
610 } 610 }
611 611
612 visitStringNode(StringNode node) { 612 visitStringNode(StringNode node) {
613 throw 'internal error'; // Should not be called. 613 throw 'internal error'; // Should not be called.
614 } 614 }
615 } 615 }
OLDNEW
« no previous file with comments | « sdk/lib/_collection_dev/list.dart ('k') | sdk/lib/async/stream_controller.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698