| 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/java_core.dart' show CharSequence; | 10 import 'package:analyzer/src/generated/java_core.dart' show CharSequence; |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 visitAsExpression(AsExpression node) { | 419 visitAsExpression(AsExpression node) { |
| 420 visit(node.expression); | 420 visit(node.expression); |
| 421 space(); | 421 space(); |
| 422 token(node.asOperator); | 422 token(node.asOperator); |
| 423 space(); | 423 space(); |
| 424 visit(node.type); | 424 visit(node.type); |
| 425 } | 425 } |
| 426 | 426 |
| 427 visitAssertStatement(AssertStatement node) { | 427 visitAssertStatement(AssertStatement node) { |
| 428 token(node.keyword); | 428 token(node.keyword); |
| 429 space(); | |
| 430 token(node.leftParenthesis); | 429 token(node.leftParenthesis); |
| 431 visit(node.condition); | 430 visit(node.condition); |
| 432 token(node.rightParenthesis); | 431 token(node.rightParenthesis); |
| 433 token(node.semicolon); | 432 token(node.semicolon); |
| 434 } | 433 } |
| 435 | 434 |
| 436 visitAssignmentExpression(AssignmentExpression node) { | 435 visitAssignmentExpression(AssignmentExpression node) { |
| 437 visit(node.leftHandSide); | 436 visit(node.leftHandSide); |
| 438 space(); | 437 space(); |
| 439 token(node.operator); | 438 token(node.operator); |
| (...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1682 var lastLine = | 1681 var lastLine = |
| 1683 lineInfo.getLocation(lastOffset).lineNumber; | 1682 lineInfo.getLocation(lastOffset).lineNumber; |
| 1684 var currentLine = | 1683 var currentLine = |
| 1685 lineInfo.getLocation(currentOffset).lineNumber; | 1684 lineInfo.getLocation(currentOffset).lineNumber; |
| 1686 return currentLine - lastLine; | 1685 return currentLine - lastLine; |
| 1687 } | 1686 } |
| 1688 | 1687 |
| 1689 String toString() => writer.toString(); | 1688 String toString() => writer.toString(); |
| 1690 | 1689 |
| 1691 } | 1690 } |
| OLD | NEW |