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

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

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 } 132 }
133 } 133 }
134 visit(send.selector); 134 visit(send.selector);
135 } else { 135 } else {
136 visit(name); 136 visit(name);
137 } 137 }
138 } 138 }
139 139
140 visitFunctionExpression(FunctionExpression node) { 140 visitFunctionExpression(FunctionExpression node) {
141 // Check length to not print unnecessary whitespace. 141 // Check length to not print unnecessary whitespace.
142 if (node.modifiers.nodes.length() > 0) { 142 if (node.modifiers.nodes.length > 0) {
143 visit(node.modifiers); 143 visit(node.modifiers);
144 sb.add(' '); 144 sb.add(' ');
145 } 145 }
146 if (node.returnType != null) { 146 if (node.returnType != null) {
147 visit(node.returnType); 147 visit(node.returnType);
148 sb.add(' '); 148 sb.add(' ');
149 } 149 }
150 if (node.getOrSet != null) { 150 if (node.getOrSet != null) {
151 add(node.getOrSet.value); 151 add(node.getOrSet.value);
152 sb.add(' '); 152 sb.add(' ');
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 visitTypeVariable(TypeVariable node) { 327 visitTypeVariable(TypeVariable node) {
328 visit(node.name); 328 visit(node.name);
329 if (node.bound != null) { 329 if (node.bound != null) {
330 sb.add(' extends '); 330 sb.add(' extends ');
331 visit(node.bound); 331 visit(node.bound);
332 } 332 }
333 } 333 }
334 334
335 visitVariableDefinitions(VariableDefinitions node) { 335 visitVariableDefinitions(VariableDefinitions node) {
336 visit(node.modifiers); 336 visit(node.modifiers);
337 if (node.modifiers.nodes.length() > 0) { 337 if (node.modifiers.nodes.length > 0) {
338 sb.add(' '); 338 sb.add(' ');
339 } 339 }
340 if (node.type != null) { 340 if (node.type != null) {
341 visit(node.type); 341 visit(node.type);
342 sb.add(' '); 342 sb.add(' ');
343 } 343 }
344 visit(node.definitions); 344 visit(node.definitions);
345 if (node.endToken.value == const SourceString(';')) { 345 if (node.endToken.value == const SourceString(';')) {
346 add(node.endToken.value); 346 add(node.endToken.value);
347 } 347 }
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 } 597 }
598 598
599 visitStatement(Statement node) { 599 visitStatement(Statement node) {
600 throw 'internal error'; // Should not be called. 600 throw 'internal error'; // Should not be called.
601 } 601 }
602 602
603 visitStringNode(StringNode node) { 603 visitStringNode(StringNode node) {
604 throw 'internal error'; // Should not be called. 604 throw 'internal error'; // Should not be called.
605 } 605 }
606 } 606 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698