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

Side by Side Diff: pkg/analyzer/lib/src/services/formatter_impl.dart

Issue 321513006: Formatter: keep a right parenthesis ')' with the last argument. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 | pkg/analyzer/test/services/data/stmt_tests.data » ('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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 library formatter_impl; 5 library formatter_impl;
6 6
7 import 'dart:math'; 7 import 'dart:math';
8 8
9 import 'package:analyzer/analyzer.dart'; 9 import 'package:analyzer/analyzer.dart';
10 import 'package:analyzer/src/generated/parser.dart'; 10 import 'package:analyzer/src/generated/parser.dart';
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
418 visit(node.name); 418 visit(node.name);
419 token(node.period); 419 token(node.period);
420 visit(node.constructorName); 420 visit(node.constructorName);
421 visit(node.arguments); 421 visit(node.arguments);
422 } 422 }
423 423
424 visitArgumentList(ArgumentList node) { 424 visitArgumentList(ArgumentList node) {
425 token(node.leftParenthesis); 425 token(node.leftParenthesis);
426 breakableNonSpace(); 426 breakableNonSpace();
427 visitCommaSeparatedNodes(node.arguments); 427 visitCommaSeparatedNodes(node.arguments);
428 breakableNonSpace();
429 token(node.rightParenthesis); 428 token(node.rightParenthesis);
430 } 429 }
431 430
432 visitAsExpression(AsExpression node) { 431 visitAsExpression(AsExpression node) {
433 visit(node.expression); 432 visit(node.expression);
434 space(); 433 space();
435 token(node.asOperator); 434 token(node.asOperator);
436 space(); 435 space();
437 visit(node.type); 436 visit(node.type);
438 } 437 }
(...skipping 1339 matching lines...) Expand 10 before | Expand all | Expand 10 after
1778 var lastLine = 1777 var lastLine =
1779 lineInfo.getLocation(lastOffset).lineNumber; 1778 lineInfo.getLocation(lastOffset).lineNumber;
1780 var currentLine = 1779 var currentLine =
1781 lineInfo.getLocation(currentOffset).lineNumber; 1780 lineInfo.getLocation(currentOffset).lineNumber;
1782 return currentLine - lastLine; 1781 return currentLine - lastLine;
1783 } 1782 }
1784 1783
1785 String toString() => writer.toString(); 1784 String toString() => writer.toString();
1786 1785
1787 } 1786 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/services/data/stmt_tests.data » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698