| 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 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 levelSpace(SINGLE_SPACE_WEIGHT); | 460 levelSpace(SINGLE_SPACE_WEIGHT); |
| 461 visit(node.rightHandSide); | 461 visit(node.rightHandSide); |
| 462 }); | 462 }); |
| 463 } | 463 } |
| 464 | 464 |
| 465 @override | 465 @override |
| 466 visitAwaitExpression(AwaitExpression node) { | 466 visitAwaitExpression(AwaitExpression node) { |
| 467 token(node.awaitKeyword); | 467 token(node.awaitKeyword); |
| 468 space(); | 468 space(); |
| 469 visit(node.expression); | 469 visit(node.expression); |
| 470 // TODO(scheglov) a bug in the spec, there sould not be a ';' | |
| 471 token(node.semicolon); | |
| 472 } | 470 } |
| 473 | 471 |
| 474 visitBinaryExpression(BinaryExpression node) { | 472 visitBinaryExpression(BinaryExpression node) { |
| 475 Token operator = node.operator; | 473 Token operator = node.operator; |
| 476 TokenType operatorType = operator.type; | 474 TokenType operatorType = operator.type; |
| 477 int addOperands(List<Expression> operands, Expression e, int i) { | 475 int addOperands(List<Expression> operands, Expression e, int i) { |
| 478 if (e is BinaryExpression && e.operator.type == operatorType) { | 476 if (e is BinaryExpression && e.operator.type == operatorType) { |
| 479 i = addOperands(operands, e.leftOperand, i); | 477 i = addOperands(operands, e.leftOperand, i); |
| 480 i = addOperands(operands, e.rightOperand, i); | 478 i = addOperands(operands, e.rightOperand, i); |
| 481 } else { | 479 } else { |
| (...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1847 @override | 1845 @override |
| 1848 visitEnumConstantDeclaration(EnumConstantDeclaration node) { | 1846 visitEnumConstantDeclaration(EnumConstantDeclaration node) { |
| 1849 // TODO: implement visitEnumConstantDeclaration | 1847 // TODO: implement visitEnumConstantDeclaration |
| 1850 } | 1848 } |
| 1851 | 1849 |
| 1852 @override | 1850 @override |
| 1853 visitEnumDeclaration(EnumDeclaration node) { | 1851 visitEnumDeclaration(EnumDeclaration node) { |
| 1854 // TODO: implement visitEnumDeclaration | 1852 // TODO: implement visitEnumDeclaration |
| 1855 } | 1853 } |
| 1856 } | 1854 } |
| OLD | NEW |