| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |