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

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

Issue 12092020: Revert "Fix VariableDefinitions.endToken for formal parameters." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 visitVariableDefinitions(VariableDefinitions node) { 359 visitVariableDefinitions(VariableDefinitions node) {
360 visit(node.modifiers); 360 visit(node.modifiers);
361 if (!node.modifiers.nodes.isEmpty) { 361 if (!node.modifiers.nodes.isEmpty) {
362 sb.add(' '); 362 sb.add(' ');
363 } 363 }
364 if (node.type != null) { 364 if (node.type != null) {
365 visit(node.type); 365 visit(node.type);
366 sb.add(' '); 366 sb.add(' ');
367 } 367 }
368 visit(node.definitions); 368 visit(node.definitions);
369 if (node.endToken.value == const SourceString(';')) {
370 add(node.endToken.value);
371 }
369 } 372 }
370 373
371 visitDoWhile(DoWhile node) { 374 visitDoWhile(DoWhile node) {
372 add(node.doKeyword.value); 375 add(node.doKeyword.value);
373 if (node.body is !Block) sb.add(' '); 376 if (node.body is !Block) sb.add(' ');
374 visit(node.body); 377 visit(node.body);
375 add(node.whileKeyword.value); 378 add(node.whileKeyword.value);
376 visit(node.condition); 379 visit(node.condition);
377 sb.add(node.endToken.value); 380 sb.add(node.endToken.value);
378 } 381 }
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
618 } 621 }
619 622
620 visitStatement(Statement node) { 623 visitStatement(Statement node) {
621 throw 'internal error'; // Should not be called. 624 throw 'internal error'; // Should not be called.
622 } 625 }
623 626
624 visitStringNode(StringNode node) { 627 visitStringNode(StringNode node) {
625 throw 'internal error'; // Should not be called. 628 throw 'internal error'; // Should not be called.
626 } 629 }
627 } 630 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/tree/nodes.dart ('k') | tests/compiler/dart2js/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698