| 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 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 } | 414 } |
| 415 | 415 |
| 416 visitAnnotation(Annotation node) { | 416 visitAnnotation(Annotation node) { |
| 417 token(node.atSign); | 417 token(node.atSign); |
| 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 visitArgumentDefinitionTest(ArgumentDefinitionTest node) { | |
| 425 token(node.question); | |
| 426 visit(node.identifier); | |
| 427 } | |
| 428 | |
| 429 visitArgumentList(ArgumentList node) { | 424 visitArgumentList(ArgumentList node) { |
| 430 token(node.leftParenthesis); | 425 token(node.leftParenthesis); |
| 431 breakableNonSpace(); | 426 breakableNonSpace(); |
| 432 visitCommaSeparatedNodes(node.arguments); | 427 visitCommaSeparatedNodes(node.arguments); |
| 433 breakableNonSpace(); | 428 breakableNonSpace(); |
| 434 token(node.rightParenthesis); | 429 token(node.rightParenthesis); |
| 435 } | 430 } |
| 436 | 431 |
| 437 visitAsExpression(AsExpression node) { | 432 visitAsExpression(AsExpression node) { |
| 438 visit(node.expression); | 433 visit(node.expression); |
| (...skipping 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1773 var lastLine = | 1768 var lastLine = |
| 1774 lineInfo.getLocation(lastOffset).lineNumber; | 1769 lineInfo.getLocation(lastOffset).lineNumber; |
| 1775 var currentLine = | 1770 var currentLine = |
| 1776 lineInfo.getLocation(currentOffset).lineNumber; | 1771 lineInfo.getLocation(currentOffset).lineNumber; |
| 1777 return currentLine - lastLine; | 1772 return currentLine - lastLine; |
| 1778 } | 1773 } |
| 1779 | 1774 |
| 1780 String toString() => writer.toString(); | 1775 String toString() => writer.toString(); |
| 1781 | 1776 |
| 1782 } | 1777 } |
| OLD | NEW |