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

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

Issue 282453004: Dart2js enum parsing. Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Typo Created 6 years, 7 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
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 sb.write(' '); 66 sb.write(' ');
67 visit(node.interfaces); 67 visit(node.interfaces);
68 } 68 }
69 sb.write('{'); 69 sb.write('{');
70 for (final member in members) { 70 for (final member in members) {
71 visit(member); 71 visit(member);
72 } 72 }
73 sb.write('}'); 73 sb.write('}');
74 } 74 }
75 75
76 visitEnum(Enum node) {
77 sb.write('enum ');
78 visit(node.name);
79 sb.write(' ');
80 visit(node.names);
81 }
82
76 visitClassNode(ClassNode node) { 83 visitClassNode(ClassNode node) {
77 unparseClassWithBody(node, node.body.nodes); 84 unparseClassWithBody(node, node.body.nodes);
78 } 85 }
79 86
80 visitMixinApplication(MixinApplication node) { 87 visitMixinApplication(MixinApplication node) {
81 visit(node.superclass); 88 visit(node.superclass);
82 sb.write(' with '); 89 sb.write(' with ');
83 visit(node.mixins); 90 visit(node.mixins);
84 } 91 }
85 92
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 } 624 }
618 625
619 visitStatement(Statement node) { 626 visitStatement(Statement node) {
620 throw 'internal error'; // Should not be called. 627 throw 'internal error'; // Should not be called.
621 } 628 }
622 629
623 visitStringNode(StringNode node) { 630 visitStringNode(StringNode node) {
624 throw 'internal error'; // Should not be called. 631 throw 'internal error'; // Should not be called.
625 } 632 }
626 } 633 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698