| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 summary_resynthesizer; | 5 library summary_resynthesizer; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/token.dart'; | 10 import 'package:analyzer/dart/ast/token.dart'; |
| (...skipping 1693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1704 case UnlinkedParamKind.named: | 1704 case UnlinkedParamKind.named: |
| 1705 parameterElement.parameterKind = ParameterKind.NAMED; | 1705 parameterElement.parameterKind = ParameterKind.NAMED; |
| 1706 break; | 1706 break; |
| 1707 case UnlinkedParamKind.positional: | 1707 case UnlinkedParamKind.positional: |
| 1708 parameterElement.parameterKind = ParameterKind.POSITIONAL; | 1708 parameterElement.parameterKind = ParameterKind.POSITIONAL; |
| 1709 break; | 1709 break; |
| 1710 case UnlinkedParamKind.required: | 1710 case UnlinkedParamKind.required: |
| 1711 parameterElement.parameterKind = ParameterKind.REQUIRED; | 1711 parameterElement.parameterKind = ParameterKind.REQUIRED; |
| 1712 break; | 1712 break; |
| 1713 } | 1713 } |
| 1714 if (serializedParameter.visibleOffset != 0) { |
| 1715 parameterElement.setVisibleRange( |
| 1716 serializedParameter.visibleOffset, serializedParameter.visibleLength); |
| 1717 } |
| 1714 return parameterElement; | 1718 return parameterElement; |
| 1715 } | 1719 } |
| 1716 | 1720 |
| 1717 /** | 1721 /** |
| 1718 * Create, but do not populate, the [CompilationUnitElement] for a part other | 1722 * Create, but do not populate, the [CompilationUnitElement] for a part other |
| 1719 * than the defining compilation unit. | 1723 * than the defining compilation unit. |
| 1720 */ | 1724 */ |
| 1721 CompilationUnitElementImpl buildPart( | 1725 CompilationUnitElementImpl buildPart( |
| 1722 String uri, UnlinkedPart partDecl, UnlinkedUnit serializedPart) { | 1726 String uri, UnlinkedPart partDecl, UnlinkedUnit serializedPart) { |
| 1723 Source unitSource = | 1727 Source unitSource = |
| (...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2408 List<DartType> typeArguments = const <DartType>[]; | 2412 List<DartType> typeArguments = const <DartType>[]; |
| 2409 if (numTypeArguments != 0) { | 2413 if (numTypeArguments != 0) { |
| 2410 typeArguments = <DartType>[]; | 2414 typeArguments = <DartType>[]; |
| 2411 for (int i = 0; i < numTypeArguments; i++) { | 2415 for (int i = 0; i < numTypeArguments; i++) { |
| 2412 typeArguments.add(getTypeArgument(i)); | 2416 typeArguments.add(getTypeArgument(i)); |
| 2413 } | 2417 } |
| 2414 } | 2418 } |
| 2415 return typeArguments; | 2419 return typeArguments; |
| 2416 } | 2420 } |
| 2417 } | 2421 } |
| OLD | NEW |