| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 analyzer.src.generated.incremental_resolver; | 5 library analyzer.src.generated.incremental_resolver; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'dart:math' as math; | 8 import 'dart:math' as math; |
| 9 | 9 |
| 10 import 'package:analyzer/dart/ast/ast.dart'; | 10 import 'package:analyzer/dart/ast/ast.dart'; |
| (...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 oldParent is ConstructorDeclaration && | 658 oldParent is ConstructorDeclaration && |
| 659 newParent is ConstructorDeclaration || | 659 newParent is ConstructorDeclaration || |
| 660 oldParent is MethodDeclaration && | 660 oldParent is MethodDeclaration && |
| 661 newParent is MethodDeclaration) { | 661 newParent is MethodDeclaration) { |
| 662 if (oldParents.length == i || newParents.length == i) { | 662 if (oldParents.length == i || newParents.length == i) { |
| 663 return false; | 663 return false; |
| 664 } | 664 } |
| 665 } else if (oldParent is FunctionBody && newParent is FunctionBody) { | 665 } else if (oldParent is FunctionBody && newParent is FunctionBody) { |
| 666 if (oldParent is BlockFunctionBody && | 666 if (oldParent is BlockFunctionBody && |
| 667 newParent is BlockFunctionBody) { | 667 newParent is BlockFunctionBody) { |
| 668 if (oldParent.isAsynchronous != newParent.isAsynchronous) { |
| 669 logger.log('Failure: body async mismatch.'); |
| 670 return false; |
| 671 } |
| 672 if (oldParent.isGenerator != newParent.isGenerator) { |
| 673 logger.log('Failure: body generator mismatch.'); |
| 674 return false; |
| 675 } |
| 668 oldNode = oldParent; | 676 oldNode = oldParent; |
| 669 newNode = newParent; | 677 newNode = newParent; |
| 670 found = true; | 678 found = true; |
| 671 break; | 679 break; |
| 672 } | 680 } |
| 673 logger.log('Failure: not a block function body.'); | 681 logger.log('Failure: not a block function body.'); |
| 674 return false; | 682 return false; |
| 675 } else if (oldParent is FunctionExpression && | 683 } else if (oldParent is FunctionExpression && |
| 676 newParent is FunctionExpression) { | 684 newParent is FunctionExpression) { |
| 677 // skip | 685 // skip |
| (...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1303 @override | 1311 @override |
| 1304 String toString() => name; | 1312 String toString() => name; |
| 1305 } | 1313 } |
| 1306 | 1314 |
| 1307 class _TokenPair { | 1315 class _TokenPair { |
| 1308 final _TokenDifferenceKind kind; | 1316 final _TokenDifferenceKind kind; |
| 1309 final Token oldToken; | 1317 final Token oldToken; |
| 1310 final Token newToken; | 1318 final Token newToken; |
| 1311 _TokenPair(this.kind, this.oldToken, this.newToken); | 1319 _TokenPair(this.kind, this.oldToken, this.newToken); |
| 1312 } | 1320 } |
| OLD | NEW |