| 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 engine.incremental_resolver; | 5 library engine.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 'ast.dart'; | 10 import 'ast.dart'; |
| (...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 static void _setParameterElements(FormalParameterList nodes, | 679 static void _setParameterElements(FormalParameterList nodes, |
| 680 List<ParameterElement> elements) { | 680 List<ParameterElement> elements) { |
| 681 if (nodes != null) { | 681 if (nodes != null) { |
| 682 for (int i = 0; i < elements.length; i++) { | 682 for (int i = 0; i < elements.length; i++) { |
| 683 ParameterElement element = elements[i]; | 683 ParameterElement element = elements[i]; |
| 684 FormalParameter node = nodes.parameters[i]; | 684 FormalParameter node = nodes.parameters[i]; |
| 685 ParameterElement newElement = node.element; | 685 ParameterElement newElement = node.element; |
| 686 node.identifier.staticElement = element; | 686 node.identifier.staticElement = element; |
| 687 (element as ElementImpl).name = newElement.name; | 687 (element as ElementImpl).name = newElement.name; |
| 688 (element as ElementImpl).nameOffset = newElement.nameOffset; | 688 (element as ElementImpl).nameOffset = newElement.nameOffset; |
| 689 if (node is FunctionTypedFormalParameter) { |
| 690 _setParameterElements(node.parameters, element.parameters); |
| 691 } |
| 689 } | 692 } |
| 690 } | 693 } |
| 691 } | 694 } |
| 692 } | 695 } |
| 693 | 696 |
| 694 | 697 |
| 695 /** | 698 /** |
| 696 * Describes how declarations match an existing elements model. | 699 * Describes how declarations match an existing elements model. |
| 697 */ | 700 */ |
| 698 class DeclarationMatchKind { | 701 class DeclarationMatchKind { |
| (...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1727 String toString() => name; | 1730 String toString() => name; |
| 1728 } | 1731 } |
| 1729 | 1732 |
| 1730 | 1733 |
| 1731 class _TokenPair { | 1734 class _TokenPair { |
| 1732 final _TokenDifferenceKind kind; | 1735 final _TokenDifferenceKind kind; |
| 1733 final Token oldToken; | 1736 final Token oldToken; |
| 1734 final Token newToken; | 1737 final Token newToken; |
| 1735 _TokenPair(this.kind, this.oldToken, this.newToken); | 1738 _TokenPair(this.kind, this.oldToken, this.newToken); |
| 1736 } | 1739 } |
| OLD | NEW |